{{- if .Values.enabled }} apiVersion: v1 kind: Service metadata: name: {{ .Values.service.name }} namespace: {{ include "pgbouncer.namespace" . }} labels: {{- include "pgbouncer.labels" . | nindent 4 }} app.kubernetes.io/component: pgbouncer spec: type: ClusterIP selector: {{- include "pgbouncer.selectorLabels" . | nindent 4 }} app.kubernetes.io/component: pgbouncer ports: - name: pgbouncer port: {{ .Values.service.port }} targetPort: pgbouncer protocol: TCP {{- end }}