Deprecate the hook config mode for cri-o#1314
Conversation
Pull Request Test Coverage Report for Build 17973486093Details
💛 - Coveralls |
ArangoGutierrez
left a comment
There was a problem hiding this comment.
LGTM, I'll leave final approval to ELezar
| Name = "crio" | ||
|
|
||
| defaultConfigMode = "hook" | ||
| defaultConfigMode = "config" |
There was a problem hiding this comment.
My one question was whether we wanted to print a deprecation warning when hook is configured?
In this case we would also need to update the nvidia-ctk runtime configure command to issue a similar warning.
5446a9e to
e1f0f36
Compare
| Usage: "the path to the OCI runtime hook to create if --config-mode=oci-hook is specified. If no path is specified, the generated hook is output to STDOUT.\n" + | ||
| "\tNote: The use of OCI hooks is deprecated.", |
There was a problem hiding this comment.
[nitpick] String concatenation across multiple lines reduces readability. Consider using a multi-line string literal or keeping the original format for better maintainability.
| Usage: "the path to the OCI runtime hook to create if --config-mode=oci-hook is specified. If no path is specified, the generated hook is output to STDOUT.\n" + | |
| "\tNote: The use of OCI hooks is deprecated.", | |
| Usage: `the path to the OCI runtime hook to create if --config-mode=oci-hook is specified. If no path is specified, the generated hook is output to STDOUT. | |
| Note: The use of OCI hooks is deprecated.`, |
| } | ||
|
|
||
| func (opts *Options) Validate(logger logger.Interface, _ *cli.Command) error { | ||
| if opts.configMode == "hook" { |
There was a problem hiding this comment.
Use the defined constant configModeHook instead of the string literal "hook" for consistency with the newly introduced constants.
This chagne updates the default cri-o config mode from 'hook' to 'config' and issues a deprecation warning if hook is explicitly selected. Signed-off-by: Christopher Desiniotis <cdesiniotis@nvidia.com> Co-authored-by: Evan Lezar <elezar@nvidia.com>
e1f0f36 to
781bbe2
Compare
elezar
left a comment
There was a problem hiding this comment.
Thanks @cdesiniotis.
I added the deprecation log messages as changes on-top.
|
Thanks @elezar |
The GPU Operator is switching from 'hook' to 'config' by default in the next release. This change ensures the default behavior of the toolkit container and GPU Operator are aligned. We also add deprecation messages to cases where an OCI hook is explicitly requested.
See thread for additional context: NVIDIA/gpu-operator#1578 (comment)