Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create federation secret with default consul-gossip-encryption-key secret when global.gossipEncryption.autoGenerate is set to true #854

Merged
merged 4 commits into from
Nov 15, 2021
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions charts/consul/templates/create-federation-secret-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,13 @@ spec:
items:
- key: {{ .Values.global.gossipEncryption.secretKey }}
path: gossip.key
{{- else if .Values.global.gossipEncryption.autoGenerate }}
- name: gossip-encryption-key
secret:
secretName: consul-gossip-encryption-key
items:
- key: key
path: gossip.key
{{- end }}

{{- if .Values.global.tls.enableAutoEncrypt }}
Expand Down Expand Up @@ -107,7 +114,8 @@ spec:
mountPath: /consul/tls/client/ca
readOnly: true
{{- end }}
{{- if (and .Values.global.gossipEncryption.secretName .Values.global.gossipEncryption.secretKey) }}
{{- if (or .Values.global.gossipEncryption.autoGenerate
(and .Values.global.gossipEncryption.secretName .Values.global.gossipEncryption.secretKey)) }}
- name: gossip-encryption-key
mountPath: /consul/gossip
readOnly: true
Expand All @@ -119,7 +127,8 @@ spec:
consul-k8s-control-plane create-federation-secret \
-log-level={{ .Values.global.logLevel }} \
-log-json={{ .Values.global.logJSON }} \
{{- if (and .Values.global.gossipEncryption.secretName .Values.global.gossipEncryption.secretKey) }}
{{- if (or .Values.global.gossipEncryption.autoGenerate (and
.Values.global.gossipEncryption.secretName .Values.global.gossipEncryption.secretKey)) }}
-gossip-key-file=/consul/gossip/gossip.key \
{{- end }}
{{- if .Values.global.acls.createReplicationToken }}
Expand Down