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

Chart: Add global.image.registry. #1689

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
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
27 changes: 14 additions & 13 deletions charts/secrets-store-csi-driver/README.md

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions charts/secrets-store-csi-driver/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,13 @@ Return the appropriate apiVersion for CSIDriver.
{{- print "storage.k8s.io/v1beta1" -}}
{{- end -}}
{{- end -}}

{{- define "sscd.imageRepository" -}}
{{- $globalImageRegistry := index . 0 -}}
{{- $repository := index . 1 -}}
{{- if hasPrefix "/" $repository -}}
{{ $globalImageRegistry }}{{ $repository }}
{{- else -}}
{{ $repository }}
{{- end -}}
{{- end -}}
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ spec:
restartPolicy: Never
containers:
- name: crds-upgrade
image: "{{ .Values.linux.crds.image.repository }}:{{ .Values.linux.crds.image.tag }}"
image: "{{ include "sscd.imageRepository" (list .Values.global.image.registry .Values.linux.crds.image.repository) }}:{{ .Values.linux.crds.image.tag }}"
args:
- apply
- -f
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ spec:
restartPolicy: Never
containers:
- name: crds-keep
image: "{{ .Values.linux.crds.image.repository }}:{{ .Values.linux.crds.image.tag }}"
image: "{{ include "sscd.imageRepository" (list .Values.global.image.registry .Values.linux.crds.image.repository) }}:{{ .Values.linux.crds.image.tag }}"
args:
- patch
- crd
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ spec:
containers:
- name: node-driver-registrar
{{- if .Values.windows.registrarImage.digest }}
image: "{{ .Values.windows.registrarImage.repository }}@{{ .Values.windows.registrarImage.digest }}"
image: "{{ include "sscd.imageRepository" (list .Values.global.image.registry .Values.windows.registrarImage.repository) }}@{{ .Values.windows.registrarImage.digest }}"
{{- else }}
image: "{{ .Values.windows.registrarImage.repository }}:{{ .Values.windows.registrarImage.tag }}"
image: "{{ include "sscd.imageRepository" (list .Values.global.image.registry .Values.windows.registrarImage.repository) }}:{{ .Values.windows.registrarImage.tag }}"
{{- end }}
args:
- --v={{ .Values.windows.registrar.logVerbosity }}
Expand All @@ -59,9 +59,9 @@ spec:
{{- end }}
- name: secrets-store
{{- if .Values.windows.image.digest }}
image: "{{ .Values.windows.image.repository }}@{{ .Values.windows.image.digest }}"
image: "{{ include "sscd.imageRepository" (list .Values.global.image.registry .Values.windows.image.repository) }}@{{ .Values.windows.image.digest }}"
{{- else }}
image: "{{ .Values.windows.image.repository }}:{{ .Values.windows.image.tag }}"
image: "{{ include "sscd.imageRepository" (list .Values.global.image.registry .Values.windows.image.repository) }}:{{ .Values.windows.image.tag }}"
{{- end }}
args:
{{- if .Values.logVerbosity }}
Expand Down Expand Up @@ -140,9 +140,9 @@ spec:
{{- end }}
- name: liveness-probe
{{- if .Values.windows.livenessProbeImage.digest }}
image: "{{ .Values.windows.livenessProbeImage.repository }}@{{ .Values.windows.livenessProbeImage.digest }}"
image: "{{ include "sscd.imageRepository" (list .Values.global.image.registry .Values.windows.livenessProbeImage.repository) }}@{{ .Values.windows.livenessProbeImage.digest }}"
{{- else }}
image: "{{ .Values.windows.livenessProbeImage.repository }}:{{ .Values.windows.livenessProbeImage.tag }}"
image: "{{ include "sscd.imageRepository" (list .Values.global.image.registry .Values.windows.livenessProbeImage.repository) }}:{{ .Values.windows.livenessProbeImage.tag }}"
{{- end }}
imagePullPolicy: {{ .Values.windows.livenessProbeImage.pullPolicy }}
args:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ spec:
containers:
- name: node-driver-registrar
{{- if .Values.linux.registrarImage.digest }}
image: "{{ .Values.linux.registrarImage.repository }}@{{ .Values.linux.registrarImage.digest }}"
image: "{{ include "sscd.imageRepository" (list .Values.global.image.registry .Values.linux.registrarImage.repository) }}@{{ .Values.linux.registrarImage.digest }}"
{{- else }}
image: "{{ .Values.linux.registrarImage.repository }}:{{ .Values.linux.registrarImage.tag }}"
image: "{{ include "sscd.imageRepository" (list .Values.global.image.registry .Values.linux.registrarImage.repository) }}:{{ .Values.linux.registrarImage.tag }}"
{{- end }}
args:
- --v={{ .Values.linux.registrar.logVerbosity }}
Expand All @@ -59,9 +59,9 @@ spec:
{{- end }}
- name: secrets-store
{{- if .Values.linux.image.digest }}
image: "{{ .Values.linux.image.repository }}@{{ .Values.linux.image.digest }}"
image: "{{ include "sscd.imageRepository" (list .Values.global.image.registry .Values.linux.image.repository) }}@{{ .Values.linux.image.digest }}"
{{- else }}
image: "{{ .Values.linux.image.repository }}:{{ .Values.linux.image.tag }}"
image: "{{ include "sscd.imageRepository" (list .Values.global.image.registry .Values.linux.image.repository) }}:{{ .Values.linux.image.tag }}"
{{- end }}
args:
{{- if .Values.logVerbosity }}
Expand Down Expand Up @@ -143,9 +143,9 @@ spec:
{{- end }}
- name: liveness-probe
{{- if .Values.linux.livenessProbeImage.digest }}
image: "{{ .Values.linux.livenessProbeImage.repository }}@{{ .Values.linux.livenessProbeImage.digest }}"
image: "{{ include "sscd.imageRepository" (list .Values.global.image.registry .Values.linux.livenessProbeImage.repository) }}@{{ .Values.linux.livenessProbeImage.digest }}"
{{- else }}
image: "{{ .Values.linux.livenessProbeImage.repository }}:{{ .Values.linux.livenessProbeImage.tag }}"
image: "{{ include "sscd.imageRepository" (list .Values.global.image.registry .Values.linux.livenessProbeImage.repository) }}:{{ .Values.linux.livenessProbeImage.tag }}"
{{- end }}
imagePullPolicy: {{ .Values.linux.livenessProbeImage.pullPolicy }}
args:
Expand Down
18 changes: 11 additions & 7 deletions charts/secrets-store-csi-driver/values.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
global:
image:
registry: registry.k8s.io

