-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #69 from jnunyez/CNF-11808
add examples of usage with multiple mcps
- Loading branch information
Showing
3 changed files
with
90 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,4 @@ generators: | |
- core-baseline.yaml | ||
- core-overlay.yaml | ||
- core-upgrade.yaml | ||
- core-finish.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: "" |