-
Notifications
You must be signed in to change notification settings - Fork 345
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
feat(cli): make kamel delete command aware of KameletBindings #2332
Conversation
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.
Just a few changes.. Thanks a lot!
fmt.Println("KameletBinding " + binding + " deleted") | ||
return nil | ||
} | ||
return c.Delete(ctx, integration) |
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.
Can you skip this when the KameletBinding is deleted? Deletion of integration is done in cascade, otherwise there might be temporary recreations.
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.
Actually, the code already relies on the cascading delete. In this code, when the KameletBinding is deleted
it early returns in the previous block so c.Delete(ctx, integration)
won't be executed. Isn't it what you suggest?
3ea3b6f
to
642a295
Compare
Kamelet Binding controller now attaches "created.by" labels to integrations which a kamelet binding creates, and `kamel delete` uses these labels to identify bindings to delete together if there is any. Fix apache#2305
642a295
to
86618ba
Compare
@nicolaferraro Changed. Can you have a look? Thanks! |
Kamelet Binding controller now attaches "created.by" labels to integrations which a kamelet binding creates, and
kamel delete
uses these labels to identify bindings to delete together if there is any.
Fix #2305