project-codeflare / codeflare-operator

Operator for installation and lifecycle management of CodeFlare distributed workload stack
Apache License 2.0
7 stars 45 forks source link

Mutate and Validate RayCluster on SecurityContext #574

Closed ChristianZaccaria closed 5 months ago

ChristianZaccaria commented 5 months ago

Issue link

Jira: https://issues.redhat.com/browse/RHOAIENG-7638

What changes have been made

Verification steps

  1. Create Data science project in RHOAI
  2. Create and start workbench
  3. Find OpenShift namespace corresponding to the Data science project name, add labels to the namespace resource with value:
    • pod-security.kubernetes.io/enforce: restricted
    • pod-security.kubernetes.io/enforce-version: v1.24
  4. Clone SDK demo notebooks in Workbench
  5. Setup Kueue resources
  6. Run i.e. 0_basic_ray.ipynb Notebook, try to create Ray cluster
  7. RayCluster should start with or without the labels set in the Namespace resource.
  8. You may also check that the SecurityContext is added to both head and worker containers when the mentioned labels have been set.
  9. Attempt to create a RayCluster without the SecurityContext, and attempt to update the SecurityContext once the RayCluster is created. The ValidatingWebhook should reject these actions.

Checks

openshift-ci[bot] commented 5 months ago

[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 ask for approval from christianzaccaria. 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: - **[OWNERS](https://github.com/project-codeflare/codeflare-operator/blob/main/OWNERS)** Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
Fiona-Waters commented 5 months ago

I've run this on my cluster:

KPostOffice commented 5 months ago

@ChristianZaccaria Should we close this then in lieu of https://github.com/opendatahub-io/kuberay/pull/19 ?

ChristianZaccaria commented 5 months ago

Closing in lieu of https://github.com/opendatahub-io/kuberay/pull/19