-
Notifications
You must be signed in to change notification settings - Fork 25
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
Cluster edit(patch) and delete #15
Conversation
@auhlig Which version of go-swagger did you install ( |
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 PR is only deleting the TPR but not the actual cluster which is deployed via helm. This definitely needs to be done in the groundctl controller and not the apiservers web request.
We further need to decide if we want to just react to the TPR deletion or as I previously suggested have a proper deleting lifecycle for the resource.
@BugRoger Thoughts?
Makefile
Outdated
@@ -50,5 +50,6 @@ ifndef HAS_GLIDE | |||
brew install glide | |||
endif | |||
ifndef HAS_SWAGGER | |||
brew tap go-swagger/go-swagger |
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.
Need to use tabs in makefiles. Spaces won't work.
pkg/api/handlers/delete_cluster.go
Outdated
} | ||
|
||
func (d *deleteCluster) Handle(params operations.DeleteClusterParams, principal *models.Principal) middleware.Responder { | ||
if err := d.rt.Clients.TPRClient().Delete().Namespace("kubernikus").Resource(tprv1.KlusterResourcePlural).LabelsSelectorParam(accountSelector(principal)).Name(params.Name).Do().Error(); err != nil { |
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 is deleting the TPR resource right away. I would favour an approach where we just updated the resources into a KlusterTerminating
status or something and take care of removing the cluster and all other resources before we delete the TPR.
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.
I would go with a DELETE lifecycle that is out-of-band with the deletion of the TPR.
@databus23 I'm using
|
Yeah, I had used a previous version:
So the massive changes are ok I would say. |
4f952c8
to
218f27c
Compare
218f27c
to
f5d5ef2
Compare
Fixes #5.
See 2nd commit.
Unclear, why swagger generated so many new lines in 4f952c808667a468ff370ade14535c1ee0b8acf9.