linux:
enabled: true
image:
repository: registry.k8s.io/csi-secrets-store/driver
repository: /csi-secrets-store/driver
tag: v1.4.7
#digest: sha256:
pullPolicy: IfNotPresent

crds:
enabled: true
image:
repository: registry.k8s.io/csi-secrets-store/driver-crds
repository: /csi-secrets-store/driver-crds
tag: v1.4.7
pullPolicy: IfNotPresent
## Optionally override resource limits for crd hooks(jobs)
Expand Down Expand Up @@ -44,7 +48,7 @@ linux:
memory: 100Mi

registrarImage:
repository: registry.k8s.io/sig-storage/csi-node-driver-registrar
repository: /sig-storage/csi-node-driver-registrar
tag: v2.11.1
#digest: sha256:
pullPolicy: IfNotPresent
Expand All @@ -60,7 +64,7 @@ linux:
logVerbosity: 5

livenessProbeImage:
repository: registry.k8s.io/sig-storage/livenessprobe
repository: /sig-storage/livenessprobe
tag: v2.13.1
#digest: sha256:
pullPolicy: IfNotPresent
Expand Down Expand Up @@ -109,7 +113,7 @@ linux:
windows:
enabled: false
image:
repository: registry.k8s.io/csi-secrets-store/driver
repository: /csi-secrets-store/driver
tag: v1.4.7
#digest: sha256:
pullPolicy: IfNotPresent
Expand All @@ -135,7 +139,7 @@ windows:
memory: 100Mi

registrarImage:
repository: registry.k8s.io/sig-storage/csi-node-driver-registrar
repository: /sig-storage/csi-node-driver-registrar
tag: v2.11.1
#digest: sha256:
pullPolicy: IfNotPresent
Expand All @@ -151,7 +155,7 @@ windows:
logVerbosity: 5

livenessProbeImage:
repository: registry.k8s.io/sig-storage/livenessprobe
repository: /sig-storage/livenessprobe
tag: v2.13.1
#digest: sha256:
pullPolicy: IfNotPresent
Expand Down
Loading