Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Add init containers options to helm chart #3444

Merged
merged 9 commits into from
Jul 31, 2023
5 changes: 5 additions & 0 deletions .changesets/feat_add_helm_init_containers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
### Helm: add init containers to deployemt ([Issue #3248](https://github.com/apollographql/router/issues/3248))

This is a new option when starting the router, so that before starting another container runs and performs necessary tasks.

By [@laszlorostas](https://github.com/laszlorostas) in https://github.com/apollographql/router/pull/3444
4 changes: 4 additions & 0 deletions helm/chart/router/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ spec:
{{- if .Values.extraContainers }}
{{- include "common.tplvalues.render" (dict "value" .Values.extraContainers "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.initContainers }}
initContainers:
{{- include "common.tplvalues.render" (dict "value" .Values.initContainers "context" $) | nindent 8 }}
{{- end }}
{{- if or .Values.router.configuration .Values.extraVolumes }}
volumes:
{{- if .Values.router.configuration }}
Expand Down
8 changes: 8 additions & 0 deletions helm/chart/router/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,14 @@ containerPorts:
# - containerPort: 4001
extraContainers: []

# -- An array of init containers to include in the router pod
# Example:
# initContainers:
# - name: init-myservice
# image: busybox:1.28
# command: ["sh"]
initContainers: []

# -- A map of extra labels to apply to the router deploment and containers
# Example:
# extraLabels:
Expand Down