Skip to content

Commit

Permalink
Support setting server metadata on nodes (#433)
Browse files Browse the repository at this point in the history
  • Loading branch information
mkjpryor authored Oct 16, 2024
1 parent 3f4f610 commit dfddc37
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,13 @@ template:
serverGroup:
id: {{ . }}
{{- end }}
{{- with mergeOverwrite .Values.machineMetadata .Values.controlPlane.machineMetadata }}
serverMetadata:
{{- range $k, $v := . }}
- key: {{ quote $k }}
value: {{ quote $v }}
{{- end }}
{{- end }}
{{- end }}

{{- define "openstack-cluster.controlplane.mt.checksum" -}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,13 @@ template:
serverGroup:
id: {{ . }}
{{- end }}
{{- with mergeOverwrite $ctx.Values.machineMetadata $nodeGroup.machineMetadata }}
serverMetadata:
{{- range $k, $v := . }}
- key: {{ quote $k }}
value: {{ quote $v }}
{{- end }}
{{- end }}
{{- end }}

{{- define "openstack-cluster.nodegroup.mt.checksum" -}}
Expand Down
8 changes: 8 additions & 0 deletions charts/openstack-cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ machineImageId:
# The name of the SSH key to inject into cluster machines
machineSSHKeyName:

# Global metadata items to add to each machine
machineMetadata: {}

# The prefix used for project labels and annotations
projectPrefix: capi.stackhpc.com

Expand Down Expand Up @@ -246,6 +249,8 @@ controlPlane:
# The volume availability zone to use
# If not specified, the machine availability zone is used
# availabilityZone:
# Specific metadata for control plane nodes
machineMetadata: {}
# The ID of the server group to use for control plane machines
serverGroupId:
# Labels to apply to the node objects in Kubernetes that correspond to control plane machines
Expand Down Expand Up @@ -380,6 +385,9 @@ nodeGroupDefaults:
# The volume availability zone to use
# If not specified, the machine availability zone is used
# availabilityZone:
# Specific metadata for worker nodes
# Can also be specified for each node group
machineMetadata: {}
# The ID of the server group to use for machines in the node group
serverGroupId:
# Labels to apply to the node objects in Kubernetes that correspond to machines in the node group
Expand Down

0 comments on commit dfddc37

Please sign in to comment.