rename consulHA to serverHA; add dev mode, update config and values
This commit is contained in:
parent
666cdb75cc
commit
34e0b377d9
5 changed files with 16 additions and 14 deletions
|
@ -3,7 +3,7 @@
|
||||||
# the agent is installed locally on the node and the NODE_IP should be used.
|
# the agent is installed locally on the node and the NODE_IP should be used.
|
||||||
# If the node can't run a Vault agent, then this service can be used to
|
# If the node can't run a Vault agent, then this service can be used to
|
||||||
# communicate directly to a server agent.
|
# communicate directly to a server agent.
|
||||||
{{- if (and (or (and (ne (.Values.consulHA.enabled | toString) "-") .Values.consulHA.enabled) (and (eq (.Values.consulHA.enabled | toString) "-") .Values.global.enabled)) (or (and (ne (.Values.ui.enabled | toString) "-") .Values.ui.enabled) (and (eq (.Values.ui.enabled | toString) "-") .Values.global.enabled)) (or (and (ne (.Values.ui.service.enabled | toString) "-") .Values.ui.service.enabled) (and (eq (.Values.ui.service.enabled | toString) "-") .Values.global.enabled))) }}
|
{{- if (and (or (and (ne (.Values.serverHA.enabled | toString) "-") .Values.serverHA.enabled) (and (eq (.Values.serverHA.enabled | toString) "-") .Values.global.enabled)) (or (and (ne (.Values.ui.enabled | toString) "-") .Values.ui.enabled) (and (eq (.Values.ui.enabled | toString) "-") .Values.global.enabled)) (or (and (ne (.Values.ui.service.enabled | toString) "-") .Values.ui.service.enabled) (and (eq (.Values.ui.service.enabled | toString) "-") .Values.global.enabled))) }}
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
# StatefulSet to run the actual vault server cluster.
|
# StatefulSet to run the actual vault server cluster.
|
||||||
{{- if (or (and (ne (.Values.consulHA.enabled | toString) "-") .Values.consulHA.enabled) (and (eq (.Values.consulHA.enabled | toString) "-") .Values.global.enabled)) }}
|
{{- if (or (and (ne (.Values.serverHA.enabled | toString) "-") .Values.serverHA.enabled) (and (eq (.Values.serverHA.enabled | toString) "-") .Values.global.enabled)) }}
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: ConfigMap
|
kind: ConfigMap
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ template "vault.fullname" . }}-server-config
|
name: {{ template "vault.fullname" . }}-server-ha-config
|
||||||
labels:
|
labels:
|
||||||
app: {{ template "vault.name" . }}
|
app: {{ template "vault.name" . }}
|
||||||
chart: {{ template "vault.chart" . }}
|
chart: {{ template "vault.chart" . }}
|
||||||
|
@ -11,5 +11,5 @@ metadata:
|
||||||
release: {{ .Release.Name }}
|
release: {{ .Release.Name }}
|
||||||
data:
|
data:
|
||||||
statefulconfig-from-values.hcl: |-
|
statefulconfig-from-values.hcl: |-
|
||||||
{{ tpl .Values.consulHA.config . | indent 4 }}
|
{{ tpl .Values.serverHA.config . | indent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
# If the node can't run a Vault agent, then this service can be used to
|
# If the node can't run a Vault agent, then this service can be used to
|
||||||
# communicate directly to a server agent.
|
# communicate directly to a server agent.
|
||||||
# TODO: verify for Vault
|
# TODO: verify for Vault
|
||||||
{{- if (or (and (ne (.Values.consulHA.enabled | toString) "-") .Values.consulHA.enabled) (and (eq (.Values.consulHA.enabled | toString) "-") .Values.global.enabled)) }}
|
{{- if (or (and (ne (.Values.serverHA.enabled | toString) "-") .Values.serverHA.enabled) (and (eq (.Values.serverHA.enabled | toString) "-") .Values.global.enabled)) }}
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# StatefulSet to run the actual vault server cluster.
|
# StatefulSet to run the actual vault server cluster.
|
||||||
{{- if (or (and (ne (.Values.consulHA.enabled | toString) "-") .Values.consulHA.enabled) (and (eq (.Values.consulHA.enabled | toString) "-") .Values.global.enabled)) }}
|
{{- if (or (and (ne (.Values.serverHA.enabled | toString) "-") .Values.serverHA.enabled) (and (eq (.Values.serverHA.enabled | toString) "-") .Values.global.enabled)) }}
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: StatefulSet
|
kind: StatefulSet
|
||||||
metadata:
|
metadata:
|
||||||
|
@ -12,13 +12,13 @@ metadata:
|
||||||
spec:
|
spec:
|
||||||
serviceName: {{ template "vault.fullname" . }}-ha-server
|
serviceName: {{ template "vault.fullname" . }}-ha-server
|
||||||
podManagementPolicy: Parallel
|
podManagementPolicy: Parallel
|
||||||
replicas: {{ .Values.consulHA.replicas }}
|
replicas: {{ .Values.serverHA.replicas }}
|
||||||
# TODO: add updatePartition option
|
# TODO: add updatePartition option
|
||||||
{{- if (gt (int .Values.consulHA.updatePartition) 0) }}
|
{{- if (gt (int .Values.serverHA.updatePartition) 0) }}
|
||||||
updateStrategy:
|
updateStrategy:
|
||||||
type: RollingUpdate
|
type: RollingUpdate
|
||||||
rollingUpdate:
|
rollingUpdate:
|
||||||
partition: {{ .Values.consulHA.updatePartition }}
|
partition: {{ .Values.serverHA.updatePartition }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
|
@ -41,7 +41,7 @@ spec:
|
||||||
configMap:
|
configMap:
|
||||||
name: {{ template "vault.fullname" . }}-server-ha-config
|
name: {{ template "vault.fullname" . }}-server-ha-config
|
||||||
defaultMode: 0755
|
defaultMode: 0755
|
||||||
{{- range .Values.consulHA.extraVolumes }}
|
{{- range .Values.serverHA.extraVolumes }}
|
||||||
- name: userconfig-{{ .name }}
|
- name: userconfig-{{ .name }}
|
||||||
{{ .type }}:
|
{{ .type }}:
|
||||||
{{- if (eq .type "configMap") }}
|
{{- if (eq .type "configMap") }}
|
||||||
|
@ -56,7 +56,7 @@ spec:
|
||||||
fsGroup: 1000
|
fsGroup: 1000
|
||||||
# TODO: confirm Vault needs this
|
# TODO: confirm Vault needs this
|
||||||
privileged: true
|
privileged: true
|
||||||
image: "{{ default .Values.global.image .Values.consulHA.image }}"
|
image: "{{ default .Values.global.image .Values.serverHA.image }}"
|
||||||
env:
|
env:
|
||||||
- name: HOST_IP
|
- name: HOST_IP
|
||||||
valueFrom:
|
valueFrom:
|
||||||
|
@ -86,7 +86,7 @@ spec:
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: config
|
- name: config
|
||||||
mountPath: /vault/config
|
mountPath: /vault/config
|
||||||
{{- range .Values.consulHA.extraVolumes }}
|
{{- range .Values.serverHA.extraVolumes }}
|
||||||
- name: userconfig-{{ .name }}
|
- name: userconfig-{{ .name }}
|
||||||
readOnly: true
|
readOnly: true
|
||||||
mountPath: /vault/userconfig/{{ .name }}
|
mountPath: /vault/userconfig/{{ .name }}
|
||||||
|
|
|
@ -72,7 +72,7 @@ server:
|
||||||
# name: my-secret
|
# name: my-secret
|
||||||
# load: false # if true, will add to `-config-dir` to load by Vault
|
# load: false # if true, will add to `-config-dir` to load by Vault
|
||||||
|
|
||||||
consulHA:
|
serverHA:
|
||||||
enabled: false
|
enabled: false
|
||||||
image: null
|
image: null
|
||||||
replicas: 1
|
replicas: 1
|
||||||
|
@ -136,7 +136,9 @@ ui:
|
||||||
# on the server nodes. This makes UI access via the service below (if
|
# on the server nodes. This makes UI access via the service below (if
|
||||||
# enabled) predictable rather than "any node" if you're running Vault
|
# enabled) predictable rather than "any node" if you're running Vault
|
||||||
# clients as well.
|
# clients as well.
|
||||||
enabled: "-"
|
#
|
||||||
|
# This value is used for both Single Server and HA mode setups
|
||||||
|
enabled: false
|
||||||
|
|
||||||
# True if you want to create a Service entry for the Vault UI.
|
# True if you want to create a Service entry for the Vault UI.
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in a new issue