Skip to content

Commit

Permalink
Merge pull request #18 from guenaelthiriet/feature/make-envoy-init-co…
Browse files Browse the repository at this point in the history
…ntainer-configurable

Make envoy proxy initContainer configurable
  • Loading branch information
slamdev authored Nov 15, 2021
2 parents 574b1b3 + 933c532 commit 83fab20
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
5 changes: 3 additions & 2 deletions charts/envoy/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,12 @@ spec:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
initContainers:
- name: preprocess-config
image: alpine:3.12.4
image: "{{ .Values.initContainer.image.repository }}:{{ .Values.initContainer.image.tag }}"
imagePullPolicy: {{ .Values.initContainer.image.pullPolicy }}
args:
- sh
- -c
- apk add perl && cp /opt/envoy.yaml.tpl /config/envoy.yaml && perl -pi -e 's/ENV_([_A-Z0-9]+)_ENV/$ENV{$1}/g' /config/envoy.yaml
- {{ .Values.initContainer.command }}
{{- with .Values.env }}
env:
{{- toYaml . | nindent 12 }}
Expand Down
10 changes: 10 additions & 0 deletions charts/envoy/values.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
initContainer:
image:
# initContainer.image.repository -- initContainer image repository
repository: alpine
# initContainer.image.tag -- initContainer image tag
tag: 3.12.4
# initContainer.image.pullPolicy -- initContainer image pull policy
pullPolicy: IfNotPresent
command: "apk add perl && cp /opt/envoy.yaml.tpl /config/envoy.yaml && perl -pi -e 's/ENV_([_A-Z0-9]+)_ENV/$ENV{$1}/g' /config/envoy.yaml"

# replicaCount -- number of replicas for haproxy deployment.
replicaCount: 1

Expand Down

0 comments on commit 83fab20

Please sign in to comment.