Skip to content

Commit

Permalink
feat(t8s-cluster/management-cluster): make field availabilityZone opt…
Browse files Browse the repository at this point in the history
…ional (#592)

This allows [OpenStack to distribute it
better](https://gitlab.teuto.net/4teuto/ops/k8s/t8s-engine/-/issues/9#note_122490)

And more often than not the user doesn't care about the availabilityZone
anyways

Depends on
https://gitlab.teuto.net/4teuto/ops/k8s/t8s-engine/-/merge_requests/659
  • Loading branch information
cwrau authored Sep 27, 2023
1 parent edffdc9 commit f94fc7a
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 4 deletions.
2 changes: 2 additions & 0 deletions charts/t8s-cluster/templates/management-cluster/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ spec:
clusterClass: {{ $.Release.Name }}
workers: {{- range $name, $machineDeploymentClass := .Values.workers }}
{{ $name -}}:
{{- if $machineDeploymentClass.availabilityZone }}
availabilityZone: {{ $machineDeploymentClass.availabilityZone | quote }}
{{- end }}
flavor: {{ $machineDeploymentClass.flavor | quote }}
replicas: {{ $machineDeploymentClass.replicas }}
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- define "t8s-cluster.clusterClass.infrastructureApiVersion" -}}
infrastructure.cluster.x-k8s.io/v1alpha6
infrastructure.cluster.x-k8s.io/v1alpha7
{{- end -}}

{{- define "t8s-cluster.clusterClass.cloudName" -}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- if false }}
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha6
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha7
{{- else }}
apiVersion: {{ include "t8s-cluster.clusterClass.infrastructureApiVersion" $ }}
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{- range $name, $machineDeploymentClass := (merge (deepCopy .Values.workers) (dict "control-plane" .Values.controlPlane)) }}
{{- if false }}
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha6
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha7
{{- else }}
apiVersion: {{ include "t8s-cluster.clusterClass.infrastructureApiVersion" $ }}
{{- end }}
Expand Down
1 change: 0 additions & 1 deletion charts/t8s-cluster/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@
"additionalProperties": false,
"required": [
"replicas",
"availabilityZone",
"flavor"
]
}
Expand Down

0 comments on commit f94fc7a

Please sign in to comment.