34 lines
916 B
YAML
34 lines
916 B
YAML
|
|
|
|
{{- if and (not $webhook_secret) .Values.updater.webhook_secret }}
|
|
{{- $webhook_secret = .Values.updater.webhook_secret }}
|
|
{{- end }}
|
|
{{- if not $webhook_secret }}
|
|
{{- $webhook_secret = randAlphaNum 10 }}
|
|
{{- end }}
|
|
|
|
{{- if and (not $apiUsername) .Values.updater.apiUsername }}
|
|
{{- $apiUsername = .Values.updater.apiUsername }}
|
|
{{- end }}
|
|
{{- if and (not $apiPassword) .Values.updater.apiPassword }}
|
|
{{- $apiPassword = .Values.updater.apiPassword }}
|
|
{{- end }}
|
|
|
|
{{- if not $apiUsername}}
|
|
{{- $apiUsername = randAlphaNum 10 }}
|
|
{{- end }}
|
|
{{- if not $apiPassword}}
|
|
{{- $apiPassword = randAlphaNum 10 }}
|
|
{{- end }}
|
|
|
|
apiVersion: v1
|
|
kind: Secret
|
|
metadata:
|
|
name: {{ .Release.Name }}-webhook-secret
|
|
namespace: {{ .Release.Namespace }}
|
|
type: Opaque
|
|
data:
|
|
WEBHOOK_SECRET: {{ $webhook_secret | b64enc }}
|
|
API_USERNAME: {{ $apiUsername | b64enc }}
|
|
API_PASSWORD: {{ $apiPassword | b64enc }}
|
|
SCRIPT_NAME: "/.webhook" |