From 55743dfd64fd75ef9a4471c1a6ec437dad62d607 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20Rost=C3=A1s?= <90799211+laszlorostas@users.noreply.github.com> Date: Mon, 31 Jul 2023 17:40:52 +0200 Subject: [PATCH] Feat: Add init containers options to helm chart (#3444) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit *The init container option created in the router's helm chart* Feature #3248 --------- Co-authored-by: Rostás László Co-authored-by: Gary Pennington --- .changesets/feat_add_helm_init_containers.md | 5 +++++ helm/chart/router/templates/deployment.yaml | 4 ++++ helm/chart/router/values.yaml | 8 ++++++++ 3 files changed, 17 insertions(+) create mode 100644 .changesets/feat_add_helm_init_containers.md diff --git a/.changesets/feat_add_helm_init_containers.md b/.changesets/feat_add_helm_init_containers.md new file mode 100644 index 0000000000..e5d42b65f0 --- /dev/null +++ b/.changesets/feat_add_helm_init_containers.md @@ -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 diff --git a/helm/chart/router/templates/deployment.yaml b/helm/chart/router/templates/deployment.yaml index b1b8018d24..36587ea17a 100644 --- a/helm/chart/router/templates/deployment.yaml +++ b/helm/chart/router/templates/deployment.yaml @@ -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 }} diff --git a/helm/chart/router/values.yaml b/helm/chart/router/values.yaml index bb0320139c..6c8d6cd75b 100644 --- a/helm/chart/router/values.yaml +++ b/helm/chart/router/values.yaml @@ -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: