kind: Service
apiVersion: v1
metadata:
  annotations:
    template.openshift.io/expose-uri: 'postgres://{.spec.clusterIP}:{.spec.ports[?(.name=="postgresql")].port}'
  name: sample-database
  namespace: fiap-grupo-16
  labels:
    app: sample-database
    app.kubernetes.io/component: sample-database
    app.kubernetes.io/instance: sample-database
    template: postgresql-persistent-template
spec:
  ports:
    - name: postgresql
      protocol: TCP
      port: 5432
      targetPort: 5432
  selector:
    name: sample-database