Skip to content

Commit

Permalink
chore(oidc-gateway): Migrate to new external secret operator (#155)
Browse files Browse the repository at this point in the history
  • Loading branch information
bkochendorfer authored Aug 12, 2022
1 parent 008ab01 commit 8fc8459
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 14 deletions.
2 changes: 1 addition & 1 deletion charts/oidc-gateway/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
description: A Helm chart for OIDC Gateway workload to put in front of workloads that require an authentication layer.
name: oidc-gateway
version: 1.0.0
version: 2.0.0

keywords:
- Mozilla
Expand Down
31 changes: 18 additions & 13 deletions charts/oidc-gateway/templates/secrets.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- if .Values.externalSecrets.enabled -}}
apiVersion: kubernetes-client.io/v1
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: {{ .Values.externalSecrets.name }}
Expand All @@ -13,19 +13,24 @@ metadata:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
backendType: secretsManager
data:
- key: /{{ .Values.externalSecrets.secretPath }}/oidc-gateway-secrets
name: secrets.yaml
template:
metadata:
{{- with .Values.externalSecrets.annotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "oidc-gateway.labels" . | nindent 8 }}
{{- with .Values.externalSecrets.labels }}
- remoteRef:
key: /{{ .Values.externalSecrets.secretPath }}/oidc-gateway-secrets
secretKey: secrets.yaml
secretStoreRef:
kind: ClusterSecretStore
name: {{ .Values.externalSecrets.store }}
target:
name: {{ .Values.externalSecrets.target }}
template:
metadata:
{{- with .Values.externalSecrets.annotations }}
annotations:
{{- toYaml . | nindent 10 }}
{{- end }}
labels:
{{- include "oidc-gateway.labels" . | nindent 10 }}
{{- with .Values.externalSecrets.labels }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- end }}
2 changes: 2 additions & 0 deletions charts/oidc-gateway/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ externalSecrets:
labels: {}
name: oidc-gateway
# structure: { "oidc": { "client_secret": "secret key for oidc client"}, "session_secret": "oidc session secret" }
target: oidc-gateway
store: secretsmanager-secretstore

image:
pullPolicy: IfNotPresent
Expand Down

0 comments on commit 8fc8459

Please sign in to comment.