From 68cba18477427f2bd403bdbe7b49b0f76df8ea48 Mon Sep 17 00:00:00 2001 From: Lars Larsson Date: Thu, 15 Sep 2022 12:16:46 +0200 Subject: [PATCH] feat(charts/dex): add optional initContainers to deployment. --- charts/dex/Chart.yaml | 6 +++--- charts/dex/README.md | 1 + charts/dex/templates/deployment.yaml | 4 ++++ charts/dex/values.yaml | 4 ++++ 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/charts/dex/Chart.yaml b/charts/dex/Chart.yaml index 178d3054..99451fe0 100644 --- a/charts/dex/Chart.yaml +++ b/charts/dex/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 type: application name: dex -version: 0.10.0 +version: 0.10.1 appVersion: "2.33.0" kubeVersion: ">=1.14.0-0" description: OpenID Connect (OIDC) identity and OAuth 2.0 provider with pluggable connectors. @@ -21,8 +21,8 @@ maintainers: url: https://sagikazarmark.hu annotations: artifacthub.io/changes: | - - kind: changed - description: "Update Dex to 2.33.0" + - kind: added + description: Allow configuring initContainers for deployment. artifacthub.io/images: | - name: dex image: ghcr.io/dexidp/dex:v2.33.0 diff --git a/charts/dex/README.md b/charts/dex/README.md index 814717b4..60a630ab 100644 --- a/charts/dex/README.md +++ b/charts/dex/README.md @@ -123,6 +123,7 @@ ingress: | configSecret.create | bool | `true` | Enable creating a secret from the values passed to `config`. If set to false, name must point to an existing secret. | | configSecret.name | string | `""` | The name of the secret to mount as configuration in the pod. If not set and create is true, a name is generated using the fullname template. Must point to secret that contains at least a `config.yaml` key. | | config | object | `{}` | Application configuration. See the [official documentation](https://dexidp.io/docs/). | +| initContainers | list | `[]` | [Init Containers](https://kubernetes.io/docs/concepts/workloads/pods/init-containers/). See the [API reference](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#containers) for details. | | volumes | list | `[]` | Additional storage [volumes](https://kubernetes.io/docs/concepts/storage/volumes/). See the [API reference](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#volumes-1) for details. | | volumeMounts | list | `[]` | Additional [volume mounts](https://kubernetes.io/docs/tasks/configure-pod-container/configure-volume-storage/). See the [API reference](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#volumes-1) for details. | | envFrom | list | `[]` | Additional environment variables mounted from [secrets](https://kubernetes.io/docs/concepts/configuration/secret/#using-secrets-as-environment-variables) or [config maps](https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#configure-all-key-value-pairs-in-a-configmap-as-container-environment-variables). See the [API reference](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#environment-variables) for details. | diff --git a/charts/dex/templates/deployment.yaml b/charts/dex/templates/deployment.yaml index 1f3ad4b8..7c49552c 100644 --- a/charts/dex/templates/deployment.yaml +++ b/charts/dex/templates/deployment.yaml @@ -41,6 +41,10 @@ spec: hostAliases: {{- toYaml . | nindent 8 }} {{- end }} + {{- if .Values.initContainers }} + initContainers: + {{- toYaml .Values.initContainers |nindent 8 }} + {{- end }} containers: - name: {{ .Chart.Name }} securityContext: diff --git a/charts/dex/values.yaml b/charts/dex/values.yaml index f879cdf3..e9735d9f 100644 --- a/charts/dex/values.yaml +++ b/charts/dex/values.yaml @@ -51,6 +51,10 @@ configSecret: # See the [official documentation](https://dexidp.io/docs/). config: {} +# -- [Init Containers](https://kubernetes.io/docs/concepts/workloads/pods/init-containers/). +# See the [API reference](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#containers) for details. +initContainers: [] + # -- Additional storage [volumes](https://kubernetes.io/docs/concepts/storage/volumes/). # See the [API reference](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#volumes-1) for details. volumes: []