diff --git a/charts/dex/Chart.yaml b/charts/dex/Chart.yaml index e20e4abb..6d74b78a 100644 --- a/charts/dex/Chart.yaml +++ b/charts/dex/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 type: application name: dex -version: 0.18.0 +version: 0.19.0 appVersion: "2.40.0" kubeVersion: ">=1.14.0-0" description: OpenID Connect (OIDC) identity and OAuth 2.0 provider with pluggable connectors. @@ -21,8 +21,11 @@ maintainers: url: https://sagikazarmark.hu annotations: artifacthub.io/changes: | - - kind: changed - description: "Dex 2.40.0 release" + - kind: added + description: Add extraObjects + links: # Optional + - name: Github PR + url: https://github.com/dexidp/helm-charts/pull/132 artifacthub.io/images: | - name: dex image: ghcr.io/dexidp/dex:v2.40.0 diff --git a/charts/dex/README.md b/charts/dex/README.md index 53ef4131..099570cb 100644 --- a/charts/dex/README.md +++ b/charts/dex/README.md @@ -1,6 +1,6 @@ # dex -![version: 0.18.0](https://img.shields.io/badge/version-0.18.0-informational?style=flat-square) ![type: application](https://img.shields.io/badge/type-application-informational?style=flat-square) ![app version: 2.40.0](https://img.shields.io/badge/app%20version-2.40.0-informational?style=flat-square) ![kube version: >=1.14.0-0](https://img.shields.io/badge/kube%20version->=1.14.0--0-informational?style=flat-square) [![artifact hub](https://img.shields.io/badge/artifact%20hub-dex-informational?style=flat-square)](https://artifacthub.io/packages/helm/dex/dex) +![version: 0.19.0](https://img.shields.io/badge/version-0.19.0-informational?style=flat-square) ![type: application](https://img.shields.io/badge/type-application-informational?style=flat-square) ![app version: 2.40.0](https://img.shields.io/badge/app%20version-2.40.0-informational?style=flat-square) ![kube version: >=1.14.0-0](https://img.shields.io/badge/kube%20version->=1.14.0--0-informational?style=flat-square) [![artifact hub](https://img.shields.io/badge/artifact%20hub-dex-informational?style=flat-square)](https://artifacthub.io/packages/helm/dex/dex) OpenID Connect (OIDC) identity and OAuth 2.0 provider with pluggable connectors. @@ -181,6 +181,7 @@ ingress: | strategy | object | `{}` | Deployment [strategy](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy) configuration. | | networkPolicy.enabled | bool | `false` | Create [Network Policies](https://kubernetes.io/docs/concepts/services-networking/network-policies/) | | networkPolicy.egressRules | list | `[]` | A list of network policy egress rules | +| extraObjects | string | `nil` | extra objects to deploy (passed through tpl). Can be defined as a list or dictionary. List objects can template keys, but doesn't support merging from multiple values files. Dictionaries can't template keys, but can merge values files which makes it better suited for use with encrypted and unencrypted values files. | ## Migrating from stable/dex (or banzaicloud-stable/dex) chart diff --git a/charts/dex/templates/extraObjects.yaml b/charts/dex/templates/extraObjects.yaml new file mode 100644 index 00000000..bfe075c2 --- /dev/null +++ b/charts/dex/templates/extraObjects.yaml @@ -0,0 +1,24 @@ +{{- /* Define extraObjects to handle both list and map scenarios */ -}} +{{- $extraObjects := .Values.extraObjects }} + +{{- if not (kindIs "slice" .Values.extraObjects) }} + {{- if kindIs "map" .Values.extraObjects }} + {{- $extraObjects = list }} + {{- range $key, $value := .Values.extraObjects }} + {{- $extraObjects = append $extraObjects $value }} + {{- end }} + {{- else }} + {{- fail ".Values.extraObjects must be a list or dictionary object" }} + {{- end }} +{{- end }} + +{{- range $extraObjects }} +--- +{{- if kindIs "map" . }} +{{ tpl (toYaml .) $ }} +{{- else if kindIs "string" . }} +{{ tpl . $ }} +{{- else }} +{{- fail "grandchilden of .Values.extraObjects must be a dictionary or string" }} +{{- end }} +{{- end }} diff --git a/charts/dex/values.yaml b/charts/dex/values.yaml index 7452791e..58831115 100644 --- a/charts/dex/values.yaml +++ b/charts/dex/values.yaml @@ -334,3 +334,30 @@ networkPolicy: # ports: # - port: 636 # protocol: TCP + +# -- extra objects to deploy (passed through tpl). +# Can be defined as a list or dictionary. +# List objects can template keys, but doesn't support merging from multiple values files. +# Dictionaries can't template keys, but can merge values files which makes it better suited for use with encrypted and unencrypted values files. +extraObjects: [] +# meaningless_key: +# apiVersion: v1 +# kind: Secret +# type: Opaque +# metadata: +# name: google-serviceaccount +# data: +# token: | +# {{ print "super secret JSON file" | b64enc }} +# - | +# {{- range (list "1" "2" "3") }} +# --- +# apiVersion: v1 +# kind: Secret +# type: Opaque +# metadata: +# name: google-serviceaccount +# data: +# {{ printf "serviceaccount-%s" . }}: | +# {{ print "super secret JSON file" | b64enc }} +# {{- end }}