Skip to content

Commit c2ef57a

Browse files
committed
Support global image registry
- introduce `.global.imageRegistry` value to allow global configuration of the image registry - split up `image.repository` into `image.registry` and `image.repository` to allow separate configuration - use `image.registry` if `.global.imageRegistry` is not set Signed-off-by: Fiete Ostkamp <F.Ostkamp@web.de>
1 parent 002ddbb commit c2ef57a

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

helm/oauth2-proxy/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ kubeVersion: ">=1.16.0-0"
3232
annotations:
3333
artifacthub.io/changes: |
3434
- kind: added
35-
description: Add HTTPRoutes for Gateway API support
35+
description: Add .global.imageRegistry key to override image.registry
3636
links:
3737
- name: Github PR
38-
url: https://github.com/oauth2-proxy/manifests/pull/369
38+
url: https://github.com/oauth2-proxy/manifests/pull/367

helm/oauth2-proxy/templates/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ spec:
108108
{{- end }}
109109
containers:
110110
- name: {{ .Chart.Name }}
111-
image: "{{ .Values.image.repository }}:{{ include "oauth2-proxy.version" . }}"
111+
image: "{{ .Values.global.imageRegistry | default .Values.image.registry }}/{{ .Values.image.repository }}:{{ include "oauth2-proxy.version" . }}"
112112
imagePullPolicy: {{ .Values.image.pullPolicy }}
113113
{{- if .Values.image.command }}
114114
command:

helm/oauth2-proxy/values.yaml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
global: {}
2-
# To help compatibility with other charts which use global.imagePullSecrets.
3-
# global:
4-
# imagePullSecrets:
5-
# - name: pullSecret1
6-
# - name: pullSecret2
1+
global:
2+
# Global registry to pull the images from
3+
imageRegistry: ""
4+
# To help compatibility with other charts which use global.imagePullSecrets.
5+
imagePullSecrets: []
6+
# - name: pullSecret1
7+
# - name: pullSecret2
78

89
## Override the deployment namespace
910
##
@@ -74,7 +75,8 @@ alphaConfig:
7475
existingSecret: ~
7576

7677
image:
77-
repository: "quay.io/oauth2-proxy/oauth2-proxy"
78+
registry: "quay.io"
79+
repository: "oauth2-proxy/oauth2-proxy"
7880
# appVersion is used by default
7981
tag: ""
8082
pullPolicy: "IfNotPresent"

0 commit comments

Comments
 (0)