-
Notifications
You must be signed in to change notification settings - Fork 553
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
Migrate cosign sign to cobra #762
Conversation
|
||
// TODO: an interesting idea? This hides the flags that are experimental | ||
// unless experimental is enabled. | ||
if EnableExperimental() { |
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.
Review this, I can revert, I thought it was interesting at this moment.
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.
hmmm, I kinda like it and I also kinda don't. I like that you'd be seeing COSIGN_EXPERIMENTAL=👍
before even trying to execute a command, but I also like the discoverability of just having them out in the open with the "[EXPERIMENTAL]" caveat and the feature flag gate
@@ -171,34 +170,25 @@ EXAMPLES | |||
`, | |||
FlagSet: flagset, | |||
Exec: func(ctx context.Context, args []string) error { |
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.
This should never be called.
Signed-off-by: Scott Nichols <[email protected]>
cmd.Flags().StringSliceVarP(&o.Annotations, "annotations", "a", nil, | ||
"extra key=value pairs to sign") | ||
|
||
cmd.Flags().BoolVar(&o.RegistryOpts.AllowInsecure, "allow-insecure-registry", false, |
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.
IMHO we'll want to keep shared flag logic split out into shared libraries. e.g. registry opts, rekor opts, fulcio (OIDC) opts
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, that will come as I see what is common.
|
||
// TODO: an interesting idea? This hides the flags that are experimental | ||
// unless experimental is enabled. | ||
if EnableExperimental() { |
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.
hmmm, I kinda like it and I also kinda don't. I like that you'd be seeing COSIGN_EXPERIMENTAL=👍
before even trying to execute a command, but I also like the discoverability of just having them out in the open with the "[EXPERIMENTAL]" caveat and the feature flag gate
Summary
Migrate
cosign sign
to a new cobra code path. Same options.No option grouping yet. That will happen as we progress this process.
Ticket Link
Relates to #706
Release Note