Skip to content

Commit

Permalink
Feat: Add init containers options to helm chart (#3444)
Browse files Browse the repository at this point in the history
*The init container option created in the router's helm chart*

Feature  #3248

---------

Co-authored-by: Rostás László <[email protected]>
Co-authored-by: Gary Pennington <[email protected]>
  • Loading branch information
3 people authored Jul 31, 2023
1 parent 397cf91 commit 55743df
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
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

0 comments on commit 55743df

Please sign in to comment.