Skip to content
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

Kubernetes: apps with binded volumes can't change namespaces #2180

Merged
merged 5 commits into from
Oct 25, 2018

Conversation

ggarnier
Copy link
Member

@ggarnier ggarnier commented Oct 9, 2018

Currently we don't support moving volumes between namespaces of a Kubernetes cluster. This PR adds a validation to prevent this.

Moving between different clusters works fine.

Copy link
Member

@andrestc andrestc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good but I think there is missing step when moving apps accross different clusters: removing the volume claim and the volume on the old cluster.

I think both should be done on the provisioner.Destroy(app) method (which is called for the old app once it was migrated). The PVC should always be removed but the volume should only be removed if there isn't another app bound to it.

Deleting the volume should only be done if there is no other application bound to the volume.

@ggarnier
Copy link
Member Author

@andrestc PTAL

@andrestc
Copy link
Member

LGTM.

@ggarnier ggarnier merged commit 69c2098 into tsuru:master Oct 25, 2018
@ggarnier ggarnier deleted the kube-update-volume branch October 25, 2018 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants