libcontainerd/supervisor: clean up (dead) code#43901
Merged
cpuguy83 merged 2 commits intomoby:masterfrom Aug 9, 2022
Merged
Conversation
This removes the `WithRemoteAddr()`, `WithRemoteAddrUser()`, `WithDebugAddress()`, and `WithMetricsAddress()` options, added in ddae20c, but most of them were never used, and `WithRemoteAddr()` no longer in use since dd2e19e. Signed-off-by: Sebastiaan van Stijn <[email protected]>
The existing implementation used a `nil` value for the CRI plugin's configuration to indicate that the plugin had to be disabled. Effectively, the `Plugins` value was only used as an intermediate step, only to be removed later on, and to instead add the given plugin to `DisabledPlugins` in the containerd configuration. This patch removes the intermediate step; as a result we also don't need to mask the containerd `Plugins` field, which was added to allow serializing the toml. A code comment was added as well to explain why we're (currently) disabling the CRI plugin by default, which may help future visitors of the code to determin if that default is still needed. Signed-off-by: Sebastiaan van Stijn <[email protected]>
Member
Author
corhere
approved these changes
Aug 9, 2022
cpuguy83
approved these changes
Aug 9, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
(still some other clutter that can be cleaned up, but keeping that for a later exercise)
libcontainerd/supervisor: remove unused options
This removes the
WithRemoteAddr(),WithRemoteAddrUser(),WithDebugAddress(),and
WithMetricsAddress()options, added in ddae20c,but most of them were never used, and
WithRemoteAddr()no longer in use sincedd2e19e.
libcontainerd/supervisor: simplify logic for disabling CRI plugin
The existing implementation used a
nilvalue for the CRI plugin's configurationto indicate that the plugin had to be disabled. Effectively, the
Pluginsvaluewas only used as an intermediate step, only to be removed later on, and to instead
add the given plugin to
DisabledPluginsin the containerd configuration.This patch removes the intermediate step; as a result we also don't need to mask
the containerd
Pluginsfield, which was added to allow serializing the toml.A code comment was added as well to explain why we're (currently) disabling the
CRI plugin by default, which may help future visitors of the code to determin
if that default is still needed.
- A picture of a cute animal (not mandatory but encouraged)