{{- if (and .Values.webhookRelay.enabled .Values.webhookRelay.key .Values.webhookRelay.secret) }}
apiVersion: v1
kind: Secret
metadata:
  name: {{ template "keel.name" . }}-webhookrelay
  namespace: {{ .Release.Namespace }}
  labels:
    app: {{ template "keel.name" . }}
    chart: {{ template "keel.chart" . }}
    release: {{ .Release.Name }}
    heritage: {{ .Release.Service }}
type: Opaque
data:
  key: {{ .Values.webhookRelay.key | b64enc }}
  secret:  {{ .Values.webhookRelay.secret | b64enc }}
{{- end }}
