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

Refactoring deployer exec root-homes command #5279

Merged
merged 14 commits into from
Dec 17, 2024

Conversation

sgibson91
Copy link
Member

@sgibson91 sgibson91 commented Dec 12, 2024

  • Addresses an action point in https://github.com/2i2c-org/meta/issues/1671
  • Splits up the kubectl run command into a create and exec couplet. This means that the bash process we start will not be PID 1, therefore we can safely exit the pod without causing it to restart (which was happening before). This is because PID 1 is special, and killing it is the same as sending a shutdown command which was causing the pod to restart.
  • Adds an --persist option to NOT cleanup the pod on completion if required

sgibson91 and others added 5 commits December 12, 2024 14:18
- Ensures the pod spec has the right metadata to be placed in the correct namespace
- Dumps the pod spec to a temp json file
- Runs kubectl create then kubectl exec to access the pod
- This ensures that our bash process is NOT PID 1, which will mean the container will NOT restart if we exit that process for any reason
- Cleans up the temp json file

This comment was marked as off-topic.

@sgibson91 sgibson91 added the deployer:skip-deploy Skips deployment of anything (support, staging, prod) label Dec 13, 2024
@sgibson91 sgibson91 marked this pull request as ready for review December 13, 2024 11:04
Co-authored-by: Yuvi Panda <[email protected]>
Copy link
Member

@GeorgianaElena GeorgianaElena left a comment

Choose a reason for hiding this comment

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

Thanks for updating and documenting this @sgibson91!

@sgibson91 sgibson91 merged commit 72edf0c into 2i2c-org:main Dec 17, 2024
39 checks passed
@sgibson91 sgibson91 deleted the deployer/exec-root-homes-refactor branch December 17, 2024 09:55
Copy link

🎉🎉🎉🎉

Monitor the deployment of the hubs here 👉 https://github.com/2i2c-org/infrastructure/actions/runs/12370550714

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployer:skip-deploy Skips deployment of anything (support, staging, prod)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants