-
Notifications
You must be signed in to change notification settings - Fork 446
fix: eliminate hardcoded command names(move to distroless) #2075
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
Conversation
Signed-off-by: Joji Mekkattuparamban <jojim@nvidia.com>
|
/ok to test fbcc05a |
|
LGTM. Thanks Joji. |
| preStop: | ||
| exec: | ||
| command: ["/bin/sh", "-c", "rm -f /run/nvidia/validations/.cc-manager-ctr-ready"] | ||
| command: ["/bin/rm", "-f", "/run/nvidia/validations/.cc-manager-ctr-ready"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this change intended to be part of this PR? At the very least I would expect this to be a separate commit since it is not related to removing the hard-coded command names.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it is intended to be a part of this PR. The goal is to move to distroless which does not include the shell. This is also why we need the hardcoded names to be removed. I have updated the description and heading to mention this.
Description
Some of the operands viz. cc-manager and sandbox device plugin have their commands hardcoded. This causes problems, e.g. when we move to python or make a command name change for any reason. Instead, we want to let the Dockerfile specify the entrypoint. This is needed for moving to distroless. Also, updated the preStop hook not to use shell, consistent with distroless.
Checklist
make lint)make validate-generated-assets)make validate-modules)Testing
Manual testing on a cluster. Verified preStop lifecycle hook as well.