feat: deployment
parent
3cc48fae1f
commit
35f14be65a
@ -1,22 +0,0 @@
|
||||
# store the secret-name as variable
|
||||
{{- $secret_name := "iam-secrets" -}}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: "{{ $secret_name }}"
|
||||
annotations:
|
||||
"helm.sh/resource-policy": "keep"
|
||||
data:
|
||||
# try to get the old secrets
|
||||
# keep in mind, that a dry-run only returns an empty map
|
||||
{{- $previous := lookup "v1" "Secret" .Release.Namespace $secret_name }}
|
||||
|
||||
# check, if a secret is already set
|
||||
{{- if or (not $previous) (not $previous.data) }}
|
||||
# if not set, then generate a new password
|
||||
JWT_SECRET: "{{ .Values.iam.jwt.secret | b64enc }}"
|
||||
{{ else }}
|
||||
# if set, then use the old value
|
||||
JWT_SECRET: "{{ index $previous.data "JWT_SECRET" }}"
|
||||
{{ end }}
|
||||
@ -1,25 +0,0 @@
|
||||
# store the secret-name as variable
|
||||
{{- $secret_name := "sepa-exporter-secrets" -}}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: "{{ $secret_name }}"
|
||||
annotations:
|
||||
"helm.sh/resource-policy": "keep"
|
||||
data:
|
||||
# try to get the old secrets
|
||||
# keep in mind, that a dry-run only returns an empty map
|
||||
{{- $previous := lookup "v1" "Secret" .Release.Namespace $secret_name }}
|
||||
|
||||
# check, if a secret is already set
|
||||
{{- if or (not $previous) (not $previous.data) }}
|
||||
# if not set, then generate a new password
|
||||
SMA_WORKFLOW_AUTH_TOKEN: "{{ .Values.sepaExporter.workflow.api_token | b64enc }}"
|
||||
SMA_DOCUMENT_AUTH_TOKEN: "{{ .Values.sepaExporter.document.api_token | b64enc }}"
|
||||
{{ else }}
|
||||
# if set, then use the old value
|
||||
SMA_WORKFLOW_AUTH_TOKEN: "{{ index $previous.data "SMA_WORKFLOW_AUTH_TOKEN" }}"
|
||||
SMA_DOCUMENT_AUTH_TOKEN: "{{ index $previous.data "SMA_DOCUMENT_AUTH_TOKEN" }}"
|
||||
{{ end }}
|
||||
|
||||
@ -1,7 +0,0 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: "wordpress-secrets"
|
||||
data:
|
||||
SMA_WORKFLOW_AUTH_TOKEN: "{{ .Values.wordpress.workflow.api_token | b64enc }}"
|
||||
Loading…
Reference in New Issue