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

fix(kuma-cp): mesh delete validation #770

Merged
merged 5 commits into from
May 27, 2020
Merged

Conversation

lobkovilya
Copy link
Contributor

Summary

PR https://github.com/Kong/kuma/pull/742 introduced 2 owners for Dataplane resource - Pod and Mesh. It means Dataplane will be deleted only when both Pod and Mesh are deleted. That leads to wrong behavior during scaling up and down. Offline dps are owned by Mesh and hence aren't deleted.

This PR leaves only 1 owner for Dataplane - Pod. Also this PR adds validation of Mesh during DELETE. Now it is prohibited to delete Mesh when there are any Dataplane attached to that Mesh exists.

Full changelog

  • Delete Mesh owner of the Dataplane
  • Validation of Mesh during DELETE

@lobkovilya lobkovilya requested a review from a team May 25, 2020 14:03
@jakubdyszkiewicz
Copy link
Contributor

This seems to be implemented only for K8S, what about Universal?

Should we check existence of Dataplane or should we check if Dataplane is online?

@lobkovilya
Copy link
Contributor Author

This seems to be implemented only for K8S, what about Universal?

On Universal Dataplanes are owned by Mesh, there are no Pods, so Dataplanes will be deleted with Mesh as it was before.

Should we check existence of Dataplane

To be honest I didn't get that question, I allow to delete Mesh only if there are no dataplanes at all.

should we check if Dataplane is online?

That's a good point, I also thought about it. On k8s deleting of the Pod in 100% cases leads to deleting of the Dataplane resource. So if we observe "offline" state that probably occurred because of some underlying network connectivity problem or restarting of the container, anyway Pod exists and eventually might become "online" again. So probably if only "offline" dataplanes remain we also shouldn't remove the dp resource. Does it make sense?

Copy link
Contributor

@nickolaev nickolaev 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 to me.

# Conflicts:
#	app/kumactl/pkg/install/k8s/control-plane/templates_vfsdata.go
@lobkovilya lobkovilya merged commit 6616dab into master May 27, 2020
@lobkovilya lobkovilya deleted the fix/mesh-delete-validation branch May 27, 2020 13:34
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.

None yet

3 participants