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

feat(kuma-cp) validate zone location apply #986

Merged
merged 5 commits into from
Aug 24, 2020

Conversation

jakubdyszkiewicz
Copy link
Contributor

@jakubdyszkiewicz jakubdyszkiewicz commented Aug 18, 2020

Summary

Adds validation of applying Zone on standalone/remote

Signed-off-by: Jakub Dyszkiewicz <jakub.dyszkiewicz@gmail.com>
@@ -36,7 +36,6 @@ rules:
- update
- patch
- delete
{{- if eq .KumaCpMode "global" }}
Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm, how safe is to remove this restriction?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Safe. We need to have CRD+permissions to apply Zone on standalone/remote to actually throw a validation error

…alidation

Signed-off-by: Jakub Dyszkiewicz <jakub.dyszkiewicz@gmail.com>
Signed-off-by: Jakub Dyszkiewicz <jakub.dyszkiewicz@gmail.com>
@jakubdyszkiewicz jakubdyszkiewicz marked this pull request as ready for review August 21, 2020 12:45
@jakubdyszkiewicz jakubdyszkiewicz requested a review from a team as a code owner August 21, 2020 12:45
…alidation

Signed-off-by: Jakub Dyszkiewicz <jakub.dyszkiewicz@gmail.com>
Signed-off-by: Jakub Dyszkiewicz <jakub.dyszkiewicz@gmail.com>
@@ -134,6 +139,24 @@ func isDefaultMesh(resType core_model.ResourceType, obj k8s_model.KubernetesObje
return resType == core_mesh.MeshType && obj.GetName() == core_model.DefaultMesh && len(obj.GetSpec()) == 0
}

// validateResourceLocation validates if resources that supouse to be applied on Global are applied on Global and other way around
Copy link
Contributor

Choose a reason for hiding this comment

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

typo: suppose

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll fix it in the next PR

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.

LGTM

@jakubdyszkiewicz jakubdyszkiewicz merged commit 604c7d9 into master Aug 24, 2020
nickolaev pushed a commit that referenced this pull request Oct 1, 2020
Signed-off-by: Jakub Dyszkiewicz <jakub.dyszkiewicz@gmail.com>
@jakubdyszkiewicz jakubdyszkiewicz deleted the feat/kuma-cp-zone-validation branch October 15, 2020 11:54
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