apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: name: firefly-ingress spec: podSelector: matchLabels: app.kubernetes.io/instance: firefly-iii app.kubernetes.io/name: firefly-iii policyTypes: - Ingress ingress: - from: - podSelector: matchLabels: app.kubernetes.io/name: traefik-ai # The chart's CronJob uses the same selector labels as the application. - podSelector: matchLabels: app.kubernetes.io/instance: firefly-iii app.kubernetes.io/name: firefly-iii ports: - protocol: TCP port: 8080 --- apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: name: firefly-postgres-ingress spec: podSelector: matchLabels: cnpg.io/cluster: firefly-postgres policyTypes: - Ingress ingress: - from: - podSelector: matchLabels: app.kubernetes.io/instance: firefly-iii app.kubernetes.io/name: firefly-iii - podSelector: matchLabels: cnpg.io/cluster: firefly-postgres ports: - protocol: TCP port: 5432 # CloudNativePG operator health/status traffic to the instance manager. - from: - namespaceSelector: matchLabels: kubernetes.io/metadata.name: psql podSelector: matchLabels: app.kubernetes.io/name: cloudnative-pg ports: - protocol: TCP port: 8000