From 83e9a8d9a1046a4ca2fde5081e9b4514779ae117 Mon Sep 17 00:00:00 2001 From: Chris Werner Rau Date: Tue, 14 Nov 2023 14:22:07 +0100 Subject: [PATCH 1/3] fix(t8s-cluster/management-cluster): openstackImageNamePrefix --- .../clusterClass/clusterClass.yaml | 4 ++-- charts/t8s-cluster/values.schema.json | 18 +++--------------- charts/t8s-cluster/values.yaml | 4 +--- 3 files changed, 6 insertions(+), 20 deletions(-) diff --git a/charts/t8s-cluster/templates/management-cluster/clusterClass/clusterClass.yaml b/charts/t8s-cluster/templates/management-cluster/clusterClass/clusterClass.yaml index dec148474..cac1c8cfd 100644 --- a/charts/t8s-cluster/templates/management-cluster/clusterClass/clusterClass.yaml +++ b/charts/t8s-cluster/templates/management-cluster/clusterClass/clusterClass.yaml @@ -120,7 +120,7 @@ spec: op: add path: /spec/template/spec/image valueFrom: - template: {{ .Values.imageNameTemplate.computePlane }} + template: {{ printf "t8s-engine-%s-{{ .builtin.machineDeployment.version }}" .Values.openstackImageNamePrefix }} selector: &imagePatchSelector apiVersion: {{ include "t8s-cluster.clusterClass.infrastructureApiVersion" (dict) }} kind: OpenStackMachineTemplate @@ -130,7 +130,7 @@ spec: - jsonPatches: - <<: *imagePatch valueFrom: - template: {{ .Values.imageNameTemplate.controlPlane }} + template: {{ printf "t8s-engine-%s-{{ .builtin.controlPlane.version }}" .Values.openstackImageNamePrefix }} selector: <<: *imagePatchSelector matchResources: diff --git a/charts/t8s-cluster/values.schema.json b/charts/t8s-cluster/values.schema.json index 847c43d9d..8551fabe7 100644 --- a/charts/t8s-cluster/values.schema.json +++ b/charts/t8s-cluster/values.schema.json @@ -244,21 +244,8 @@ "calico" ] }, - "imageNameTemplate": { - "type": "object", - "properties": { - "computePlane": { - "type": "string" - }, - "controlPlane": { - "type": "string" - } - }, - "required": [ - "computePlane", - "controlPlane" - ], - "additionalProperties": false + "openstackImageNamePrefix": { + "type": "string" }, "common": { "type": "object", @@ -269,6 +256,7 @@ "metadata", "version", "controlPlane", + "openstackImageNamePrefix", "nodePools" ], "additionalProperties": false, diff --git a/charts/t8s-cluster/values.yaml b/charts/t8s-cluster/values.yaml index 1c0c60fe7..bb649082f 100644 --- a/charts/t8s-cluster/values.yaml +++ b/charts/t8s-cluster/values.yaml @@ -69,6 +69,4 @@ sshKeyName: null cni: cilium -imageNameTemplate: - computePlane: t8s-engine-{{ .builtin.machineDeployment.version }} - controlPlane: t8s-engine-{{ .builtin.controlPlane.version }} +openstackImageNamePrefix: "" From d9dab826292a5e744096f84c1cb783dfa65332a6 Mon Sep 17 00:00:00 2001 From: Chris Werner Rau Date: Tue, 14 Nov 2023 14:23:26 +0100 Subject: [PATCH 2/3] chore(t8s-cluster): improve conditions --- charts/t8s-cluster/templates/_helpers.tpl | 2 +- charts/t8s-cluster/values.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/t8s-cluster/templates/_helpers.tpl b/charts/t8s-cluster/templates/_helpers.tpl index d57b0c45e..66c7f55da 100644 --- a/charts/t8s-cluster/templates/_helpers.tpl +++ b/charts/t8s-cluster/templates/_helpers.tpl @@ -30,5 +30,5 @@ sourceRef: {{- $hasGPUFlavor = true -}} {{- end -}} {{- end -}} - {{- $hasGPUFlavor -}} + {{- $hasGPUFlavor | ternary true "" -}} {{- end -}} diff --git a/charts/t8s-cluster/values.yaml b/charts/t8s-cluster/values.yaml index bb649082f..5d34611d5 100644 --- a/charts/t8s-cluster/values.yaml +++ b/charts/t8s-cluster/values.yaml @@ -10,7 +10,7 @@ global: url: https://helm.ngc.nvidia.com/nvidia charts: gpu-operator: 23.x.x - condition: '{{ eq (include "t8s-cluster.hasGPUNodes" (dict "context" $)) "true" }}' + condition: '{{ include "t8s-cluster.hasGPUNodes" (dict "context" $) }}' cloud-provider-openstack: url: https://kubernetes.github.io/cloud-provider-openstack cetic: From f636d43f6726b0d5bda56fac23ca743576662cc5 Mon Sep 17 00:00:00 2001 From: Chris Werner Rau Date: Mon, 20 Nov 2023 13:40:10 +0100 Subject: [PATCH 3/3] fix(t8s-cluster/management-cluster): add missing openstackImageNamePrefix field --- charts/t8s-cluster/templates/management-cluster/cluster.yaml | 3 +++ .../management-cluster/clusterClass/clusterClass.yaml | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/charts/t8s-cluster/templates/management-cluster/cluster.yaml b/charts/t8s-cluster/templates/management-cluster/cluster.yaml index e4a046f88..02f2a12f7 100644 --- a/charts/t8s-cluster/templates/management-cluster/cluster.yaml +++ b/charts/t8s-cluster/templates/management-cluster/cluster.yaml @@ -41,3 +41,6 @@ spec: {{- end }} bastion: enabled: false + {{- with .Values.openstackImageNamePrefix }} + openStackImageNamePrefix: {{ . | quote }} + {{- end }} diff --git a/charts/t8s-cluster/templates/management-cluster/clusterClass/clusterClass.yaml b/charts/t8s-cluster/templates/management-cluster/clusterClass/clusterClass.yaml index cac1c8cfd..2cf4fd8e3 100644 --- a/charts/t8s-cluster/templates/management-cluster/clusterClass/clusterClass.yaml +++ b/charts/t8s-cluster/templates/management-cluster/clusterClass/clusterClass.yaml @@ -120,7 +120,7 @@ spec: op: add path: /spec/template/spec/image valueFrom: - template: {{ printf "t8s-engine-%s-{{ .builtin.machineDeployment.version }}" .Values.openstackImageNamePrefix }} + template: {{ printf "t8s-engine-%s{{ .builtin.machineDeployment.version }}" .Values.openstackImageNamePrefix }} selector: &imagePatchSelector apiVersion: {{ include "t8s-cluster.clusterClass.infrastructureApiVersion" (dict) }} kind: OpenStackMachineTemplate @@ -130,7 +130,7 @@ spec: - jsonPatches: - <<: *imagePatch valueFrom: - template: {{ printf "t8s-engine-%s-{{ .builtin.controlPlane.version }}" .Values.openstackImageNamePrefix }} + template: {{ printf "t8s-engine-%s{{ .builtin.controlPlane.version }}" .Values.openstackImageNamePrefix }} selector: <<: *imagePatchSelector matchResources: