37 lines
1.1 KiB
YAML
37 lines
1.1 KiB
YAML
{{- if not .Values.experimental.isolatedControlPlane.headless }}
|
|
{{- if or .Values.controlPlane.backingStore.etcd.deploy.enabled (include "vcluster.etcd.embedded.migrate" .) }}
|
|
{{- if .Values.controlPlane.backingStore.etcd.deploy.headlessService.enabled }}
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: {{ .Release.Name }}-etcd-headless
|
|
namespace: {{ .Release.Namespace }}
|
|
labels:
|
|
app: vcluster-etcd
|
|
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
|
release: "{{ .Release.Name }}"
|
|
heritage: "{{ .Release.Service }}"
|
|
{{- $annotations := merge dict .Values.controlPlane.advanced.globalMetadata.annotations .Values.controlPlane.backingStore.etcd.deploy.headlessService.annotations }}
|
|
{{- if $annotations }}
|
|
annotations:
|
|
{{ toYaml $annotations | indent 4 }}
|
|
{{- end }}
|
|
spec:
|
|
publishNotReadyAddresses: true
|
|
ports:
|
|
- name: etcd
|
|
port: 2379
|
|
targetPort: 2379
|
|
protocol: TCP
|
|
- name: peer
|
|
port: 2380
|
|
targetPort: 2380
|
|
protocol: TCP
|
|
clusterIP: None
|
|
selector:
|
|
app: vcluster-etcd
|
|
release: "{{ .Release.Name }}"
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|