Skip to content

Commit

Permalink
Support for specifying taints for a MachinePool | Adding a NOTE about…
Browse files Browse the repository at this point in the history
… MachinePool labels

Signed-off-by: Archisman <[email protected]>
  • Loading branch information
Archisman-Mridha committed Sep 18, 2024
1 parent 6e665b3 commit def0201
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,8 @@ spec:
kubeletExtraArgs:
cloud-provider: external
name: '{{"{{"}} ds.meta_data.local_hostname {{"}}"}}'
{{- if $machinePool.taints }}
taints: {{- toYaml $machinePool.taints | nindent 8 }}
{{- end }}
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,17 @@ spec:
clusterName: {{ $.Values.global.clusterName }}
replicas: {{ $machinePool.replicas }}
template:
{{- if $machinePool.labels }}
metadata:
labels:
machine-pool: {{ printf "%s-%s" $.Values.global.clusterName $machinePool.name }}
{{- if $machinePool.labels }}
{{- toYaml $machinePool.labels | nindent 8 }}
{{- end }}
# Label should meet one of the following criterias to propagate to Node :
#
# (1) Has node-role.kubernetes.io as prefix.
# (2) Belongs to node-restriction.kubernetes.io domain.
# (3) Belongs to node.cluster.x-k8s.io domain.
#
# REFER : https://cluster-api.sigs.k8s.io/developer/architecture/controllers/metadata-propagation#machine
labels: {{- toYaml $machinePool.labels | nindent 8 }}
{{- end }}
spec:
bootstrap:
configRef:
Expand Down

0 comments on commit def0201

Please sign in to comment.