apiVersion: v1
kind: Service
metadata:
  name: {{ template "couchdb.fullname" . }}
  labels:
    app: {{ template "couchdb.name" . }}
    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
    release: {{ .Release.Name }}
    heritage: {{ .Release.Service }}
spec:
  clusterIP: None
  publishNotReadyAddresses: true
  ports:
    - name: couchdb
      port: 5984
{{- if .Values.prometheusPort.enabled }}
    - name: metrics
      port: {{ .Values.prometheusPort.port }}
{{- end }}
  selector:
{{ include "couchdb.ss.selector" . | indent 4 }}
