Skip to content

Commit

Permalink
Merge pull request #3 from InfraWay/DEV-2060
Browse files Browse the repository at this point in the history
DEV-2060: add external secrets
  • Loading branch information
maZahaca authored Nov 14, 2024
2 parents 54cdfe8 + 8462965 commit e2f5bf0
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/senfu/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0
version: 0.1.1
22 changes: 22 additions & 0 deletions charts/senfu/templates/external-secrets.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{{- if .Values.externalSecrets.enabled -}}
{{- $fullName := printf "senfu-%s" (include "senfu.fullname" .) -}}
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: {{ $fullName }}
namespace: {{ .Release.Namespace }}
spec:
refreshInterval: 1h # rate SecretManager pulls GCPSM
secretStoreRef:
kind: ClusterSecretStore
name: {{ .Values.externalSecrets.secretStoreName }} # name of the SecretStore (or kind specified)
target:
name: {{ $fullName }}
creationPolicy: Owner
data:
{{- range .Values.externalSecrets.secrets }}
- secretKey: {{ .key }}
remoteRef:
key: {{ .name }}
{{- end }}
{{- end }}
5 changes: 5 additions & 0 deletions charts/senfu/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,8 @@ volumes:
name: pano-pv-claim
storage: 20Gi
configMapName: site-nginx-config

externalSecrets:
enabled: false
secretStoreName: ""
secrets: []

0 comments on commit e2f5bf0

Please sign in to comment.