Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(t8s-cluster/management-cluster): openstackImageNamePrefix #625

Merged
merged 3 commits into from
Mar 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/t8s-cluster/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ sourceRef:
{{- $hasGPUFlavor = true -}}
{{- end -}}
{{- end -}}
{{- $hasGPUFlavor -}}
{{- $hasGPUFlavor | ternary true "" -}}
cwrau marked this conversation as resolved.
Show resolved Hide resolved
{{- end -}}
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,6 @@ spec:
{{- end }}
bastion:
enabled: false
{{- with .Values.openstackImageNamePrefix }}
openStackImageNamePrefix: {{ . | quote }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down
18 changes: 3 additions & 15 deletions charts/t8s-cluster/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -269,6 +256,7 @@
"metadata",
"version",
"controlPlane",
"openstackImageNamePrefix",
"nodePools"
],
"additionalProperties": false,
Expand Down
6 changes: 2 additions & 4 deletions charts/t8s-cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -69,6 +69,4 @@ sshKeyName: null

cni: cilium

imageNameTemplate:
computePlane: t8s-engine-{{ .builtin.machineDeployment.version }}
controlPlane: t8s-engine-{{ .builtin.controlPlane.version }}
openstackImageNamePrefix: ""