Skip to content

Fix PSS restricted warnings for kubeflow components #3050

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

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

akagami-harsh
Copy link
Contributor

@akagami-harsh akagami-harsh commented Mar 13, 2025

Pull Request Template for Kubeflow Manifests

✏️ Summary of Changes

  • fixed PSS restricted warning for katib
  • working on fixing for other components

📦 Dependencies

List any dependencies or related PRs (e.g., "Depends on #123").

🐛 Related Issues

✅ Contributor Checklist


You can join the CNCF Slack and access our meetings at the Kubeflow Community website. Our channel on the CNCF Slack is here #kubeflow-platform.

Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign juliusvonkohout for approval. For more information see the Kubernetes Code Review Process.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@akagami-harsh
Copy link
Contributor Author

testing CI here, if it works then i'll make separate PRs to upstream repos

@akagami-harsh akagami-harsh changed the title Fix PSS ristricted warnings for kubeflow components Fix PSS restricted warnings for kubeflow components Mar 13, 2025
@juliusvonkohout
Copy link
Member

testing CI here, if it works then i'll make separate PRs to upstream repos

Thank you, please also leave this one here open as well :-)

@akagami-harsh
Copy link
Contributor Author

Screenshot from 2025-03-13 15-17-58

The cache-server is experiencing issues that appear to be related to the istio-init container. To mitigate this, Should i disable Istio sidecar injection for the cache-server deployment by adding the sidecar.istio.io/inject: "false" annotation to the cache-deployment.yaml file https://github.com/kubeflow/manifests/blob/master/apps/pipeline/upstream/base/cache/cache-deployment.yaml

@google-oss-prow google-oss-prow bot added size/L and removed size/M labels Mar 15, 2025
@akagami-harsh
Copy link
Contributor Author

The cache-server is experiencing issues that appear to be related to the istio-init container. To mitigate this, Should i disable Istio sidecar injection for the cache-server deployment by adding the sidecar.istio.io/inject: "false" annotation to the cache-deployment.yaml file https://github.com/kubeflow/manifests/blob/master/apps/pipeline/upstream/base/cache/cache-deployment.yaml

update: we can fix this by using istio-cni istio/istio#35894

@akagami-harsh
Copy link
Contributor Author

opened PR in respective upstream repos

@juliusvonkohout
Copy link
Member

I still see in the tests

Warning: existing pods in namespace "kubeflow" violate the new PodSecurity enforce level "restricted:latest"
Warning: centraldashboard-5796446d58-4h5jm: allowPrivilegeEscalation != false, unrestricted capabilities, runAsNonRoot != true, runAsUser=0, seccompProfile
namespace/kubeflow patched

now i also see why you have to set the seccomprofile at the pod level
image

@juliusvonkohout
Copy link
Member

kubeflow/pipelines#11751 for KFP has been merged

@juliusvonkohout
Copy link
Member

kubeflow/dashboard#87 for tracking in Kubeflow/ dashboard

@juliusvonkohout
Copy link
Member

juliusvonkohout commented Apr 25, 2025

@akagami-harsh there is something you can fix directly in kubeflow / manifests overlays, not the upstream part.

++ kubectl patch namespace knative-serving --patch-file ./experimental/security/PSS/static/restricted/patches/knative-serving-labels.yaml
+ PATCH_OUTPUT='Warning: existing pods in namespace "knative-serving" violate the new PodSecurity enforce level "restricted:latest"
Warning: activator-5f95966686-pgcpc (and 4 other pods): seccompProfile
namespace/knative-serving patched'
+ echo 'Warning: existing pods in namespace "knative-serving" violate the new PodSecurity enforce level "restricted:latest"
Warning: activator-5f95966686-pgcpc (and 4 other pods): seccompProfile
namespace/knative-serving patched'

@akagami-harsh
Copy link
Contributor Author

@akagami-harsh there is something you can fix directly in kubeflow / manifests overlays, not the upstream part.

++ kubectl patch namespace knative-serving --patch-file ./experimental/security/PSS/static/restricted/patches/knative-serving-labels.yaml
+ PATCH_OUTPUT='Warning: existing pods in namespace "knative-serving" violate the new PodSecurity enforce level "restricted:latest"
Warning: activator-5f95966686-pgcpc (and 4 other pods): seccompProfile
namespace/knative-serving patched'
+ echo 'Warning: existing pods in namespace "knative-serving" violate the new PodSecurity enforce level "restricted:latest"
Warning: activator-5f95966686-pgcpc (and 4 other pods): seccompProfile
namespace/knative-serving patched'

opened a pr #3118

@juliusvonkohout
Copy link
Member

Please rebase to master to fix the conflict

Copy link
Member

@juliusvonkohout juliusvonkohout May 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This must happen in an overlay.in apps/kserve Kserve_kubeflow.yaml comes from upstream and should not be modified

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this can be removed sinc eit is already patched here https://github.com/kubeflow/manifests/blob/master/apps/kserve/kserve/kustomization.yaml

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this patch still needed or can it be removed?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you fix this in another PR already?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, in this pr #3108

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this not yet upstream in KFP?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think i made a mistake here in this pr kubeflow/pipelines#11751 , accidentally modified this upstream argo deployment instead of adding a overlay. I'll create another pr in pipelines to fix this

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this already upstream?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had created a PR in kubeflow/kubeflow for this, but it was closed since the code has been moved to a new repo, kubeflow/notebooks. So, I’ll need to create a PR there now.

Signed-off-by: Harshvir Potpose <hpotpose62@gmail.com>
Signed-off-by: Harshvir Potpose <hpotpose62@gmail.com>
Signed-off-by: Harshvir Potpose <hpotpose62@gmail.com>
Signed-off-by: Harshvir Potpose <hpotpose62@gmail.com>
Signed-off-by: Harshvir Potpose <hpotpose62@gmail.com>
Signed-off-by: Harshvir Potpose <hpotpose62@gmail.com>
Signed-off-by: Harshvir Potpose <hpotpose62@gmail.com>
Signed-off-by: Harshvir Potpose <hpotpose62@gmail.com>
Signed-off-by: Harshvir Potpose <hpotpose62@gmail.com>
Signed-off-by: Harshvir Potpose <hpotpose62@gmail.com>
Signed-off-by: Harshvir Potpose <hpotpose62@gmail.com>
Signed-off-by: Harshvir Potpose <hpotpose62@gmail.com>
Signed-off-by: Harshvir Potpose <hpotpose62@gmail.com>
@juliusvonkohout
Copy link
Member

/retest

please split this up into separate PRs that are easy and faster to merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PSS baseline / restricted also for Notebooks, Katib, Kserve, Dashboard and istio-ingressgateway
2 participants