Skip to content

Commit

Permalink
Allow Helm Chart deploy image from digest
Browse files Browse the repository at this point in the history
GKE Binary Authorization only supports image pull by digest - [Ref](https://cloud.google.com/binary-authorization/docs/deploying-containers#deploy_the_container_image)
* if `.values.reloader.deployment.image.digest` is defined, pull image from digest
* otherwise pull image from tag
  • Loading branch information
CharmanderJieniJieni committed Nov 21, 2024
1 parent d4acec6 commit b433a2d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion deployments/kubernetes/chart/reloader/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
apiVersion: v1
name: reloader
description: Reloader chart that runs on kubernetes
version: 1.2.0
version: 1.2.1
appVersion: v1.2.0
keywords:
- Reloader
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,13 @@ spec:
containers:
{{- if $.Values.global.imageRegistry }}
- image: "{{ $.Values.global.imageRegistry }}/{{ .Values.reloader.deployment.image.base }}:{{ .Values.reloader.deployment.image.tag }}"
{{- else }}
{{- else }}
{{- if .Values.reloader.deployment.image.digest }}
- image: "{{ .Values.reloader.deployment.image.name }}@{{ .Values.reloader.deployment.image.digest }}"
{{- else }}
- image: "{{ .Values.reloader.deployment.image.name }}:{{ .Values.reloader.deployment.image.tag }}"
{{- end }}
{{- end }}
{{- end }}
imagePullPolicy: {{ .Values.reloader.deployment.image.pullPolicy }}
name: {{ template "reloader-fullname" . }}
env:
Expand Down
1 change: 1 addition & 0 deletions deployments/kubernetes/chart/reloader/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ reloader:
name: ghcr.io/stakater/reloader
base: stakater/reloader
tag: v1.2.0
# digest: sha256:1234567
pullPolicy: IfNotPresent
# Support for extra environment variables.
env:
Expand Down

0 comments on commit b433a2d

Please sign in to comment.