From 530638cd87133161d21099b35f7ce0cdbfb8112f Mon Sep 17 00:00:00 2001 From: Cyrille De Ciancio <46990478+cyrilledec@users.noreply.github.com> Date: Sun, 28 Apr 2019 18:54:20 +0700 Subject: [PATCH] [incubator/vault] Use single consul token for vault and consul agent (#12844) * Use single consul token for vault and consul agent Signed-off-by: Cyrille * Bump version Signed-off-by: Cyrille --- incubator/vault/Chart.yaml | 2 +- incubator/vault/templates/deployment.yaml | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/incubator/vault/Chart.yaml b/incubator/vault/Chart.yaml index 9eb89f8632..d5f17b656b 100644 --- a/incubator/vault/Chart.yaml +++ b/incubator/vault/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 description: A Helm chart for Vault, a tool for managing secrets name: vault -version: 0.18.2 +version: 0.18.3 appVersion: 1.0.1 home: https://www.vaultproject.io/ icon: https://www.vaultproject.io/assets/images/mega-nav/logo-vault-0f83e3d2.svg diff --git a/incubator/vault/templates/deployment.yaml b/incubator/vault/templates/deployment.yaml index 51fcae1fd7..1bf62781bb 100644 --- a/incubator/vault/templates/deployment.yaml +++ b/incubator/vault/templates/deployment.yaml @@ -126,9 +126,14 @@ spec: GOSSIP_KEY="-config-file /etc/consul/encrypt.json" fi {{- end }} + {{- if .Values.vault.config.storage.consul.token }} + echo "{\"acl\":{\"tokens\":{\"agent\":\"{{ .Values.vault.config.storage.consul.token }}\"}}}" > /etc/consul/agent-token.json + AGENT_TOKEN="-config-file /etc/consul/agent-token.json" + {{- end }} exec /bin/consul agent \ $GOSSIP_KEY \ + $AGENT_TOKEN \ -join={{- .Values.consulAgent.join }} \ -data-dir=/etc/consul resources: