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

[BGD-5797] add bns role to list and patch CR #224

Merged
merged 2 commits into from
Sep 13, 2024

Conversation

epignot
Copy link
Contributor

@epignot epignot commented Aug 29, 2024

Jira ticket

https://spotinst.atlassian.net/browse/BGD-5797

Description

We want the notebook-service to be able to watch sparkapp CR and add annotations bigdata.spot.io/kill-requested-at in them and let spark-watcher kill the app.
This will happen at each kernel shutdown handled by bns

Checklist

  • I have added a Jira ticket link
  • I have filled in the test plan
  • I have executed the tests and filled in the test results
  • I have updated/created relevant documentation

How to test

  • Apply chart on a cluster with helm upgrade bigdata-notebook-service-bdenv-vXX bigdata-notebook-service -n spot-system
  • Update your bigdata-notebook-service deployment with the image from this PR spotinst/bigdata-python-services#1332
  • Start a notebook and wait for it to be running
  • Click on the restart button in JupyterLab UI
  • Check notebook-service manage to update the annotation, you should see something like:
Found CRD for this kernel_id=8221eeb6-2b57-42ea-b51f-9cefea265c1f in namespace=spark-apps
Updated annotations for sparkapplication: nb-8221eeb6-2b57-42ea-b51f-9cefea265c1f-84255
  • Check following annotations are present in sparkapp CR :
bigdata.spot-io/kill-reason
bigdata.spot-io/kill-requested-at

Test plan and results

Test Description Result Notes
1 Apply chart Pass
2 Annotation is present on SparkApp CR after kernel restart Pass

cluster role binding
Screenshot 2024-08-29 at 17 59 14

cluster role
Screenshot 2024-08-29 at 17 58 52

bigdata-notebook-service logs showing kernel restart + annotation update
Screenshot 2024-08-29 at 17 58 27

SparkApp CR with annotations
Screenshot 2024-08-29 at 17 58 09

@epignot epignot requested a review from a team as a code owner August 29, 2024 16:15
@epignot epignot force-pushed the bgd-5797-bns-clusterrole-update-cr-annotation branch from 821d408 to a2c6659 Compare August 29, 2024 16:24
Copy link

@originou originou left a comment

Choose a reason for hiding this comment

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

lgtm

@epignot epignot force-pushed the bgd-5797-bns-clusterrole-update-cr-annotation branch from a2c6659 to e3f816e Compare September 9, 2024 08:46
Copy link
Contributor

@alextarasov-spot alextarasov-spot left a comment

Choose a reason for hiding this comment

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

lgtm

Emmanuel Pignot added 2 commits September 12, 2024 10:01
Why?
We want the notebook-service to be able to watch sparkapp CR and add
annotations `bigdata.spot.io/kill-requested-at` in them and let
spark-watcher kill the app.
This will happen at each kernel shutdown handled by bns
@epignot epignot force-pushed the bgd-5797-bns-clusterrole-update-cr-annotation branch from e3f816e to 135b4d6 Compare September 12, 2024 08:01
@epignot epignot merged commit 92f45be into main Sep 13, 2024
1 check passed
@epignot epignot deleted the bgd-5797-bns-clusterrole-update-cr-annotation branch September 13, 2024 09:17
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.

4 participants