2024-11-20 18:16:42 +01:00
|
|
|
{{- $webhook_secret := .Values.updater.webhook_secret }}
|
|
|
|
{{- $apiUsername := .Values.updater.apiUsername }}
|
|
|
|
{{- $apiPassword := .Values.updater.apiPassword }}
|
2024-11-20 10:32:53 +01:00
|
|
|
|
|
|
|
{{- if not $webhook_secret }}
|
|
|
|
{{- $webhook_secret = randAlphaNum 10 }}
|
|
|
|
{{- 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 }}
|
2024-11-20 18:16:42 +01:00
|
|
|
SCRIPT_NAME: {{ "/.webhook" | b64enc }}
|