Skip to content
This repository was archived by the owner on Feb 22, 2022. It is now read-only.

[incubator/vault] tolerations and nodeSelector #11616

Merged
merged 4 commits into from
Mar 14, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion incubator/vault/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
description: A Helm chart for Vault, a tool for managing secrets
name: vault
version: 0.15.1
version: 0.16.0
appVersion: 1.0.1
home: https://www.vaultproject.io/
icon: https://www.vaultproject.io/assets/images/mega-nav/logo-vault-0f83e3d2.svg
Expand Down
17 changes: 15 additions & 2 deletions incubator/vault/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,12 @@ spec:
livenessProbe:
# Alive if in standby or active mode
httpGet:
path: /v1/sys/health?standbyok=true
path: /v1/sys/health?standbyok=true&
{{- if .Values.vault.liveness.aliveIfUninitialized -}}uninitcode=204&{{- end }}
port: {{ .Values.service.port }}
scheme: {{ if .Values.vault.config.listener.tcp.tls_disable -}}HTTP{{- else -}}HTTPS{{- end }}
initialDelaySeconds: {{ .Values.vault.liveness.initialDelaySeconds }}
periodSeconds: {{ .Values.vault.liveness.periodSeconds }}
readinessProbe:
# Ready depends on preference
httpGet:
Expand All @@ -66,6 +69,8 @@ spec:
{{- if .Values.vault.readiness.readyIfUninitialized -}}uninitcode=204&{{- end }}
port: {{ .Values.service.port }}
scheme: {{ if .Values.vault.config.listener.tcp.tls_disable -}}HTTP{{- else -}}HTTPS{{- end }}
initialDelaySeconds: {{ .Values.vault.readiness.initialDelaySeconds }}
periodSeconds: {{ .Values.vault.readiness.periodSeconds }}
securityContext:
readOnlyRootFilesystem: true
capabilities:
Expand Down Expand Up @@ -97,7 +102,6 @@ spec:
{{- end }}
resources:
{{ toYaml .Values.resources | indent 10 }}
{{- if .Values.affinity }}
{{- if .Values.consulAgent.join }}
- name: {{ .Chart.Name }}-consul-agent
image: "{{ .Values.consulAgent.repository }}:{{ .Values.consulAgent.tag }}"
Expand Down Expand Up @@ -128,8 +132,17 @@ spec:
-join={{- .Values.consulAgent.join }} \
-data-dir=/etc/consul
{{- end }}
{{- if .Values.affinity }}
affinity:
{{ tpl .Values.affinity . | indent 8 }}
{{- end }}
{{- if .Values.nodeSelector }}
nodeSelector:
{{ toYaml .Values.nodeSelector | indent 8 }}
{{- end }}
{{- if .Values.tolerations }}
tolerations:
{{ toYaml .Values.tolerations | indent 8 }}
{{- end }}
volumes:
- name: vault-config
Expand Down
17 changes: 17 additions & 0 deletions incubator/vault/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,13 @@ resources: {}
# requests:
# cpu: 100m
# memory: 128Mi

## Node selector
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector
nodeSelector: {}

## Affinity
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
affinity: |
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
Expand All @@ -82,6 +89,10 @@ affinity: |
app: {{ template "vault.name" . }}
release: {{ .Release.Name }}

## Tolerations
## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
tolerations: []

## Deployment annotations
annotations: {}

Expand Down Expand Up @@ -140,10 +151,16 @@ vault:
# - name: extra-volume
# secret:
# secretName: some-secret
liveness:
aliveIfUninitialized: false
initialDelaySeconds: 30
periodSeconds: 10
readiness:
readyIfSealed: false
readyIfStandby: true
readyIfUninitialized: true
initialDelaySeconds: 10
periodSeconds: 10
## Use an existing config in a named ConfigMap
# existingConfigName: vault-cm
config:
Expand Down