Skip to content
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

helm-chart/ray-cluster: Allow setting pod lifecycle #494

Merged

Conversation

ulfox
Copy link
Contributor

@ulfox ulfox commented Aug 18, 2022

In this commit we extend the capability of ray-cluster helm chart to allow adding pod lifecycle in the head & worker nodes

Why are these changes needed?

The changes are not needed, but can extend the customization of the head & worker pods.

We can use postStart and preStop lifecycles to run custom commands. For example, send a webhook after a headnode starts.

Example:

  lifecycle:
    preStop:
      exec:
        command: ["/bin/sh","-c","ray stop"]

Example:
  lifecycle:
    preStop:
      exec:
        command: ["/bin/sh","-c","ray stop"]
@ulfox ulfox force-pushed the helm-chart/ray-cluster-add-lifecycle branch from 7802df9 to ff9fa0d Compare August 18, 2022 15:15
@DmitriGekhtman
Copy link
Collaborator

DmitriGekhtman commented Aug 20, 2022

Thanks!

This PR makes sense. Would you mind documenting the newly added field in values.yaml?

On a related note,
all of the sample RayCluster CR yamls specify a pre-stop "ray stop" hook.
In the future, we might have the operator auto-configure this hook (with preference for a user-specified overrides).

Copy link
Collaborator

@DmitriGekhtman DmitriGekhtman left a comment

Choose a reason for hiding this comment

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

This change looks good to me -- we can think later about whether to document it in values.yaml, as most users shouldn't have to touch this setting.

@DmitriGekhtman DmitriGekhtman merged commit 6fe0b3c into ray-project:master Aug 20, 2022
@ulfox ulfox deleted the helm-chart/ray-cluster-add-lifecycle branch August 20, 2022 20:18
lowang-bh pushed a commit to lowang-bh/kuberay that referenced this pull request Sep 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants