fix: variable namespaces for networkpolicies#3319
Conversation
Signed-off-by: juhyeon <28646684+juhyeon-cha@users.noreply.github.com>
|
@juliusvonkohout Until recently, |
|
@kunal-511 may you take a look? I think we need to adjust the test scripts then to only use the specific networkpolicies. Or we make our life easier and just create the namespaces in the multi-tenancy script if they do not exist yet. I will also do some dummy istio changes to trigger most tests. |
|
Thank you @juhyeon-cha |
|
[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. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Okay I think currently creating namespace in multi-tenancy script if they do not exist will work? |
|
I think especially everything outside of the kubeflow namespaces so cert-manager, knative-serving etc. We should directly move in this PR to the respective folders. |
|
@juhyeon-cha do you want to continue here? Otherwise we will for and continue. |
|
@juliusvonkohout I'm good for now, so please feel free to take over. Thanks! |
|
@juliusvonkohout i can take this up |
|
/assign |
Remove namespace override in kustomization.yaml to allow NetworkPolicies to use their self-defined namespaces. Also update multi_tenancy_install.sh to create required namespaces before applying network policies, ensuring the installation succeeds. Supersedes kubeflow#3319 Signed-off-by: Danish Ahuja <danish9039@gmail.com>
Remove namespace override in kustomization.yaml to allow NetworkPolicies to use their self-defined namespaces. Also update multi_tenancy_install.sh to create required namespaces before applying network policies, ensuring the installation succeeds. Supersedes kubeflow#3319 Signed-off-by: danish9039 <danishsiddiqui040@gmail.com>
Remove namespace override in kustomization.yaml to allow NetworkPolicies to use their self-defined namespaces. Also update multi_tenancy_install.sh to create required namespaces before applying network policies, ensuring the installation succeeds. Supersedes kubeflow#3319 Signed-off-by: danish9039 <danishsiddiqui040@gmail.com>
Remove namespace override in kustomization.yaml to allow NetworkPolicies to use their self-defined namespaces. Also update multi_tenancy_install.sh to create required namespaces before applying network policies, ensuring the installation succeeds. Supersedes kubeflow#3319 Signed-off-by: danish9039 <danishsiddiqui040@gmail.com>
* fix: variable namespaces for networkpolicies Remove namespace override in kustomization.yaml to allow NetworkPolicies to use their self-defined namespaces. Also update multi_tenancy_install.sh to create required namespaces before applying network policies, ensuring the installation succeeds. Supersedes #3319 Signed-off-by: danish9039 <danishsiddiqui040@gmail.com> * fix: restore netpol namespace & refactor overlays Signed-off-by: danish9039 <danishsiddiqui040@gmail.com> * fix: update multi-tenancy script to include new overlays Signed-off-by: danish9039 <danishsiddiqui040@gmail.com> * fix Signed-off-by: danish9039 <danishsiddiqui040@gmail.com> * refactor Signed-off-by: danish9039 <danishsiddiqui040@gmail.com> * fix Signed-off-by: danish9039 <danishsiddiqui040@gmail.com> * format yaml disable modification of spec.selector Signed-off-by: danish9039 <danishsiddiqui040@gmail.com> * refactor: move networkpolicy files to canonical paths Signed-off-by: danish9039 <danishsiddiqui040@gmail.com> * refactor: wire subfolder kustomizations and remove dead overlays Signed-off-by: danish9039 <danishsiddiqui040@gmail.com> * test: align cert-manager install and trivy scan paths Signed-off-by: danish9039 <danishsiddiqui040@gmail.com> * Update tests/cert_manager_install.sh Co-authored-by: Julius von Kohout <45896133+juliusvonkohout@users.noreply.github.com> Signed-off-by: hippie-danish <133037056+danish9039@users.noreply.github.com> * Update tests/trivy_scan.py Co-authored-by: Julius von Kohout <45896133+juliusvonkohout@users.noreply.github.com> Signed-off-by: hippie-danish <133037056+danish9039@users.noreply.github.com> * Update cert-manager installation script to use base Signed-off-by: Julius von Kohout <45896133+juliusvonkohout@users.noreply.github.com> * test: fix multitenancy wait and lint Signed-off-by: danish9039 <danishsiddiqui040@gmail.com> * Update tests/cert_manager_install.sh Co-authored-by: Julius von Kohout <45896133+juliusvonkohout@users.noreply.github.com> Signed-off-by: hippie-danish <133037056+danish9039@users.noreply.github.com> * Update tests/trainer_install.sh Co-authored-by: Julius von Kohout <45896133+juliusvonkohout@users.noreply.github.com> Signed-off-by: hippie-danish <133037056+danish9039@users.noreply.github.com> * Apply suggestion from @juliusvonkohout Signed-off-by: Julius von Kohout <45896133+juliusvonkohout@users.noreply.github.com> * Apply suggestion from @juliusvonkohout Signed-off-by: Julius von Kohout <45896133+juliusvonkohout@users.noreply.github.com> * Apply suggestion from @juliusvonkohout Signed-off-by: Julius von Kohout <45896133+juliusvonkohout@users.noreply.github.com> * Update multi_tenancy_install.sh Signed-off-by: Julius von Kohout <45896133+juliusvonkohout@users.noreply.github.com> * Apply suggestion from @juliusvonkohout Signed-off-by: Julius von Kohout <45896133+juliusvonkohout@users.noreply.github.com> * Comment out default-allow-same-namespace.yaml Comment out default network policy and note future changes. Signed-off-by: Julius von Kohout <45896133+juliusvonkohout@users.noreply.github.com> * Apply suggestions from code review Signed-off-by: Julius von Kohout <45896133+juliusvonkohout@users.noreply.github.com> * test: enable istio-system default-allow-same-namespace only Signed-off-by: danish9039 <danishsiddiqui040@gmail.com> * test(netpol): add istiod control-plane allow policy only Signed-off-by: danish9039 <danishsiddiqui040@gmail.com> * test(netpol): add istiod webhook apiserver policy only Signed-off-by: danish9039 <danishsiddiqui040@gmail.com> * lint Signed-off-by: danish9039 <danishsiddiqui040@gmail.com> * test(netpol): add oauth2-proxy ingressgateway allow policy only Signed-off-by: danish9039 <danishsiddiqui040@gmail.com> * netpol: allow oauth2-proxy and istio to reach dex Signed-off-by: danish9039 <danishsiddiqui040@gmail.com> * netpol: allow apiserver to reach knative webhook Signed-off-by: danish9039 <danishsiddiqui040@gmail.com> * netpol: allow apiserver to reach net-istio webhook Signed-off-by: danish9039 <danishsiddiqui040@gmail.com> * netpol: re-enable same-namespace allow for cert-manager Signed-off-by: danish9039 <danishsiddiqui040@gmail.com> * netpol: re-enable same-namespace allow for knative-serving Signed-off-by: danish9039 <danishsiddiqui040@gmail.com> * netpol: allow knative-serving to reach istio gateways Signed-off-by: danish9039 <danishsiddiqui040@gmail.com> * netpol: allow istio gateways to reach knative activator Signed-off-by: danish9039 <danishsiddiqui040@gmail.com> * move kubeflow network policy files into kubeflow namespace folder Signed-off-by: danish9039 <danishsiddiqui040@gmail.com> * rewire kubeflow namespace to apply moved network policies Signed-off-by: danish9039 <danishsiddiqui040@gmail.com> * addressed comments Signed-off-by: danish9039 <danishsiddiqui040@gmail.com> * move readme and owners Signed-off-by: juliusvonkohout <45896133+juliusvonkohout@users.noreply.github.com> * cleanup Signed-off-by: juliusvonkohout <45896133+juliusvonkohout@users.noreply.github.com> --------- Signed-off-by: danish9039 <danishsiddiqui040@gmail.com> Signed-off-by: hippie-danish <133037056+danish9039@users.noreply.github.com> Signed-off-by: Julius von Kohout <45896133+juliusvonkohout@users.noreply.github.com> Signed-off-by: juliusvonkohout <45896133+juliusvonkohout@users.noreply.github.com> Co-authored-by: Julius von Kohout <45896133+juliusvonkohout@users.noreply.github.com>
* fix: variable namespaces for networkpolicies Remove namespace override in kustomization.yaml to allow NetworkPolicies to use their self-defined namespaces. Also update multi_tenancy_install.sh to create required namespaces before applying network policies, ensuring the installation succeeds. Supersedes kubeflow#3319 Signed-off-by: danish9039 <danishsiddiqui040@gmail.com> * fix: restore netpol namespace & refactor overlays Signed-off-by: danish9039 <danishsiddiqui040@gmail.com> * fix: update multi-tenancy script to include new overlays Signed-off-by: danish9039 <danishsiddiqui040@gmail.com> * fix Signed-off-by: danish9039 <danishsiddiqui040@gmail.com> * refactor Signed-off-by: danish9039 <danishsiddiqui040@gmail.com> * fix Signed-off-by: danish9039 <danishsiddiqui040@gmail.com> * format yaml disable modification of spec.selector Signed-off-by: danish9039 <danishsiddiqui040@gmail.com> * refactor: move networkpolicy files to canonical paths Signed-off-by: danish9039 <danishsiddiqui040@gmail.com> * refactor: wire subfolder kustomizations and remove dead overlays Signed-off-by: danish9039 <danishsiddiqui040@gmail.com> * test: align cert-manager install and trivy scan paths Signed-off-by: danish9039 <danishsiddiqui040@gmail.com> * Update tests/cert_manager_install.sh Co-authored-by: Julius von Kohout <45896133+juliusvonkohout@users.noreply.github.com> Signed-off-by: hippie-danish <133037056+danish9039@users.noreply.github.com> * Update tests/trivy_scan.py Co-authored-by: Julius von Kohout <45896133+juliusvonkohout@users.noreply.github.com> Signed-off-by: hippie-danish <133037056+danish9039@users.noreply.github.com> * Update cert-manager installation script to use base Signed-off-by: Julius von Kohout <45896133+juliusvonkohout@users.noreply.github.com> * test: fix multitenancy wait and lint Signed-off-by: danish9039 <danishsiddiqui040@gmail.com> * Update tests/cert_manager_install.sh Co-authored-by: Julius von Kohout <45896133+juliusvonkohout@users.noreply.github.com> Signed-off-by: hippie-danish <133037056+danish9039@users.noreply.github.com> * Update tests/trainer_install.sh Co-authored-by: Julius von Kohout <45896133+juliusvonkohout@users.noreply.github.com> Signed-off-by: hippie-danish <133037056+danish9039@users.noreply.github.com> * Apply suggestion from @juliusvonkohout Signed-off-by: Julius von Kohout <45896133+juliusvonkohout@users.noreply.github.com> * Apply suggestion from @juliusvonkohout Signed-off-by: Julius von Kohout <45896133+juliusvonkohout@users.noreply.github.com> * Apply suggestion from @juliusvonkohout Signed-off-by: Julius von Kohout <45896133+juliusvonkohout@users.noreply.github.com> * Update multi_tenancy_install.sh Signed-off-by: Julius von Kohout <45896133+juliusvonkohout@users.noreply.github.com> * Apply suggestion from @juliusvonkohout Signed-off-by: Julius von Kohout <45896133+juliusvonkohout@users.noreply.github.com> * Comment out default-allow-same-namespace.yaml Comment out default network policy and note future changes. Signed-off-by: Julius von Kohout <45896133+juliusvonkohout@users.noreply.github.com> * Apply suggestions from code review Signed-off-by: Julius von Kohout <45896133+juliusvonkohout@users.noreply.github.com> * test: enable istio-system default-allow-same-namespace only Signed-off-by: danish9039 <danishsiddiqui040@gmail.com> * test(netpol): add istiod control-plane allow policy only Signed-off-by: danish9039 <danishsiddiqui040@gmail.com> * test(netpol): add istiod webhook apiserver policy only Signed-off-by: danish9039 <danishsiddiqui040@gmail.com> * lint Signed-off-by: danish9039 <danishsiddiqui040@gmail.com> * test(netpol): add oauth2-proxy ingressgateway allow policy only Signed-off-by: danish9039 <danishsiddiqui040@gmail.com> * netpol: allow oauth2-proxy and istio to reach dex Signed-off-by: danish9039 <danishsiddiqui040@gmail.com> * netpol: allow apiserver to reach knative webhook Signed-off-by: danish9039 <danishsiddiqui040@gmail.com> * netpol: allow apiserver to reach net-istio webhook Signed-off-by: danish9039 <danishsiddiqui040@gmail.com> * netpol: re-enable same-namespace allow for cert-manager Signed-off-by: danish9039 <danishsiddiqui040@gmail.com> * netpol: re-enable same-namespace allow for knative-serving Signed-off-by: danish9039 <danishsiddiqui040@gmail.com> * netpol: allow knative-serving to reach istio gateways Signed-off-by: danish9039 <danishsiddiqui040@gmail.com> * netpol: allow istio gateways to reach knative activator Signed-off-by: danish9039 <danishsiddiqui040@gmail.com> * move kubeflow network policy files into kubeflow namespace folder Signed-off-by: danish9039 <danishsiddiqui040@gmail.com> * rewire kubeflow namespace to apply moved network policies Signed-off-by: danish9039 <danishsiddiqui040@gmail.com> * addressed comments Signed-off-by: danish9039 <danishsiddiqui040@gmail.com> * move readme and owners Signed-off-by: juliusvonkohout <45896133+juliusvonkohout@users.noreply.github.com> * cleanup Signed-off-by: juliusvonkohout <45896133+juliusvonkohout@users.noreply.github.com> --------- Signed-off-by: danish9039 <danishsiddiqui040@gmail.com> Signed-off-by: hippie-danish <133037056+danish9039@users.noreply.github.com> Signed-off-by: Julius von Kohout <45896133+juliusvonkohout@users.noreply.github.com> Signed-off-by: juliusvonkohout <45896133+juliusvonkohout@users.noreply.github.com> Co-authored-by: Julius von Kohout <45896133+juliusvonkohout@users.noreply.github.com>
Pull Request Template for Kubeflow Manifests
✏️ Summary of Changes
The problem is that all NetworkPolicies are being created in the kubeflow namespace because the
namespacevalue is present in kustomization.yaml.✅ Contributor Checklist