longhorn: upgrade from 1.9.0 to 1.12.0 (with intermediate releases)
Change-Id: Ice8f4e8f7e073023ab274c83154d9368525f9231
diff --git a/charts/longhorn/templates/uninstall-job.yaml b/charts/longhorn/templates/uninstall-job.yaml
index 1ab4620..de660e1 100644
--- a/charts/longhorn/templates/uninstall-job.yaml
+++ b/charts/longhorn/templates/uninstall-job.yaml
@@ -17,7 +17,7 @@
spec:
containers:
- name: longhorn-uninstall
- image: {{ template "registry_url" . }}{{ .Values.image.longhorn.manager.repository }}:{{ .Values.image.longhorn.manager.tag }}
+ image: {{ with (coalesce .Values.global.imageRegistry (include "registry_url" .) .Values.image.longhorn.manager.registry) }}{{ . }}/{{ end }}{{ .Values.image.longhorn.manager.repository }}:{{ .Values.image.longhorn.manager.tag }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
command:
- longhorn-manager
@@ -28,10 +28,23 @@
valueFrom:
fieldRef:
fieldPath: metadata.namespace
+ {{- include "longhorn.timezoneEnv" . | nindent 8 }}
restartPolicy: Never
- {{- if .Values.privateRegistry.registrySecret }}
+ {{- with (coalesce .Values.global.imagePullSecrets .Values.privateRegistry.registrySecret) }}
imagePullSecrets:
- - name: {{ .Values.privateRegistry.registrySecret }}
+ {{- $imagePullSecrets := list }}
+ {{- if kindIs "string" . }}
+ {{- $imagePullSecrets = append $imagePullSecrets (dict "name" .) }}
+ {{- else }}
+ {{- range . }}
+ {{- if kindIs "string" . }}
+ {{- $imagePullSecrets = append $imagePullSecrets (dict "name" .) }}
+ {{- else }}
+ {{- $imagePullSecrets = append $imagePullSecrets . }}
+ {{- end }}
+ {{- end }}
+ {{- end }}
+ {{- toYaml $imagePullSecrets | nindent 8 }}
{{- end }}
{{- if .Values.longhornManager.priorityClass }}
priorityClassName: {{ .Values.longhornManager.priorityClass | quote }}