Skip to content

Commit 85ee352

Browse files
committed
feat: allow to add extra envs and preconfigure no_proxy variable
1 parent 78b277b commit 85ee352

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed

helm/kube-image-keeper/templates/controller-deployment.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,18 @@ spec:
5858
- -root-certificate-authorities=/etc/ssl/certs/registry-certificate-authorities/{{- . }}
5959
{{- end }}
6060
{{- end }}
61+
env:
62+
{{- $noProxy := list -}}
63+
{{- range .Values.controllers.env }}
64+
{{- if eq (lower .name) "no_proxy" }}
65+
{{- $noProxy = (.value | replace " " "," | splitList ",") -}}
66+
{{- else }}
67+
- name: {{ .name }}
68+
value: {{ .value }}
69+
{{- end }}
70+
{{- end }}
71+
- name: no_proxy
72+
value: {{ join "," (prepend $noProxy (printf "%s-registry" (include "kube-image-keeper.fullname" .))) }}
6173
ports:
6274
- containerPort: 9443
6375
name: webhook-server

helm/kube-image-keeper/templates/proxy-daemonset.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ spec:
5858
{{- end }}
5959
{{- end }}
6060
{{- if .Values.rootCertificateAuthorities }}
61+
{{- with .Values.proxy.env }}
62+
env:
63+
{{- toYaml . | nindent 12 }}
64+
{{- end }}
6165
volumeMounts:
6266
- mountPath: /etc/ssl/certs/registry-certificate-authorities
6367
name: registry-certificate-authorities

helm/kube-image-keeper/values.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ controllers:
5252
maxUnavailable: ""
5353
# -- Affinity for the controller pod
5454
affinity: {}
55+
# -- Extra env variables for the controllers pod
56+
env: []
5557
resources:
5658
requests:
5759
# -- Cpu requests for the controller pod
@@ -147,6 +149,8 @@ proxy:
147149
priorityClassName: system-node-critical
148150
# -- Affinity for the proxy pod
149151
affinity: {}
152+
# -- Extra env variables for the proxy pod
153+
env: []
150154
resources:
151155
requests:
152156
# -- Cpu requests for the proxy pod

0 commit comments

Comments
 (0)