-
Notifications
You must be signed in to change notification settings - Fork 960
Restrict webhook access to kube-system API server #3031
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
base: master
Are you sure you want to change the base?
Restrict webhook access to kube-system API server #3031
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
- key: control-plane | ||
operator: In | ||
values: | ||
- kserve-controller-manager # mutating webhook | ||
# https://www.elastic.co/guide/en/cloud-on-k8s/1.1/k8s-webhook-network-policies.html |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we have added the restriction, do we want the comments to be updated here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you suggest?
Thank you for the PR. Do you know whether
works for all popular clusters, so AKS, EKS, GKE, KIND; MINIKUBE; Rancher ? |
@juliusvonkohout So I did some research on locally hosted and managed clusters(GKE, AKS, EKS...) like the one you listed above, but I couldn't find any clear issues with the above approach. Are you suggesting using matchExpressions for more flexibility instead of matchLabels, or are you recommending exposing the entire namespace rather than targeting the specific API server? I'm a bit lost, could you point me in the right direction? Edit: Also, I will add the restriction to the other network policies once we finalize the implementation to enforce the restrictions. |
I would just like to get this tested on GKE, AKS, EKS and rancher before we merge it. @tarekabouzeid @varodrig can you help with that? |
can we include OpenShift as well? |
Yes, please test on what you have available and report back. |
@ViciousEagle03 sorry for the delay. it might be that we only merge this after the 1.10.0 release. |
Signed-off-by: ViciousEagle03 <piyushsharma04321@gmail.com>
73a1013
to
7fcb9b0
Compare
I am just waiting for test feedback to merge this. |
Pull Request Template for Kubeflow Manifests
✏️ Summary of Changes
Modified the below files in the
common/networkpolicies/base
directorykserve.yaml
pvcviewer-webhook.yaml
spark-operator-webhook.yaml
training-operator-webhook.yaml
Added the necessary restriction to allow access only from the apiserver namespace kube-system for webhooks.
Fixed YAML indentation issues that were previously undetected, as the workflow was not triggered on commits modifying the
kserve.yaml
,pvcviewer-webhook.yaml
file.📦 Dependencies
🐛 Related Issues
✅ Contributor Checklist