fix/feat: Add options for 'generator installer', remove unused -o/-f options from 'generator' base command help, and change some wording #596
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.
Made a few changes to the 'generator installer' command to make it easier to script with. The command now has
--image-name
and--image-tag
options so users can specify these values when the kustomization YAML is generated, instead of manually editing the file after the fact. Some of the other options for this command were not utilizing the McMaster CLI default value feature, so those values have been added in-line to make it clearer to users what the defaults are if they do not provide them. I also reworded some of the option descriptions to be more unambiguous about what is expected to be in those folders.BREAKING CHANGE:
Additionally, the
Generator
class no longer inherits fromGeneratorBase
, andGeneratorBase
has been renamed toOutputBase
. This is because the--out
and--format
options were shown under thegenerator
command, but it seems they didn't actually do anything for that command. Instead, it seems those options are only used by the sub-commands themselves (docker
,crds
,rbac
, etc) when the YAML/JSON is generated. So now, only thecrd
,rbac
,docker
,installer
, andoperator
commands inherit fromOutputBase
. This will only be a breaking change for users who are unwittingly using the options on thegenerator
command that go unused by the SDK.If that shouldn't be a breaking change, some dummy options can be created and hidden under the
generator
command to prevent CLI parsing errors. However, this will result in unexpected behavior for new users if they accidentally place their -o/-f options on the wrong command (resulting in the contents being output to the console), which is somewhat similar to how it behaved before this PR.