Skip to content

Instantly share code, notes, and snippets.

@ralvares
Created June 15, 2021 12:46
Show Gist options
  • Select an option

  • Save ralvares/bb892013a7f45a2e312b2e425b4f4061 to your computer and use it in GitHub Desktop.

Select an option

Save ralvares/bb892013a7f45a2e312b2e425b4f4061 to your computer and use it in GitHub Desktop.
MachineConfigPool per Node
Worker-3
==================================================
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfigPool
metadata:
name: worker-3
spec:
machineConfigSelector:
matchExpressions:
- {key: machineconfiguration.openshift.io/role, operator: In, values: [worker,worker-3]}
nodeSelector:
matchLabels:
kubernetes.io/hostname: "worker-3"
---
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
metadata:
labels:
machineconfiguration.openshift.io/role: worker-3
name: 99-staticip-worker-3
spec:
config:
ignition:
version: 2.2.0
storage:
files:
- contents:
source: data:,demo
filesystem: root
mode: 0644
path: /etc/infratest
Worker-4
==================================================
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfigPool
metadata:
name: worker-4
spec:
machineConfigSelector:
matchExpressions:
- {key: machineconfiguration.openshift.io/role, operator: In, values: [worker,worker-4]}
nodeSelector:
matchLabels:
kubernetes.io/hostname: "worker-4"
---
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
metadata:
labels:
machineconfiguration.openshift.io/role: worker-4
name: 99-staticip-worker-4
spec:
config:
ignition:
version: 2.2.0
storage:
files:
- contents:
source: data:,demo
filesystem: root
mode: 0644
path: /etc/infratest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment