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