---
apiVersion: v1
kind: Service
metadata:
  name: workclub-postgres-headless
  labels:
    app: workclub-postgres
    component: database
spec:
  type: ClusterIP
  clusterIP: None
  selector:
    app: workclub-postgres
  ports:
  - name: postgresql
    port: 5432
    targetPort: 5432
    protocol: TCP
  publishNotReadyAddresses: true

---
apiVersion: v1
kind: Service
metadata:
  name: workclub-postgres
  labels:
    app: workclub-postgres
    component: database
spec:
  type: ClusterIP
  selector:
    app: workclub-postgres
  ports:
  - name: postgresql
    port: 5432
    targetPort: 5432
    protocol: TCP
