# Headless service for Vault server DNS entries. This service should only # point to Vault servers. For access to an agent, one should assume that # 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 # communicate directly to a server agent. {{- if and (eq (.Values.server.service.enabled | toString) "true" ) (eq (.Values.global.enabled | toString) "true") }} apiVersion: v1 kind: Service metadata: name: {{ template "vault.fullname" . }} labels: app: {{ template "vault.name" . }} chart: {{ template "vault.chart" . }} heritage: {{ .Release.Service }} release: {{ .Release.Name }} 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 port: 8200 targetPort: 8200 - name: internal port: 8201 targetPort: 8201 selector: app: {{ template "vault.name" . }} release: "{{ .Release.Name }}" component: server {{- end }}