apiVersion: v1
kind: Service
metadata:
  annotations:
    template.openshift.io/expose-uri: postgres://{.spec.clusterIP}:{.spec.ports[?(.name=="postgresql")].port}
  labels:
    template: postgresql-persistent-template
  name: postgresql
spec:
  ports:
  - name: postgresql
    port: 5432
    protocol: TCP
    targetPort: 5432
  selector:
    name: postgresql
  sessionAffinity: None
  type: ClusterIP
status:
  loadBalancer: {}
