Skip to content

Commit

Permalink
Merge pull request #69 from jnunyez/CNF-11808
Browse files Browse the repository at this point in the history
add examples of usage with multiple mcps
  • Loading branch information
openshift-merge-bot[bot] authored Jan 9, 2025
2 parents ca04b4d + de85a1e commit 5ff21f0
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 0 deletions.
71 changes: 71 additions & 0 deletions telco-core/configuration/core-finish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
---
apiVersion: policy.open-cluster-management.io/v1
kind: PolicyGenerator
metadata:
name: core-customer-policies
policyDefaults:
namespace: ztp-core-policies
policySets: []
placement:
clusterSelectors:
common: "core"
version: "4.18"
remediationAction: "inform"
policies:
# unpause baseline configuration
- name: custom-mcp-unpause
policyAnnotations:
ran.openshift.io/ztp-deploy-wave: "200"
manifests:
# The MCPs should be added as extra manifests at installation time. Their
# inclusion here will reset the pause to false, allowing the MCPs to update
- path: ../install/custom-manifests/mcp-worker-1.yaml
patches:
- spec:
paused: false
status:
conditions:
- type: Updated
status: "True"
- type: Updating
status: "False"

- path: ../install/custom-manifests/mcp-worker-2.yaml
patches:
- spec:
paused: false
status:
conditions:
- type: Updated
status: "True"
- type: Updating
status: "False"

- path: ../install/custom-manifests/mcp-worker-3.yaml
patches:
- spec:
paused: false
status:
conditions:
- type: Updated
status: "True"
- type: Updating
status: "False"

- name: core-custom-mcp-set-maxavailable
policyAnnotations:
ran.openshift.io/ztp-deploy-wave: "201"
manifests:
# This sets the desired maxUnavailable on the customMCPs
- path: ../install/custom-manifests/mcp-worker-1.yaml
patches:
- spec:
maxUnavailable: 1
- path: ../install/custom-manifests/mcp-worker-2.yaml
patches:
- spec:
maxUnavailable: 1
- path: ../install/custom-manifests/mcp-worker-3.yaml
patches:
- spec:
maxUnavailable: 1
1 change: 1 addition & 0 deletions telco-core/configuration/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ generators:
- core-baseline.yaml
- core-overlay.yaml
- core-upgrade.yaml
- core-finish.yaml
18 changes: 18 additions & 0 deletions telco-core/install/custom-manifests/mcp-worker-3.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfigPool
metadata:
name: worker-3
labels:
machineconfiguration.openshift.io/role: worker-3
spec:
machineConfigSelector:
matchExpressions:
- key: machineconfiguration.openshift.io/role
operator: In
values: [ worker, worker-3 ]
paused: true
maxUnavailable: 100%
nodeSelector:
matchLabels:
node-role.kubernetes.io/worker-3: ""

0 comments on commit 5ff21f0

Please sign in to comment.