From be880e80a0d8025dfeb489dabb8a1a78104e451c Mon Sep 17 00:00:00 2001 From: zdevi Date: Wed, 2 Oct 2019 15:13:08 +0200 Subject: [PATCH] [incubator/vault] Custom backend (#17448) * custom_backend Signed-off-by: Stephane Etjemesian * Update Chart.yaml Signed-off-by: Stephane Etjemesian * Update values.yaml Signed-off-by: Stephane Etjemesian * update readme Signed-off-by: Stephane Etjemesian --- incubator/vault/Chart.yaml | 2 +- incubator/vault/README.md | 1 + incubator/vault/templates/backend-config.yaml | 14 ++++++++++++++ incubator/vault/values.yaml | 1 + 4 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 incubator/vault/templates/backend-config.yaml diff --git a/incubator/vault/Chart.yaml b/incubator/vault/Chart.yaml index d4f41eea87..36cb90d69d 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.21.1 +version: 0.21.2 appVersion: 1.1.2 home: https://www.vaultproject.io/ icon: https://www.vaultproject.io/assets/images/mega-nav/logo-vault-0f83e3d2.svg diff --git a/incubator/vault/README.md b/incubator/vault/README.md index ea74683333..215b2400f2 100644 --- a/incubator/vault/README.md +++ b/incubator/vault/README.md @@ -52,6 +52,7 @@ The following table lists the configurable parameters of the Vault chart and the | `image.pullPolicy` | Container pull policy | `IfNotPresent` | | `image.repository` | Container image to use | `vault` | | `image.tag` | Container image tag to deploy | `.Chart.appVersion` | +| `vault.backendPolicy | If custom backend needed | `{}` | | `vault.dev` | Use Vault in dev mode | true (set to false in production) | | `vault.extraArgs` | Additional arguments for vault server command | `[]` | | `vault.extraEnv` | Extra env vars for Vault pods | `{}` | diff --git a/incubator/vault/templates/backend-config.yaml b/incubator/vault/templates/backend-config.yaml new file mode 100644 index 0000000000..0f8b48332f --- /dev/null +++ b/incubator/vault/templates/backend-config.yaml @@ -0,0 +1,14 @@ +{{- if .Values.vault.backendPolicy -}} +apiVersion: cloud.google.com/v1beta1 +kind: BackendConfig +metadata: + namespace: {{ .Release.Namespace }} + name: {{ template "vault.fullname" . }} + labels: + app: {{ template "vault.name" . }} + chart: "{{ template "vault.chart" . }}" + release: "{{ .Release.Name }}" +spec: + securityPolicy: + name: {{ .Values.vault.backendPolicy }} +{{- end -}} \ No newline at end of file diff --git a/incubator/vault/values.yaml b/incubator/vault/values.yaml index 89eb92c2ae..0af4122a3d 100644 --- a/incubator/vault/values.yaml +++ b/incubator/vault/values.yaml @@ -278,6 +278,7 @@ vault: # bucket: "" # # Use a custom secret to mount this file. # credentials_file: "" + backendPolicy: rbac: ## Enable RBAC