
VAULT-571 Matching documented behavior and consul Consul's helm template defaults most of the enabled to the special value `"-"`, which means to inherit from global. This is what is implied should happen in Vault as well according to the documentation for the helm chart: > [global.enabled] The master enabled/disabled configuration. If this is > true, most components will be installed by default. If this is false, > no components will be installed by default and manually opting-in is > required, such as by setting server.enabled to true. (https://www.vaultproject.io/docs/platform/k8s/helm/configuration#enabled) We also simplified the chart logic using a few template helpers. Co-authored-by: Theron Voran <tvoran@users.noreply.github.com>
33 lines
1.1 KiB
YAML
33 lines
1.1 KiB
YAML
{{ template "vault.mode" . }}
|
|
{{- if ne .mode "external" }}
|
|
{{- template "vault.serverServiceEnabled" . -}}
|
|
{{- if .serverServiceEnabled -}}
|
|
# Service for Vault cluster
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: {{ template "vault.fullname" . }}-internal
|
|
namespace: {{ .Release.Namespace }}
|
|
labels:
|
|
helm.sh/chart: {{ include "vault.chart" . }}
|
|
app.kubernetes.io/name: {{ include "vault.name" . }}
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
|
annotations:
|
|
{{ template "vault.service.annotations" .}}
|
|
spec:
|
|
clusterIP: None
|
|
publishNotReadyAddresses: {{ .Values.server.service.publishNotReadyAddresses }}
|
|
ports:
|
|
- name: "{{ include "vault.scheme" . }}"
|
|
port: {{ .Values.server.service.port }}
|
|
targetPort: {{ .Values.server.service.targetPort }}
|
|
- name: https-internal
|
|
port: 8201
|
|
targetPort: 8201
|
|
selector:
|
|
app.kubernetes.io/name: {{ include "vault.name" . }}
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
component: server
|
|
{{- end }}
|
|
{{- end }}
|