-
Notifications
You must be signed in to change notification settings - Fork 43
Code for extension install and delete #228
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
Code for extension install and delete #228
Conversation
e5dd128
to
b987def
Compare
09bb547
to
f4a9fed
Compare
As discussed with @joelanford and @ankitathomas, not adding the code for |
e0e98ef
to
f73b91f
Compare
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.
Looking good mostly @LalatenduMohanty 🎉
By Looks like,
will the |
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.
/lgtm
fs.StringSliceVarP(&i.Channels, "channels", "c", []string{}, "channels which would be to used for getting updates e.g --channels \"stable,dev-preview,preview\"") | ||
fs.StringVarP(&i.Version, "version", "v", "", "version (or version range) from which to resolve bundles") | ||
fs.StringVarP(&i.ServiceAccount, "service-account", "s", "default", "service account name to use for the extension installation") | ||
fs.DurationVarP(&i.CleanupTimeout, "cleanup-timeout", "d", time.Minute, "the amount of time to wait before cancelling cleanup after a failed creation attempt") |
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.
Is this a replacement for the global timeout flag?
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.
Right, I continued the catalog create
code pattern. Currently the OLMv1 code do not use https://github.com/operator-framework/kubectl-operator/blob/main/internal/cmd/root.go#L36-#L38 global timeout.
for _, extension := range extensionList.Items { | ||
names = append(names, extension.Name) | ||
if _, err := u.deleteExtension(ctx, extension.Name); err != nil { | ||
errs = append(errs, fmt.Errorf("failed deleting extension %q: %w", extension.Name, err)) |
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.
Standard kubectl behavior is to treat deleting non-existent resources as a failed operation, except for delete --all
. That being said, I'm fine with this to maintain consistency with the current implementation of catalog delete
.
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.
Right, I am fine with either way. The catalog and extension create/install uses the same pattern now.
Nope, I am talking about
|
f73b91f
to
19f30e1
Compare
19f30e1
to
6078f8e
Compare
Signed-off-by: Lalatendu Mohanty <[email protected]>
6078f8e
to
3e6324f
Compare
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.
/lgtm
Here are the commands to test the PR. I used https://github.com/operator-framework/operator-controller/blob/main/config/samples/olm_v1_clusterextension.yaml to create the service-account etc