diff --git a/charts/openstack-cluster/templates/cluster-openstack.yaml b/charts/openstack-cluster/templates/cluster-openstack.yaml index 2854e9b..78ab688 100644 --- a/charts/openstack-cluster/templates/cluster-openstack.yaml +++ b/charts/openstack-cluster/templates/cluster-openstack.yaml @@ -1,5 +1,5 @@ --- -apiVersion: infrastructure.cluster.x-k8s.io/v1alpha5 +apiVersion: infrastructure.cluster.x-k8s.io/v1alpha6 kind: OpenStackCluster metadata: name: {{ include "openstack-cluster.clusterName" . }} @@ -50,6 +50,10 @@ spec: {{- end }} apiServerPort: {{ .port }} {{- end }} - {{- with .Values.controlPlane.failureDomains }} - controlPlaneAvailabilityZones: {{ toYaml . | nindent 4 }} + {{- with .Values.controlPlane }} + {{- if .omitFailureDomain }} + controlPlaneOmitAvailabilityZone: true + {{- else if .failureDomains }} + controlPlaneAvailabilityZones: {{ toYaml .failureDomains | nindent 4 }} + {{- end }} {{- end }} diff --git a/charts/openstack-cluster/templates/cluster.yaml b/charts/openstack-cluster/templates/cluster.yaml index b851b96..98acc82 100644 --- a/charts/openstack-cluster/templates/cluster.yaml +++ b/charts/openstack-cluster/templates/cluster.yaml @@ -11,6 +11,6 @@ spec: kind: KubeadmControlPlane name: {{ include "openstack-cluster.componentName" (list . "control-plane") }} infrastructureRef: - apiVersion: infrastructure.cluster.x-k8s.io/v1alpha5 + apiVersion: infrastructure.cluster.x-k8s.io/v1alpha6 kind: OpenStackCluster name: {{ include "openstack-cluster.clusterName" . }} diff --git a/charts/openstack-cluster/templates/control-plane/kubeadm-control-plane.yaml b/charts/openstack-cluster/templates/control-plane/kubeadm-control-plane.yaml index 568b314..522ff9e 100644 --- a/charts/openstack-cluster/templates/control-plane/kubeadm-control-plane.yaml +++ b/charts/openstack-cluster/templates/control-plane/kubeadm-control-plane.yaml @@ -83,7 +83,7 @@ spec: labels: {{ include "openstack-cluster.controlPlaneSelectorLabels" . | nindent 8 }} infrastructureRef: kind: OpenStackMachineTemplate - apiVersion: infrastructure.cluster.x-k8s.io/v1alpha5 + apiVersion: infrastructure.cluster.x-k8s.io/v1alpha6 name: {{ include "openstack-cluster.controlplane.mt.name" . }} {{- with .Values.controlPlane.nodeDrainTimeout }} nodeDrainTimeout: {{ . }} 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 b892973..acac20a 100644 --- a/charts/openstack-cluster/templates/control-plane/openstack-machine-template.yaml +++ b/charts/openstack-cluster/templates/control-plane/openstack-machine-template.yaml @@ -40,7 +40,7 @@ template: {{- include "openstack-cluster.componentName" (list . "control-plane") }}-{{ trunc 8 $checksum }} {{- end }} -apiVersion: infrastructure.cluster.x-k8s.io/v1alpha5 +apiVersion: infrastructure.cluster.x-k8s.io/v1alpha6 kind: OpenStackMachineTemplate metadata: name: {{ include "openstack-cluster.controlplane.mt.name" . }} diff --git a/charts/openstack-cluster/templates/node-group/machine-deployment.yaml b/charts/openstack-cluster/templates/node-group/machine-deployment.yaml index 395766c..895a46c 100644 --- a/charts/openstack-cluster/templates/node-group/machine-deployment.yaml +++ b/charts/openstack-cluster/templates/node-group/machine-deployment.yaml @@ -39,14 +39,16 @@ spec: spec: clusterName: {{ include "openstack-cluster.clusterName" $ }} version: {{ $.Values.global.kubernetesVersion }} - failureDomain: {{ $nodeGroup.failureDomain }} + {{- with $nodeGroup.failureDomain }} + failureDomain: {{ . }} + {{- end }} bootstrap: configRef: apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 kind: KubeadmConfigTemplate name: {{ include "openstack-cluster.nodegroup.kct.name" (list $ $nodeGroup) }} infrastructureRef: - apiVersion: infrastructure.cluster.x-k8s.io/v1alpha5 + apiVersion: infrastructure.cluster.x-k8s.io/v1alpha6 kind: OpenStackMachineTemplate name: {{ include "openstack-cluster.nodegroup.mt.name" (list $ $nodeGroup) }} nodeDrainTimeout: {{ $nodeGroup.nodeDrainTimeout }} 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 c7fe642..bdd7209 100644 --- a/charts/openstack-cluster/templates/node-group/openstack-machine-template.yaml +++ b/charts/openstack-cluster/templates/node-group/openstack-machine-template.yaml @@ -47,7 +47,7 @@ template: {{- range $nodeGroupOverrides := .Values.nodeGroups }} {{- $nodeGroup := deepCopy $.Values.nodeGroupDefaults | mustMerge $nodeGroupOverrides }} --- -apiVersion: infrastructure.cluster.x-k8s.io/v1alpha5 +apiVersion: infrastructure.cluster.x-k8s.io/v1alpha6 kind: OpenStackMachineTemplate metadata: name: {{ include "openstack-cluster.nodegroup.mt.name" (list $ $nodeGroup) }} diff --git a/charts/openstack-cluster/values.yaml b/charts/openstack-cluster/values.yaml index 4f677bb..9693cab 100644 --- a/charts/openstack-cluster/values.yaml +++ b/charts/openstack-cluster/values.yaml @@ -105,8 +105,10 @@ apiServer: controlPlane: # The failure domains to use for control plane nodes # If given, should be a list of availability zones - # If not given, all availability zones will be considered for control plane nodes + # Only used when omitFailureDomain = false failureDomains: + # Indicates whether the failure domain should be omitted from control plane nodes + omitFailureDomain: true # The number of control plane machines to deploy # For high-availability, this should be greater than 1 # For etcd quorum, it should be odd - usually 3, or 5 for very large clusters @@ -198,7 +200,7 @@ nodeGroupDefaults: # Indicates if the node group should be autoscaled autoscale: false # The failure domain for the node group - failureDomain: nova + failureDomain: # The flavor to use for machines in the node group machineFlavor: # The default networks and ports for worker nodes