Skip to content

Commit

Permalink
fix: revert networkpolicy label selector (#2393)
Browse files Browse the repository at this point in the history
Prior, the label selector "k8s-app=kube-dns" in the NetworkPolicy
template was changed to target the updated vcluster coredns pod name,
vcluster-kube-dns. Enabling NetworkPolicy creates a NetworkPolicy in
the host cluster. The NetworkPolicy intends to target the host's
coredns pod which is still named kube-dns. The NetworkPolicy is
additionally targeting the kube-system namespace. There is no pod that
matches the "k8s-app=kube-dns" selector in the host's kube-system
namespace. Now, the change to the NetworkPolicy's label selector has
been reverted so that it properly selects for the host's kube-dns
pod.

(cherry picked from commit 28c0b4c)
rmweir committed Jan 13, 2025
1 parent 4e0fe03 commit 98dc551
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion chart/templates/networkpolicy.yaml
Original file line number Diff line number Diff line change
@@ -94,7 +94,7 @@ spec:
kubernetes.io/metadata.name: 'kube-system'
podSelector:
matchLabels:
k8s-app: vcluster-kube-dns
k8s-app: kube-dns
{{- if .Values.policies.networkPolicy.outgoingConnections.platform }}
- podSelector:
matchLabels:

0 comments on commit 98dc551

Please sign in to comment.