blob: 92f1141ba767dd8009f37b877471d202e8079d26 [file] [log] [blame]
{{- if .Values.replicaSet.enabled }}
apiVersion: v1
kind: Service
metadata:
name: {{ template "mongodb.fullname" . }}-headless
labels:
app: {{ template "mongodb.name" . }}
chart: {{ template "mongodb.chart" . }}
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
{{- with .Values.service.annotations }}
annotations: {{ tpl (toYaml .) $ | nindent 4 }}
{{- end }}
spec:
type: ClusterIP
clusterIP: None
ports:
- name: mongodb
port: {{ .Values.service.port }}
selector:
app: {{ template "mongodb.name" . }}
release: {{ .Release.Name }}
{{- end }}