Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: revert networkpolicy label selector #2393

Merged
merged 1 commit into from
Jan 13, 2025

Conversation

rmweir
Copy link
Contributor

@rmweir rmweir commented Jan 13, 2025

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.

What issue type does this pull request address? (keep at least one, remove the others)
/kind bugfix

What does this pull request do? Which issues does it resolve? (use resolves #<issue_number> if possible)
Fixes ENG-5522

Please provide a short message that should be published in the vcluster release notes
Fixed an issue where vcluster with etcd backing store did not have access to host's coredns pod.

What else do we need to know?

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.
Copy link

netlify bot commented Jan 13, 2025

Deploy Preview for vcluster-docs canceled.

Built without sensitive environment variables

Name Link
🔨 Latest commit 8419baf
🔍 Latest deploy log https://app.netlify.com/sites/vcluster-docs/deploys/6785545fab7254000836e52a

@rmweir rmweir marked this pull request as ready for review January 13, 2025 17:59
@rmweir rmweir merged commit 28c0b4c into loft-sh:main Jan 13, 2025
62 checks passed
loft-bot pushed a commit that referenced this pull request Jan 13, 2025
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)
@loft-bot
Copy link

💚 All backports created successfully

Status Branch Result
v0.22

Questions ?

Please refer to the Backport tool documentation and see the Github Action logs for details

rmweir added a commit that referenced this pull request Jan 13, 2025
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)

Co-authored-by: Ricardo Weir <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants