2018-09-28 20:56:48 +00:00
|
|
|
# Headless service for Vault server DNS entries. This service should only
|
|
|
|
# point to Vault servers. For access to an agent, one should assume that
|
2018-08-18 05:08:03 +00:00
|
|
|
# the agent is installed locally on the node and the NODE_IP should be used.
|
2018-09-28 20:56:48 +00:00
|
|
|
# If the node can't run a Vault agent, then this service can be used to
|
2018-08-18 05:08:03 +00:00
|
|
|
# communicate directly to a server agent.
|
2018-09-28 20:56:48 +00:00
|
|
|
# TODO: verify for Vault
|
2018-09-03 16:02:42 +00:00
|
|
|
{{- if (or (and (ne (.Values.server.enabled | toString) "-") .Values.server.enabled) (and (eq (.Values.server.enabled | toString) "-") .Values.global.enabled)) }}
|
2018-08-18 05:08:03 +00:00
|
|
|
apiVersion: v1
|
|
|
|
kind: Service
|
|
|
|
metadata:
|
2018-09-28 20:56:48 +00:00
|
|
|
name: {{ template "vault.fullname" . }}-server
|
2018-08-18 05:08:03 +00:00
|
|
|
labels:
|
2018-09-28 20:56:48 +00:00
|
|
|
app: {{ template "vault.name" . }}
|
|
|
|
chart: {{ template "vault.chart" . }}
|
2018-08-18 21:38:33 +00:00
|
|
|
heritage: {{ .Release.Service }}
|
|
|
|
release: {{ .Release.Name }}
|
2018-08-18 05:08:03 +00:00
|
|
|
annotations:
|
|
|
|
# This must be set in addition to publishNotReadyAddresses due
|
|
|
|
# to an open issue where it may not work:
|
|
|
|
# https://github.com/kubernetes/kubernetes/issues/58662
|
|
|
|
service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
|
|
|
|
spec:
|
|
|
|
clusterIP: None
|
|
|
|
# We want the servers to become available even if they're not ready
|
|
|
|
# since this DNS is also used for join operations.
|
|
|
|
publishNotReadyAddresses: true
|
|
|
|
ports:
|
|
|
|
- name: http
|
2018-10-02 21:14:57 +00:00
|
|
|
port: 8200
|
|
|
|
targetPort: 8200
|
2018-08-18 05:08:03 +00:00
|
|
|
selector:
|
2018-09-28 20:56:48 +00:00
|
|
|
app: {{ template "vault.name" . }}
|
2018-08-18 21:38:33 +00:00
|
|
|
release: "{{ .Release.Name }}"
|
|
|
|
component: server
|
2018-08-18 05:08:03 +00:00
|
|
|
{{- end }}
|