From 14ad789419f67607f59c8f772538905129e59d06 Mon Sep 17 00:00:00 2001 From: lokielse Date: Mon, 10 Nov 2025 22:50:57 +0800 Subject: [PATCH 1/3] feat(chart): Add flexible image tag configuration with priority-based overrides --- .../kai-scheduler/templates/crd-upgrader.yaml | 2 +- .../kai-scheduler/templates/kai-config.yaml | 16 ++++++++-------- .../templates/services/operator.yaml | 4 ++-- deployments/kai-scheduler/values.yaml | 13 ++++++++++++- 4 files changed, 23 insertions(+), 12 deletions(-) diff --git a/deployments/kai-scheduler/templates/crd-upgrader.yaml b/deployments/kai-scheduler/templates/crd-upgrader.yaml index 97dbf05b3..f9e214c84 100644 --- a/deployments/kai-scheduler/templates/crd-upgrader.yaml +++ b/deployments/kai-scheduler/templates/crd-upgrader.yaml @@ -30,7 +30,7 @@ spec: {{- end }} containers: - name: upgrader - image: "{{ .Values.global.registry }}/{{ .Values.crdupgrader.image.name }}:{{ .Chart.Version }}" + image: "{{ .Values.global.registry }}/{{ .Values.crdupgrader.image.name }}:{{ .Values.crdupgrader.image.tag | default .Values.global.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.crdupgrader.image.pullPolicy }} {{- if (lookup "apiextensions.k8s.io/v1" "CustomResourceDefinition" "" "clusterversions.config.openshift.io") }} securityContext: diff --git a/deployments/kai-scheduler/templates/kai-config.yaml b/deployments/kai-scheduler/templates/kai-config.yaml index 40a377d8f..3bcd926a3 100644 --- a/deployments/kai-scheduler/templates/kai-config.yaml +++ b/deployments/kai-scheduler/templates/kai-config.yaml @@ -46,7 +46,7 @@ spec: image: name: {{ .Values.binder.image.name }} repository: {{ .Values.global.registry }} - tag: {{ .Chart.Version }} + tag: {{ .Values.binder.image.tag | default .Values.global.tag | default .Chart.AppVersion }} pullPolicy: {{ .Values.binder.image.pullPolicy | default .Values.global.imagePullPolicy }} {{- if .Values.binder.resources }} resources: @@ -70,7 +70,7 @@ spec: image: name: {{ .Values.podgroupcontroller.image.name }} repository: {{ .Values.global.registry }} - tag: {{ .Chart.Version }} + tag: {{ .Values.podgroupcontroller.image.tag | default .Values.global.tag | default .Chart.AppVersion }} pullPolicy: {{ .Values.podgroupcontroller.image.pullPolicy | default .Values.global.imagePullPolicy }} {{- if .Values.podgroupcontroller.resources }} resources: @@ -87,7 +87,7 @@ spec: image: name: {{ .Values.queuecontroller.image.name }} repository: {{ .Values.global.registry }} - tag: {{ .Chart.Version }} + tag: {{ .Values.queuecontroller.image.tag | default .Values.global.tag | default .Chart.AppVersion }} pullPolicy: {{ .Values.queuecontroller.image.pullPolicy | default .Values.global.imagePullPolicy }} {{- if .Values.queuecontroller.resources }} resources: @@ -104,7 +104,7 @@ spec: image: name: {{ .Values.admission.image.name }} repository: {{ .Values.global.registry }} - tag: {{ .Chart.Version }} + tag: {{ .Values.admission.image.tag | default .Values.global.tag | default .Chart.AppVersion }} pullPolicy: {{ .Values.admission.image.pullPolicy | default .Values.global.imagePullPolicy }} {{- if .Values.admission.resources }} resources: @@ -129,7 +129,7 @@ spec: image: name: {{ .Values.nodescaleadjuster.image.name }} repository: {{ .Values.global.registry }} - tag: {{ .Chart.Version }} + tag: {{ .Values.nodescaleadjuster.image.tag | default .Values.global.tag | default .Chart.AppVersion }} pullPolicy: {{ .Values.nodescaleadjuster.image.pullPolicy | default .Values.global.imagePullPolicy }} {{- if .Values.nodescaleadjuster.resources }} resources: @@ -140,11 +140,11 @@ spec: {{- toYaml .Values.nodescaleadjuster.affinity | nindent 8 }} {{- end }} args: - nodeScaleNamespace: {{ .Values.nodescaleadjuster.scalingPodNamespace }} + nodeScaleNamespace: {{ .Values.nodescaleadjuster.scalingPodNamespace }} scalingPodImage: name: {{ .Values.nodescaleadjuster.scalingPodImage.name }} repository: {{ .Values.global.registry }} - tag: {{ .Chart.Version }} + tag: {{ .Values.nodescaleadjuster.scalingPodImage.tag | default .Values.global.tag | default .Chart.AppVersion }} pullPolicy: {{ .Values.nodescaleadjuster.scalingPodImage.pullPolicy | default .Values.global.imagePullPolicy }} scheduler: @@ -152,7 +152,7 @@ spec: image: name: {{ .Values.scheduler.image.name }} repository: {{ .Values.global.registry }} - tag: {{ .Chart.Version }} + tag: {{ .Values.scheduler.image.tag | default .Values.global.tag | default .Chart.AppVersion }} pullPolicy: {{ .Values.scheduler.image.pullPolicy | default .Values.global.imagePullPolicy }} {{- if .Values.scheduler.resources }} resources: diff --git a/deployments/kai-scheduler/templates/services/operator.yaml b/deployments/kai-scheduler/templates/services/operator.yaml index c46769305..dbb248b25 100644 --- a/deployments/kai-scheduler/templates/services/operator.yaml +++ b/deployments/kai-scheduler/templates/services/operator.yaml @@ -21,7 +21,7 @@ spec: serviceAccountName: kai-operator containers: - name: operator - image: {{ .Values.global.registry }}/{{ .Values.operator.image.name }}:{{ .Chart.Version }} + image: {{ .Values.global.registry }}/{{ .Values.operator.image.name }}:{{ .Values.operator.image.tag | default .Values.global.tag | default .Chart.AppVersion }} imagePullPolicy: {{ .Values.operator.image.pullPolicy }} resources: {{- toYaml .Values.operator.resources | nindent 12 }} @@ -44,7 +44,7 @@ spec: - name: MS_REPOSITORY value: {{ .Values.global.registry }} - name: MS_TAG - value: {{ .Chart.Version }} + value: {{ .Values.operator.image.tag | default .Values.global.tag | default .Chart.AppVersion }} ports: - containerPort: 8080 name: metrics diff --git a/deployments/kai-scheduler/values.yaml b/deployments/kai-scheduler/values.yaml index 92bac5386..449f6d585 100644 --- a/deployments/kai-scheduler/values.yaml +++ b/deployments/kai-scheduler/values.yaml @@ -25,6 +25,7 @@ operator: image: name: operator pullPolicy: IfNotPresent + # tag: "" # Optional: Override global.tag or Chart.Version replicaCount: 1 metricsBindAddress: ":8080" probeBindAddress: ":8081" @@ -35,6 +36,7 @@ podgrouper: image: name: podgrouper pullPolicy: IfNotPresent + # tag: "" # Optional: Override global.tag or Chart.Version queueLabelKey: "kai.scheduler/queue" affinity: {} @@ -42,14 +44,17 @@ podgroupcontroller: image: name: podgroupcontroller pullPolicy: IfNotPresent + # tag: "" # Optional: Override global.tag or Chart.Version affinity: {} binder: name: binder image: name: binder pullPolicy: IfNotPresent + # tag: "" # Optional: Override global.tag or Chart.Version resourceReservationImage: name: resourcereservation + # tag: "" # Optional: Override global.tag or Chart.Version ports: metricsPort: 8080 affinity: {} @@ -57,6 +62,7 @@ scheduler: image: name: scheduler pullPolicy: IfNotPresent + # tag: "" # Optional: Override global.tag or Chart.Version placementStrategy: binpack ports: metricsPort: 8080 @@ -65,14 +71,16 @@ queuecontroller: image: name: queuecontroller pullPolicy: IfNotPresent + # tag: "" # Optional: Override global.tag or Chart.Version certSecretName: queuecontroller-webhook-tls-secret - affinity: {} + affinity: {} admission: name: kai-admission image: name: admission pullPolicy: IfNotPresent + # tag: "" # Optional: Override global.tag or Chart.Version certSecretName: admission-webhook-tls-secret ports: webhookPort: 9443 @@ -86,9 +94,11 @@ nodescaleadjuster: image: name: nodescaleadjuster pullPolicy: IfNotPresent + # tag: "" # Optional: Override global.tag or Chart.Version scalingPodImage: name: scalingpod pullPolicy: IfNotPresent + # tag: "" # Optional: Override global.tag or Chart.Version scalingPodNamespace: kai-scale-adjust affinity: {} @@ -96,6 +106,7 @@ crdupgrader: image: name: crd-upgrader pullPolicy: IfNotPresent + # tag: "" # Optional: Override global.tag or Chart.Version defaultQueue: createDefaultQueue: true From d96fcd700f3e50d299cf6afed17faf3580a4f8de Mon Sep 17 00:00:00 2001 From: lokielse Date: Mon, 10 Nov 2025 22:58:01 +0800 Subject: [PATCH 2/3] fix(values): Update comments to reflect correct versioning for image tag overrides --- deployments/kai-scheduler/values.yaml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/deployments/kai-scheduler/values.yaml b/deployments/kai-scheduler/values.yaml index 449f6d585..d1cd04fb5 100644 --- a/deployments/kai-scheduler/values.yaml +++ b/deployments/kai-scheduler/values.yaml @@ -25,7 +25,7 @@ operator: image: name: operator pullPolicy: IfNotPresent - # tag: "" # Optional: Override global.tag or Chart.Version + # tag: "" # Optional: Override global.tag or Chart.AppVersion replicaCount: 1 metricsBindAddress: ":8080" probeBindAddress: ":8081" @@ -36,7 +36,7 @@ podgrouper: image: name: podgrouper pullPolicy: IfNotPresent - # tag: "" # Optional: Override global.tag or Chart.Version + # tag: "" # Optional: Override global.tag or Chart.AppVersion queueLabelKey: "kai.scheduler/queue" affinity: {} @@ -44,17 +44,17 @@ podgroupcontroller: image: name: podgroupcontroller pullPolicy: IfNotPresent - # tag: "" # Optional: Override global.tag or Chart.Version + # tag: "" # Optional: Override global.tag or Chart.AppVersion affinity: {} binder: name: binder image: name: binder pullPolicy: IfNotPresent - # tag: "" # Optional: Override global.tag or Chart.Version + # tag: "" # Optional: Override global.tag or Chart.AppVersion resourceReservationImage: name: resourcereservation - # tag: "" # Optional: Override global.tag or Chart.Version + # tag: "" # Optional: Override global.tag or Chart.AppVersion ports: metricsPort: 8080 affinity: {} @@ -62,7 +62,7 @@ scheduler: image: name: scheduler pullPolicy: IfNotPresent - # tag: "" # Optional: Override global.tag or Chart.Version + # tag: "" # Optional: Override global.tag or Chart.AppVersion placementStrategy: binpack ports: metricsPort: 8080 @@ -71,7 +71,7 @@ queuecontroller: image: name: queuecontroller pullPolicy: IfNotPresent - # tag: "" # Optional: Override global.tag or Chart.Version + # tag: "" # Optional: Override global.tag or Chart.AppVersion certSecretName: queuecontroller-webhook-tls-secret affinity: {} @@ -80,7 +80,7 @@ admission: image: name: admission pullPolicy: IfNotPresent - # tag: "" # Optional: Override global.tag or Chart.Version + # tag: "" # Optional: Override global.tag or Chart.AppVersion certSecretName: admission-webhook-tls-secret ports: webhookPort: 9443 @@ -94,11 +94,11 @@ nodescaleadjuster: image: name: nodescaleadjuster pullPolicy: IfNotPresent - # tag: "" # Optional: Override global.tag or Chart.Version + # tag: "" # Optional: Override global.tag or Chart.AppVersion scalingPodImage: name: scalingpod pullPolicy: IfNotPresent - # tag: "" # Optional: Override global.tag or Chart.Version + # tag: "" # Optional: Override global.tag or Chart.AppVersion scalingPodNamespace: kai-scale-adjust affinity: {} @@ -106,7 +106,7 @@ crdupgrader: image: name: crd-upgrader pullPolicy: IfNotPresent - # tag: "" # Optional: Override global.tag or Chart.Version + # tag: "" # Optional: Override global.tag or Chart.AppVersion defaultQueue: createDefaultQueue: true From e757bf1c874e393372614057c371a6d0ecc4a266 Mon Sep 17 00:00:00 2001 From: lokielse Date: Tue, 11 Nov 2025 10:06:23 +0800 Subject: [PATCH 3/3] fix(values): Remove default image tag to enforce explicit configuration --- deployments/kai-scheduler/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deployments/kai-scheduler/values.yaml b/deployments/kai-scheduler/values.yaml index d1cd04fb5..e9ea4e326 100644 --- a/deployments/kai-scheduler/values.yaml +++ b/deployments/kai-scheduler/values.yaml @@ -3,7 +3,7 @@ global: registry: registry/local/kai-scheduler - tag: latest + tag: "" imagePullPolicy: IfNotPresent securityContext: {} imagePullSecrets: []