diff --git a/incubator/vault/Chart.yaml b/incubator/vault/Chart.yaml index c39d09cd38..ae9518d656 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.3.1 +version: 0.4.0 appVersion: 0.9.0 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 9bbb3431ee..7b74c6be4a 100644 --- a/incubator/vault/README.md +++ b/incubator/vault/README.md @@ -56,6 +56,7 @@ The following tables lists the configurable parameters of the vault chart and th | `replicaCount` | k8s replicas | `1` | | `resources.limits.cpu` | Container requested CPU | `nil` | | `resources.limits.memory` | Container requested memory | `nil` | +| `affinity` | Affinity settings | See values.yaml | Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. diff --git a/incubator/vault/templates/deployment.yaml b/incubator/vault/templates/deployment.yaml index a8512c52c0..7998e57bf9 100644 --- a/incubator/vault/templates/deployment.yaml +++ b/incubator/vault/templates/deployment.yaml @@ -48,16 +48,10 @@ spec: {{- end }} resources: {{ toYaml .Values.resources | indent 10 }} + {{- if .Values.affinity }} affinity: - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 100 - podAffinityTerm: - topologyKey: kubernetes.io/hostname - labelSelector: - matchLabels: - app: {{ template "vault.fullname" . }} - release: {{ .Release.Name | quote }} +{{ tpl .Values.affinity . | indent 8 }} + {{- end }} volumes: - name: vault-config configMap: diff --git a/incubator/vault/values.yaml b/incubator/vault/values.yaml index 73859aa23f..f1b1fc9dff 100644 --- a/incubator/vault/values.yaml +++ b/incubator/vault/values.yaml @@ -37,6 +37,17 @@ resources: {} # requests: # cpu: 100m # memory: 128Mi +affinity: | + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 100 + podAffinityTerm: + topologyKey: kubernetes.io/hostname + labelSelector: + matchLabels: + app: {{ template "vault.fullname" . }} + release: {{ .Release.Name }} + vault: # Only used to enable dev mode. When in dev mode, the rest of this config # section below is not used to configure Vault. See