Skip to content
Open
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
6 changes: 6 additions & 0 deletions .changes/unreleased/Fixed-20260823-164850.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Fixed
body: fix operator imagePullPolicy ignoring global.imagePullPolicy
time: 2026-08-23T16:48:50.125518535+01:00
custom:
Author: dttung2905
Issue: ""
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ spec:
containers:
- name: deployer
image: "{{ .Values.kaiConfigDeployer.image.registry | default .Values.global.registry }}/{{ .Values.kaiConfigDeployer.image.name }}:{{ include "kai-scheduler.imageTag" (dict "root" $ "tag" .Values.kaiConfigDeployer.image.tag) }}"
imagePullPolicy: {{ .Values.kaiConfigDeployer.image.pullPolicy }}
imagePullPolicy: {{ .Values.kaiConfigDeployer.image.pullPolicy | default .Values.global.imagePullPolicy }}
{{- with .Values.kaiConfigDeployer.resources }}
resources:
{{- toYaml . | nindent 10 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ spec:
containers:
- name: deleter
image: "{{ .Values.global.registry }}/{{ .Values.postCleanup.image.name }}:{{ include "kai-scheduler.imageTag" (dict "root" $ "tag" .Values.postCleanup.image.tag) }}"
imagePullPolicy: {{ .Values.postCleanup.image.pullPolicy }}
imagePullPolicy: {{ .Values.postCleanup.image.pullPolicy | default .Values.global.imagePullPolicy }}
{{- with .Values.postCleanup.resources }}
resources:
{{- toYaml . | nindent 12 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ spec:
containers:
- name: upgrader
image: "{{ .Values.crdupgrader.image.registry | default .Values.global.registry }}/{{ .Values.crdupgrader.image.name }}:{{ include "kai-scheduler.imageTag" (dict "root" $ "tag" .Values.crdupgrader.image.tag) }}"
imagePullPolicy: {{ .Values.crdupgrader.image.pullPolicy }}
imagePullPolicy: {{ .Values.crdupgrader.image.pullPolicy | default .Values.global.imagePullPolicy }}
{{- with .Values.crdupgrader.resources }}
resources:
{{- toYaml . | nindent 10 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ spec:
containers:
- name: migration
image: "{{ .Values.global.registry }}/{{ .Values.topologyMigration.image.name }}:{{ include "kai-scheduler.imageTag" (dict "root" $ "tag" .Values.topologyMigration.image.tag) }}"
imagePullPolicy: {{ .Values.topologyMigration.image.pullPolicy }}
imagePullPolicy: {{ .Values.topologyMigration.image.pullPolicy | default .Values.global.imagePullPolicy }}
{{- with .Values.topologyMigration.resources }}
resources:
{{- toYaml . | nindent 10 }}
Expand Down
2 changes: 1 addition & 1 deletion deployments/kai-scheduler/templates/services/operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ spec:
containers:
- name: operator
image: {{ .Values.global.registry }}/{{ .Values.operator.image.name }}:{{ include "kai-scheduler.imageTag" (dict "root" $ "tag" .Values.operator.image.tag) }}
imagePullPolicy: {{ .Values.operator.image.pullPolicy }}
imagePullPolicy: {{ .Values.operator.image.pullPolicy | default .Values.global.imagePullPolicy }}
{{- with .Values.operator.resources }}
resources:
{{- toYaml . | nindent 12 }}
Expand Down
56 changes: 56 additions & 0 deletions deployments/kai-scheduler/tests/image_pull_policy_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Copyright 2026 NVIDIA CORPORATION
# SPDX-License-Identifier: Apache-2.0

suite: test imagePullPolicy falls back to global.imagePullPolicy

templates:
- services/operator.yaml
- hooks/post/kai-config-deployer/job.yaml
- hooks/post/post-delete-job.yaml
- hooks/pre/crd-upgrader.yaml
- hooks/pre/topology-migration/job.yaml
tests:
- it: should fall back to global.imagePullPolicy on the operator when unset
set:
global.imagePullPolicy: Always
operator.image.pullPolicy: null
asserts:
- equal:
path: spec.template.spec.containers[0].imagePullPolicy
value: Always
template: services/operator.yaml

- it: should prefer operator.image.pullPolicy over global.imagePullPolicy
set:
global.imagePullPolicy: Always
operator.image.pullPolicy: Never
asserts:
- equal:
path: spec.template.spec.containers[0].imagePullPolicy
value: Never
template: services/operator.yaml

- it: should fall back to global.imagePullPolicy on hook images when unset
set:
global.imagePullPolicy: Always
kaiConfigDeployer.image.pullPolicy: null
postCleanup.image.pullPolicy: null
crdupgrader.image.pullPolicy: null
topologyMigration.image.pullPolicy: null
asserts:
- equal:
path: spec.template.spec.containers[0].imagePullPolicy
value: Always
template: hooks/post/kai-config-deployer/job.yaml
- equal:
path: spec.template.spec.containers[0].imagePullPolicy
value: Always
template: hooks/post/post-delete-job.yaml
- equal:
path: spec.template.spec.containers[0].imagePullPolicy
value: Always
template: hooks/pre/crd-upgrader.yaml
- equal:
path: spec.template.spec.containers[0].imagePullPolicy
value: Always
template: hooks/pre/topology-migration/job.yaml