Skip to content

Commit

Permalink
Support clusterLabels in OpenStack (#931)
Browse files Browse the repository at this point in the history
* Add clusterLabel support to OpenStack templates so MultiClusterService deployments work.
* Bump OpenStack chart version
* Update values.schema.json and example dev templates with clusterLabel
* Add empty clusterLabels example to OpenStack dev template
  • Loading branch information
wkonitzer authored Jan 28, 2025
1 parent c486cd1 commit cae713c
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 4 deletions.
3 changes: 2 additions & 1 deletion config/dev/openstack-clusterdeployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ metadata:
name: openstack-dev
namespace: ${NAMESPACE}
spec:
template: openstack-standalone-cp-0-0-3
template: openstack-standalone-cp-0-0-5
credential: openstack-cluster-identity-cred
config:
clusterLabels: {}
controlPlaneNumber: 1
workersNumber: 1
controlPlane:
Expand Down
2 changes: 1 addition & 1 deletion templates/cluster/openstack-standalone-cp/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.0.4
version: 0.0.5
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ apiVersion: cluster.x-k8s.io/v1beta1
kind: Cluster
metadata:
name: {{ include "cluster.name" . }}
{{- if .Values.clusterLabels }}
labels: {{- toYaml .Values.clusterLabels | nindent 4}}
{{- end }}
spec:
{{- with .Values.clusterNetwork }}
clusterNetwork:
Expand Down
6 changes: 6 additions & 0 deletions templates/cluster/openstack-standalone-cp/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@
}
}
},
"clusterLabels": {
"type": "object",
"description": "Labels to apply to the cluster",
"required": [],
"additionalProperties": true
},
"identityRef": {
"type": "object",
"description": "OpenStack cluster identity object reference",
Expand Down
2 changes: 2 additions & 0 deletions templates/cluster/openstack-standalone-cp/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ clusterNetwork:
- "10.96.0.0/12"
serviceDomain: "cluster.local"

clusterLabels: {}

identityRef:
name: ""
cloudName: ""
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
apiVersion: k0rdent.mirantis.com/v1alpha1
kind: ClusterTemplate
metadata:
name: openstack-standalone-cp-0-0-4
name: openstack-standalone-cp-0-0-5
annotations:
helm.sh/resource-policy: keep
spec:
helm:
chartSpec:
chart: openstack-standalone-cp
version: 0.0.4
version: 0.0.5
interval: 10m0s
sourceRef:
kind: HelmRepository
Expand Down

0 comments on commit cae713c

Please sign in to comment.