From f37636ce2a8859ff1b5b6c4e12c321083dd31b3e Mon Sep 17 00:00:00 2001 From: Kyle Squizzato Date: Thu, 7 Nov 2024 14:22:08 -0800 Subject: [PATCH] Wrap uses of .Values.extensions.imageRepository with conditional Signed-off-by: Kyle Squizzato --- .../aws-hosted-cp/templates/k0smotroncontrolplane.yaml | 5 ++++- .../aws-standalone-cp/templates/k0scontrolplane.yaml | 4 ++++ .../templates/k0smotroncontrolplane.yaml | 6 ++++++ .../azure-standalone-cp/templates/k0scontrolplane.yaml | 6 ++++++ .../templates/k0smotroncontrolplane.yaml | 8 ++++++++ .../templates/k0scontrolplane.yaml | 10 ++++++++++ templates/service/ingress-nginx-4-11-0/values.yaml | 3 --- templates/service/ingress-nginx-4-11-3/values.yaml | 3 --- templates/service/kyverno/values.yaml | 3 --- 9 files changed, 38 insertions(+), 10 deletions(-) delete mode 100644 templates/service/ingress-nginx-4-11-0/values.yaml delete mode 100644 templates/service/ingress-nginx-4-11-3/values.yaml delete mode 100644 templates/service/kyverno/values.yaml diff --git a/templates/cluster/aws-hosted-cp/templates/k0smotroncontrolplane.yaml b/templates/cluster/aws-hosted-cp/templates/k0smotroncontrolplane.yaml index 315525e0f..3460717d1 100644 --- a/templates/cluster/aws-hosted-cp/templates/k0smotroncontrolplane.yaml +++ b/templates/cluster/aws-hosted-cp/templates/k0smotroncontrolplane.yaml @@ -45,7 +45,9 @@ spec: version: "0.0.8" values: | image: + {{- if .Values.extensions.imageRepository }} repository: {{ .Values.extensions.imageRepository }} + {{- end }} tag: v1.30.3 args: - --v=2 @@ -62,6 +64,7 @@ spec: chartname: aws-ebs-csi-driver/aws-ebs-csi-driver version: 2.33.0 values: | + {{- if .Values.extensions.imageRepository }} image: repository: {{ .Values.extensions.imageRepository }} sidecars: @@ -86,7 +89,7 @@ spec: volumemodifier: image: repository: {{ .Values.extensions.imageRepository }} - # TODO + {{- end }} defaultStorageClass: enabled: true node: diff --git a/templates/cluster/aws-standalone-cp/templates/k0scontrolplane.yaml b/templates/cluster/aws-standalone-cp/templates/k0scontrolplane.yaml index e7875bec6..f1992609e 100644 --- a/templates/cluster/aws-standalone-cp/templates/k0scontrolplane.yaml +++ b/templates/cluster/aws-standalone-cp/templates/k0scontrolplane.yaml @@ -48,7 +48,9 @@ spec: nodeSelector: node-role.kubernetes.io/control-plane: "true" image: + {{- if .Values.extensions.imageRepository }} repository: {{ .Values.extensions.imageRepository }} + {{- end }} tag: v1.30.3 args: - --v=2 @@ -61,6 +63,7 @@ spec: chartname: aws-ebs-csi-driver/aws-ebs-csi-driver version: 2.33.0 values: | + {{- if .Values.extensions.imageRepository }} image: repository: {{ .Values.extensions.imageRepository }} sidecars: @@ -85,6 +88,7 @@ spec: volumemodifier: image: repository: {{ .Values.extensions.imageRepository }} + {{- end }} defaultStorageClass: enabled: true node: diff --git a/templates/cluster/azure-hosted-cp/templates/k0smotroncontrolplane.yaml b/templates/cluster/azure-hosted-cp/templates/k0smotroncontrolplane.yaml index 9fbf324b0..a9bdcf710 100644 --- a/templates/cluster/azure-hosted-cp/templates/k0smotroncontrolplane.yaml +++ b/templates/cluster/azure-hosted-cp/templates/k0smotroncontrolplane.yaml @@ -48,17 +48,23 @@ spec: cloudConfigSecretName: azure-cloud-provider nodeSelector: node-role.kubernetes.io/control-plane: null + {{- if .Values.extensions.imageRepository }} imageRepository: {{ .Values.extensions.imageRepository }} + {{- end }} + {{- if .Values.extensions.imageRepository }} cloudNodeManager: imageRepository: {{ .Values.extensions.imageRepository }} + {{- end }} - name: azuredisk-csi-driver namespace: kube-system chartname: azuredisk-csi-driver/azuredisk-csi-driver version: 1.30.3 order: 2 values: | + {{- if .Values.extensions.imageRepository }} image: baseRepo: {{ .Values.extensions.imageRepository }} + {{- end }} controller: cloudConfigSecretName: azure-cloud-provider node: diff --git a/templates/cluster/azure-standalone-cp/templates/k0scontrolplane.yaml b/templates/cluster/azure-standalone-cp/templates/k0scontrolplane.yaml index b29597d2c..950891399 100644 --- a/templates/cluster/azure-standalone-cp/templates/k0scontrolplane.yaml +++ b/templates/cluster/azure-standalone-cp/templates/k0scontrolplane.yaml @@ -50,17 +50,23 @@ spec: cloudConfigSecretName: azure-cloud-provider nodeSelector: node-role.kubernetes.io/control-plane: "true" + {{- if .Values.extensions.imageRepository }} imageRepository: {{ .Values.extensions.imageRepository }} + {{- end }} + {{- if .Values.extensions.imageRepository }} cloudNodeManager: imageRepository: {{ .Values.extensions.imageRepository }} + {{- end }} - name: azuredisk-csi-driver namespace: kube-system chartname: azuredisk-csi-driver/azuredisk-csi-driver version: 1.30.3 order: 2 values: | + {{- if .Values.extensions.imageRepository }} image: baseRepo: {{ .Values.extensions.imageRepository }} + {{- end }} controller: cloudConfigSecretName: azure-cloud-provider node: diff --git a/templates/cluster/vsphere-hosted-cp/templates/k0smotroncontrolplane.yaml b/templates/cluster/vsphere-hosted-cp/templates/k0smotroncontrolplane.yaml index 5694a7673..8c7bee6bc 100644 --- a/templates/cluster/vsphere-hosted-cp/templates/k0smotroncontrolplane.yaml +++ b/templates/cluster/vsphere-hosted-cp/templates/k0smotroncontrolplane.yaml @@ -48,7 +48,9 @@ spec: enabled: false daemonset: affinity: null + {{- if .Values.extensions.imageRepository }} image: {{ .Values.extensions.imageRepository }}/cloud-provider-vsphere + {{- end }} tolerations: - effect: NoSchedule key: node.cloudprovider.kubernetes.io/uninitialized @@ -81,11 +83,16 @@ spec: enabled: true images: driver: + {{- if .Values.extensions.imageRepository }} repo: {{ .Values.extensions.imageRepository }}/csi-vsphere/driver + {{- end }} tag: v3.1.2 syncer: + {{- if .Values.extensions.imageRepository }} repo: {{ .Values.extensions.imageRepository }}/csi-vsphere/syncer + {{- end }} tag: v3.1.2 + {{- if .Values.extensions.imageRepository }} nodeDriverRegistrar: repo: {{ .Values.extensions.imageRepository }}/sig-storage/csi-node-driver-registrar csiAttacher: @@ -98,3 +105,4 @@ spec: repo: {{ .Values.extensions.imageRepository }}/sig-storage/csi-snapshotter livenessProbe: repo: {{ .Values.extensions.imageRepository }}/csi-vsphere/livenessprobe + {{- end }} diff --git a/templates/cluster/vsphere-standalone-cp/templates/k0scontrolplane.yaml b/templates/cluster/vsphere-standalone-cp/templates/k0scontrolplane.yaml index 132c01c63..35957fa31 100644 --- a/templates/cluster/vsphere-standalone-cp/templates/k0scontrolplane.yaml +++ b/templates/cluster/vsphere-standalone-cp/templates/k0scontrolplane.yaml @@ -47,8 +47,10 @@ spec: order: 1 namespace: kube-system values: | + {{- if .Values.extensions.imageRepository }} image: repository: {{ .Values.extensions.imageRepository }}/kube-vip + {{- end }} config: address: {{ .Values.controlPlaneEndpointIP }} env: @@ -76,7 +78,9 @@ spec: config: enabled: false daemonset: + {{- if .Values.extensions.imageRepository }} image: {{ .Values.extensions.imageRepository }}/cloud-provider-vsphere + {{- end }} tolerations: - effect: NoSchedule key: node.cloudprovider.kubernetes.io/uninitialized @@ -107,11 +111,16 @@ spec: enabled: true images: driver: + {{- if .Values.extensions.imageRepository }} repo: {{ .Values.extensions.imageRepository }}/csi-vsphere/driver + {{- end }} tag: v3.1.2 syncer: + {{- if .Values.extensions.imageRepository }} repo: {{ .Values.extensions.imageRepository }}/csi-vsphere/syncer + {{- end }} tag: v3.1.2 + {{- if .Values.extensions.imageRepository }} nodeDriverRegistrar: repo: {{ .Values.extensions.imageRepository }}/sig-storage/csi-node-driver-registrar csiAttacher: @@ -124,6 +133,7 @@ spec: repo: {{ .Values.extensions.imageRepository }}/sig-storage/csi-snapshotter livenessProbe: repo: {{ .Values.extensions.imageRepository }}/csi-vsphere/livenessprobe + {{- end }} machineTemplate: infrastructureRef: apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 diff --git a/templates/service/ingress-nginx-4-11-0/values.yaml b/templates/service/ingress-nginx-4-11-0/values.yaml deleted file mode 100644 index a118d0906..000000000 --- a/templates/service/ingress-nginx-4-11-0/values.yaml +++ /dev/null @@ -1,3 +0,0 @@ -global: - image: - registry: "" diff --git a/templates/service/ingress-nginx-4-11-3/values.yaml b/templates/service/ingress-nginx-4-11-3/values.yaml deleted file mode 100644 index a118d0906..000000000 --- a/templates/service/ingress-nginx-4-11-3/values.yaml +++ /dev/null @@ -1,3 +0,0 @@ -global: - image: - registry: "" diff --git a/templates/service/kyverno/values.yaml b/templates/service/kyverno/values.yaml deleted file mode 100644 index a118d0906..000000000 --- a/templates/service/kyverno/values.yaml +++ /dev/null @@ -1,3 +0,0 @@ -global: - image: - registry: ""