Skip to content

Commit

Permalink
Add controlPlaneAvailabilityZones and controlPlaneOmitAvailabilityZon…
Browse files Browse the repository at this point in the history
…e variables (#157)

Signed-off-by: Roman Hros <[email protected]>
  • Loading branch information
chess-knight authored Aug 6, 2024
1 parent 287ec47 commit 960597f
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions providers/openstack/scs/cluster-class/templates/cluster-class.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,22 @@ cre ate group names like oidc:engineering and oidc:infra."
type: integer
example: 1500
description: "NetworkMTU sets the maximum transmission unit (MTU) value to address fragmentation for the private network ID."
- name: controlPlaneAvailabilityZones
required: false
schema:
openAPIV3Schema:
type: array
example: ["nova"]
description: "ControlPlaneAvailabilityZones is the set of availability zones which control plane machines may be deployed to."
items:
type: string
- name: controlPlaneOmitAvailabilityZone
required: false
schema:
openAPIV3Schema:
type: boolean
example: true
description: "ControlPlaneOmitAvailabilityZone causes availability zone to be omitted when creating control plane nodes, allowing the Nova scheduler to make a decision on which availability zone to use based on other scheduling constraints."
patches:
- name: k8s_version
description: "Sets the openstack node image for workers and the controlplane to the cluster-api image with the version mentioned in spec.topology.version."
Expand Down Expand Up @@ -588,6 +604,34 @@ cre ate group names like oidc:engineering and oidc:infra."
path: "/spec/template/spec/networkMTU"
valueFrom:
variable: network_mtu
- name: controlPlaneAvailabilityZones
description: "Sets the availability zones which control plane machines may be deployed to."
enabledIf: {{ `"{{ if .controlPlaneAvailabilityZones }}true{{end}}"` }}
definitions:
- selector:
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: OpenStackClusterTemplate
matchResources:
infrastructureCluster: true
jsonPatches:
- op: add
path: "/spec/template/spec/controlPlaneAvailabilityZones"
valueFrom:
variable: controlPlaneAvailabilityZones
- name: controlPlaneOmitAvailabilityZone
description: "Causes availability zone to be omitted when creating control plane nodes."
enabledIf: {{ `"{{ if .controlPlaneOmitAvailabilityZone }}true{{end}}"` }}
definitions:
- selector:
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: OpenStackClusterTemplate
matchResources:
infrastructureCluster: true
jsonPatches:
- op: add
path: "/spec/template/spec/controlPlaneOmitAvailabilityZone"
valueFrom:
variable: controlPlaneOmitAvailabilityZone
- name: openstack_security_groups
description: "Sets the list of the openstack security groups for the worker and the controlplane instances."
enabledIf: {{ `"{{ if .openstack_security_groups }}true{{end}}"` }}
Expand Down

0 comments on commit 960597f

Please sign in to comment.