Skip to content

Commit

Permalink
Merge pull request #52 from TeddyAndrieux/ability-to-override-checksum
Browse files Browse the repository at this point in the history
Add ability to override `checksum/config` annotation
  • Loading branch information
sagikazarmark authored Aug 30, 2021
2 parents 091e95f + 99ea561 commit 8725059
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 5 deletions.
4 changes: 2 additions & 2 deletions charts/dex/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
type: application
name: dex
version: 0.6.0
version: 0.6.1
appVersion: "2.30.0"
kubeVersion: ">=1.14.0-0"
description: OpenID Connect (OIDC) identity and OAuth 2.0 provider with pluggable connectors.
Expand All @@ -22,7 +22,7 @@ maintainers:
annotations:
artifacthub.io/changes: |
- kind: changed
description: Dex v2.30.0 release
description: Only add `config/checksum` annotation if a config secret is created
artifacthub.io/images: |
- name: dex
image: ghcr.io/dexidp/dex:v2.30.0
2 changes: 1 addition & 1 deletion charts/dex/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# dex

![version: 0.6.0](https://img.shields.io/badge/version-0.6.0-informational?style=flat-square) ![type: application](https://img.shields.io/badge/type-application-informational?style=flat-square) ![app version: 2.30.0](https://img.shields.io/badge/app%20version-2.30.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.6.1](https://img.shields.io/badge/version-0.6.1-informational?style=flat-square) ![type: application](https://img.shields.io/badge/type-application-informational?style=flat-square) ![app version: 2.30.0](https://img.shields.io/badge/app%20version-2.30.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.

Expand Down
10 changes: 10 additions & 0 deletions charts/dex/ci/no-config-secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
config:
issuer: https://my-issuer.com

storage:
type: memory

enablePasswordDB: true

configSecret:
create: false
2 changes: 2 additions & 0 deletions charts/dex/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ spec:
{{- with .Values.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{ if .Values.configSecret.create }}
checksum/config: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }}
{{- end }}
labels:
{{- include "dex.selectorLabels" . | nindent 8 }}
spec:
Expand Down
4 changes: 2 additions & 2 deletions charts/dex/templates/secret.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ if .Values.configSecret.create }}
{{- if .Values.configSecret.create -}}
apiVersion: v1
kind: Secret
metadata:
Expand All @@ -8,4 +8,4 @@ metadata:
type: Opaque
data:
config.yaml: {{ .Values.config | toYaml | b64enc | quote }}
{{ end }}
{{- end }}
13 changes: 13 additions & 0 deletions charts/dex/templates/tests/no-config-secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{{- if not .Values.configSecret.create -}}
apiVersion: v1
kind: Secret
metadata:
name: {{ include "dex.configSecretName" . }}-test-no-create
labels:
{{- include "dex.labels" . | nindent 4 }}
annotations:
"helm.sh/hook": test
type: Opaque
data:
config.yaml: {{ .Values.config | toYaml | b64enc | quote }}
{{- end }}

0 comments on commit 8725059

Please sign in to comment.