# To apply as additional role to the node
oc label node <your-node-name> machineconfiguration.openshift.io/role=my-role
# To replace the role of the node
oc label node <your-node-name> machineconfiguration.openshift.io/role=my-role --override
Last active
December 6, 2020 00:40
-
-
Save williamcaban/cffdd76f7550c387ce87e193cb2de6fe to your computer and use it in GitHub Desktop.
Custom MCP and MC
This file contains hidden or 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
| --- | |
| apiVersion: machineconfiguration.openshift.io/v1 | |
| kind: MachineConfig | |
| metadata: | |
| labels: | |
| machineconfiguration.openshift.io/role: my-role | |
| name: 50-my-role-files | |
| spec: | |
| config: | |
| ignition: | |
| config: {} | |
| security: | |
| tls: {} | |
| timeouts: {} | |
| version: 3.1.0 | |
| networkd: {} | |
| passwd: {} | |
| storage: | |
| files: | |
| - path: "/etc/foo/foo.conf" | |
| filesystem: root | |
| mode: 420 | |
| contents: | |
| source: data:;base64,<BASE64_FOO.CONF> | |
| - path: "/etc/foo/foo-other.conf" | |
| filesystem: root | |
| mode: 420 | |
| contents: | |
| source: data:;base64,<BASE64_FOO-OTHER.CONF> |
This file contains hidden or 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
| --- | |
| apiVersion: machineconfiguration.openshift.io/v1 | |
| kind: MachineConfig | |
| metadata: | |
| labels: | |
| machineconfiguration.openshift.io/role: my-role | |
| name: 50-my-role-kargs | |
| spec: | |
| kernelArguments: | |
| #- nosmt | |
| - something=other | |
| - your_custom_karg=here |
This file contains hidden or 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
| apiVersion: machineconfiguration.openshift.io/v1 | |
| kind: MachineConfigPool | |
| metadata: | |
| name: worker-bm | |
| spec: | |
| machineConfigSelector: | |
| matchExpressions: | |
| - {key: machineconfiguration.openshift.io/role, operator: In, values: [worker,my-role]} | |
| nodeSelector: | |
| matchLabels: | |
| node-role.kubernetes.io/my-role: "" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment