apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  labels:
    app.kubernetes.io/instance: keycloak
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: postgresql
    helm.sh/chart: postgresql-9.1.1
  name: keycloak-postgresql
spec:
  ingress:
    - ports:
        - port: 5432
    - ports:
        - port: 9187
  podSelector:
    matchLabels:
      app.kubernetes.io/instance: keycloak
      app.kubernetes.io/name: postgresql
