kserve: set storage initializer security context#3527
Conversation
Signed-off-by: danish9039 <danishsiddiqui040@gmail.com>
|
Welcome to the Kubeflow Community Distribution Repository Thanks for opening your first PR. Your contribution means a lot to the Kubeflow community. Before making more PRs: Community Resources:
Thanks again for helping to improve Kubeflow. |
|
[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 |
There was a problem hiding this comment.
Pull request overview
This pull request adds a Kustomize strategic-merge patch in the Kubeflow KServe overlay to apply a Pod Security Standards (restricted) compatible securityContext to the KServe storage initializer definition (ClusterStorageContainer/default), without modifying synchronized upstream bundle files.
Changes:
- Add a new Kustomize patch targeting
serving.kserve.io/v1alpha1 ClusterStorageContainer/default. - Set a restricted-PSS aligned
securityContextonspec.container(no privilege escalation, drop all capabilities, non-root user, RuntimeDefault seccomp).
Pull Request Template for Kubeflow Manifests
Summary of Changes
This PR adds a Kubeflow manifests-side Kustomize patch for
ClusterStorageContainer/defaultso the KServe storage initializer container has a restricted-PSS compatiblesecurityContext.The patch sets:
allowPrivilegeEscalation: falsecapabilities.drop: [ALL]runAsNonRoot: truerunAsUser: 1000seccompProfile.type: RuntimeDefaultIt does not edit generated upstream KServe bundle files and does not change test scripts.
Dependencies
Related to #3487. After this lands and is consumed by #3487, the temporary runtime
kubectl patch clusterstoragecontainer defaultin #3487 can be removed.Related Issues
Related to #3487.
Contributor Checklist
Validation:
kustomize build applications/kserve/kserveClusterStorageContainer/defaultsecurityContext assertiongit diff --check