From 2e1441baebb410450a8b36aaf55f3bca5d160847 Mon Sep 17 00:00:00 2001 From: diliz Date: Mon, 28 Oct 2024 08:09:25 +0100 Subject: [PATCH] fix: moved default delims values in config.go --- agent-inject/agent/annotations.go | 6 ++---- agent-inject/agent/config.go | 2 ++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/agent-inject/agent/annotations.go b/agent-inject/agent/annotations.go index e73f2654..f9a448d3 100644 --- a/agent-inject/agent/annotations.go +++ b/agent-inject/agent/annotations.go @@ -89,7 +89,6 @@ const ( // to the same unique value provided in "vault.hashicorp.com/agent-inject-secret-". // If not provided, a default left delimiter is used as defined by https://www.vaultproject.io/docs/agent/template#left_delimiter AnnotationAgentInjectTemplateLeftDelim = "vault.hashicorp.com/agent-template-left-delim" - DefaultLeftDelim = "{{" // AnnotationAgentInjectTemplateRightDelim is the key annotation that configures Vault // Agent what right delimiter to use for rendering the secrets. The name @@ -98,10 +97,9 @@ const ( // to the same unique value provided in "vault.hashicorp.com/agent-inject-secret-". // If not provided, a default right delimiter is used as defined by https://www.vaultproject.io/docs/agent/template#right_delimiter AnnotationAgentInjectTemplateRightDelim = "vault.hashicorp.com/agent-template-right-delim" - DefaultRightDelim = "}}" - // AnnotationAgentInjectToken is the annotation key for injecting the token - // from auth/token/lookup-self + // AnnotationAgentInjectToken is the annotation key for injecting the + // auto-auth token into the secrets volume (e.g. /vault/secrets/token) AnnotationAgentInjectToken = "vault.hashicorp.com/agent-inject-token" // AnnotationAgentInjectCommand is the key annotation that configures Vault Agent diff --git a/agent-inject/agent/config.go b/agent-inject/agent/config.go index 9038524b..d2bbcd9b 100644 --- a/agent-inject/agent/config.go +++ b/agent-inject/agent/config.go @@ -14,6 +14,8 @@ import ( const ( DefaultMapTemplate = "{{ with secret \"%s\" }}{{ range $k, $v := .Data }}{{ $k }}: {{ $v }}\n{{ end }}{{ end }}" DefaultJSONTemplate = "{{ with secret \"%s\" }}{{ .Data | toJSON }}\n{{ end }}" + DefaultLeftDelim = "{{" + DefaultRightDelim = "}}" DefaultTemplateType = "map" PidFile = "/home/vault/.pid" TokenFile = "/home/vault/.vault-token"