Skip to content

Commit

Permalink
feat: allow to add extra envs and preconfigure no_proxy variable
Browse files Browse the repository at this point in the history
  • Loading branch information
plaffitt committed Nov 16, 2023
1 parent 0d9d858 commit 9574d3e
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
12 changes: 12 additions & 0 deletions helm/kube-image-keeper/templates/controller-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,18 @@ spec:
{{- range .Values.architectures }}
- -arch={{- . }}
{{- end }}
env:
{{- $noProxy := list -}}
{{- range .Values.controllers.env }}
{{- if eq (lower .name) "no_proxy" }}
{{- $noProxy = (.value | replace " " "," | splitList ",") -}}
{{- else }}
- name: {{ .name }}
value: {{ .value }}
{{- end }}
{{- end }}
- name: no_proxy
value: {{ join "," (prepend $noProxy (printf "%s-registry" (include "kube-image-keeper.fullname" .))) }}
ports:
- containerPort: 9443
name: webhook-server
Expand Down
4 changes: 4 additions & 0 deletions helm/kube-image-keeper/templates/proxy-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ spec:
- -kube-api-rate-limit-qps={{ .qps }}
- -kube-api-rate-limit-burst={{ .burst }}
{{- end }}
{{- with .Values.proxy.env }}
env:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.proxy.resources }}
resources:
{{- toYaml . | nindent 12 }}
Expand Down
4 changes: 4 additions & 0 deletions helm/kube-image-keeper/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ controllers:
maxUnavailable: ""
# -- Affinity for the controller pod
affinity: {}
# -- Extra env variables for the controllers pod
env: []
resources:
requests:
# -- Cpu requests for the controller pod
Expand Down Expand Up @@ -141,6 +143,8 @@ proxy:
priorityClassName: system-node-critical
# -- Affinity for the proxy pod
affinity: {}
# -- Extra env variables for the proxy pod
env: []
resources:
requests:
# -- Cpu requests for the proxy pod
Expand Down

0 comments on commit 9574d3e

Please sign in to comment.