From b643ff30f8541f055a471f237e28daf40fd7a273 Mon Sep 17 00:00:00 2001 From: Matt Pryor Date: Sat, 7 Oct 2023 15:44:54 +0100 Subject: [PATCH] Add support for specifying a server group ID for (anti-)affinity (#135) --- .../templates/control-plane/openstack-machine-template.yaml | 3 +++ .../templates/node-group/openstack-machine-template.yaml | 3 +++ charts/openstack-cluster/values.yaml | 6 +++++- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/charts/openstack-cluster/templates/control-plane/openstack-machine-template.yaml b/charts/openstack-cluster/templates/control-plane/openstack-machine-template.yaml index 0b4b04f1..c5d0b101 100644 --- a/charts/openstack-cluster/templates/control-plane/openstack-machine-template.yaml +++ b/charts/openstack-cluster/templates/control-plane/openstack-machine-template.yaml @@ -30,6 +30,9 @@ template: {{- with .Values.controlPlane.machineNetworking.ports }} ports: {{ toYaml . | nindent 6 }} {{- end }} + {{- with .Values.controlPlane.serverGroupId }} + serverGroupID: {{ . }} + {{- end }} {{- end }} {{- define "openstack-cluster.controlplane.mt.checksum" -}} diff --git a/charts/openstack-cluster/templates/node-group/openstack-machine-template.yaml b/charts/openstack-cluster/templates/node-group/openstack-machine-template.yaml index 273ed0d9..d18080d4 100644 --- a/charts/openstack-cluster/templates/node-group/openstack-machine-template.yaml +++ b/charts/openstack-cluster/templates/node-group/openstack-machine-template.yaml @@ -32,6 +32,9 @@ template: {{- with $nodeGroup.machineNetworking.ports }} ports: {{ toYaml . | nindent 6 }} {{- end }} + {{- with $nodeGroup.serverGroupId }} + serverGroupID: {{ . }} + {{- end }} {{- end }} {{- define "openstack-cluster.nodegroup.mt.checksum" -}} diff --git a/charts/openstack-cluster/values.yaml b/charts/openstack-cluster/values.yaml index ce131468..196dbafe 100644 --- a/charts/openstack-cluster/values.yaml +++ b/charts/openstack-cluster/values.yaml @@ -151,6 +151,8 @@ controlPlane: # The volume availability zone to use # If not specified, the machine availability zone is used # availabilityZone: + # 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 nodeLabels: # my.company.org/label: value @@ -256,8 +258,10 @@ nodeGroupDefaults: # The volume availability zone to use # If not specified, the machine availability zone is used # availabilityZone: + # 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 - # By default, nodes that are part of a node group get the label "capi.stackhpc.com/node-group=" + # By default, nodes get the label "capi.stackhpc.com/node-group=" nodeLabels: # my.company.org/label: value # The time to wait for a node to finish draining before it can be removed