{{ if .Values.Gossip.Create }}
apiVersion: v1
kind: Secret
metadata:
  name: {{ template "consul.fullname" . }}-gossip-key
  labels:
    heritage: {{ .Release.Service | quote }}
    release: {{ .Release.Name | quote }}
    chart: {{ template "consul.chart" . }}
    component: "{{ .Release.Name }}-{{ .Values.Component }}"
type: Opaque
data:
  gossip-key: {{ randAlphaNum 24 | b64enc }}
{{ end }}
