From 302ed5bf18c4fa5017c3349465627b8ed51bf47e Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Fri, 18 May 2018 12:33:53 +0600 Subject: [PATCH] [incubator/vault] Added annotations (#5114) * Added annotations * Added annotations * Address comments * Address PR comments --- incubator/vault/Chart.yaml | 2 +- incubator/vault/README.md | 3 +++ incubator/vault/templates/deployment.yaml | 8 +++----- incubator/vault/templates/service.yaml | 4 +--- incubator/vault/values.yaml | 11 +++++++++-- 5 files changed, 17 insertions(+), 11 deletions(-) diff --git a/incubator/vault/Chart.yaml b/incubator/vault/Chart.yaml index c1b5fb2856..fa7e49b636 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.7.1 +version: 0.8.0 appVersion: 0.10.1 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 2c4a2b52b1..acfabd9d23 100644 --- a/incubator/vault/README.md +++ b/incubator/vault/README.md @@ -58,6 +58,9 @@ The following table lists the configurable parameters of the Vault chart and the | `resources.limits.cpu` | Container requested CPU | `nil` | | `resources.limits.memory` | Container requested memory | `nil` | | `affinity` | Affinity settings | See values.yaml | +| `service.annotations` | Annotations for service | `{}` | +| `annotations` | Annotations for deployment | `{}` | +| `podAnnotations` | Annotations for pods | `{}` | | `consulAgent.join` | If set, start start a consul agent | `nil` | | `consulAgent.repository` | Container image for consul agent | `consul` | | `consulAgent.tag` | Container image tag for consul agent | `1.0.6` | diff --git a/incubator/vault/templates/deployment.yaml b/incubator/vault/templates/deployment.yaml index 1c13cf5245..fe4f0ec323 100644 --- a/incubator/vault/templates/deployment.yaml +++ b/incubator/vault/templates/deployment.yaml @@ -7,6 +7,8 @@ metadata: chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} release: {{ .Release.Name }} heritage: {{ .Release.Service }} + annotations: +{{ toYaml .Values.annotations | indent 4 }} spec: replicas: {{ .Values.replicaCount }} strategy: @@ -18,12 +20,8 @@ spec: labels: app: {{ template "vault.name" . }} release: {{ .Release.Name }} -{{- if .Values.podAnnotations }} annotations: - {{- range $key, $value := .Values.podAnnotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} -{{- end }} +{{ toYaml .Values.podAnnotations | indent 8 }} spec: containers: - name: {{ .Chart.Name }} diff --git a/incubator/vault/templates/service.yaml b/incubator/vault/templates/service.yaml index 89baa0cba0..bbece40f75 100644 --- a/incubator/vault/templates/service.yaml +++ b/incubator/vault/templates/service.yaml @@ -9,9 +9,7 @@ metadata: heritage: {{ .Release.Service }} {{- if .Values.service.annotations }} annotations: - {{- range $key, $value := .Values.service.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} +{{ toYaml .Values.service.annotations | indent 4 }} {{- end }} spec: type: {{ .Values.service.type }} diff --git a/incubator/vault/values.yaml b/incubator/vault/values.yaml index afd36f5353..74037bea44 100644 --- a/incubator/vault/values.yaml +++ b/incubator/vault/values.yaml @@ -6,6 +6,7 @@ image: repository: vault tag: 0.10.1 pullPolicy: IfNotPresent + consulAgent: repository: consul tag: 1.0.7 @@ -21,14 +22,14 @@ consulAgent: # # Optionally override the agent's http port HttpPort: 8500 + service: name: vault type: ClusterIP externalPort: 8200 port: 8200 - annotations: {} # clusterIP: None - # annotations: + annotations: {} # cloud.google.com/load-balancer-type: "Internal" ingress: enabled: false @@ -64,7 +65,13 @@ affinity: | matchLabels: app: {{ template "vault.fullname" . }} release: {{ .Release.Name }} + +## Deployment annotations +annotations: {} + podAnnotations: {} +## Read more about kube2iam to provide access to s3 https://github.com/jtblin/kube2iam +# iam.amazonaws.com/role: role-arn ## Sample for unsealing vault on startup ## if automation saves your unseal keys to a k8s secret on deploy