# External Secrets' three pods reach each other, DNS and the API server # (the node, port 16443); the controller also reads Vault # (vault-active.vault.svc:8200, which vault/networkpolicy.yaml lets it # into). Besides their own namespace they take connections only from the # node: the API server calls the webhook from there and the kubelet probes # come from there too (10.1.7.64 is the node's Calico VXLAN address, # projectcalico.org/IPv4VXLANTunnelAddr). The Password generator behind # gatus/backup-check-token needs no network. The chart's Application # (apps/templates/external-secrets-helm.yaml) only installs the chart, so # this folder gets an Application of its own, external-secrets-folder. apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: name: default spec: podSelector: {} policyTypes: - Ingress - Egress ingress: - from: - podSelector: {} - from: - ipBlock: cidr: 192.168.1.204/32 - ipBlock: cidr: 10.1.7.64/32 egress: - to: - podSelector: {} - to: - namespaceSelector: matchLabels: kubernetes.io/metadata.name: kube-system podSelector: matchLabels: k8s-app: kube-dns ports: - protocol: UDP port: 53 - protocol: TCP port: 53 - to: - ipBlock: cidr: 192.168.1.204/32 ports: - port: 16443 --- apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: name: controller-to-vault spec: podSelector: matchLabels: app.kubernetes.io/name: external-secrets policyTypes: - Egress egress: - to: - namespaceSelector: matchLabels: kubernetes.io/metadata.name: vault podSelector: matchLabels: app.kubernetes.io/name: vault ports: - port: 8200