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 ca on k8s #485

Merged
merged 2 commits into from
Dec 13, 2019

Conversation

jakubdyszkiewicz
Copy link
Contributor

Summary

Wire mesh validator on K8S

@jakubdyszkiewicz jakubdyszkiewicz requested a review from a team December 12, 2019 08:39
@@ -210,3 +210,27 @@ webhooks:
- dataplanes
- meshes
- proxytemplates
---
apiVersion: admissionregistration.k8s.io/v1beta1
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's avoid a separate validating web hook for this.

It's an internal implementation detail that we use different components that contribute to overall validation.

We could use a "composite" handler to encapsulate this.

return err
}
func addValidators(mgr kube_ctrl.Manager, rt core_runtime.Runtime) error {
handler := k8s_webhooks.NewValidatingWebhook(k8s_resources.DefaultConverter(), core_registry.Global(), k8s_registry.Global())
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's wrap this handler into a "composite" handler (aggregate over a list of handlers).

"composite" handler goes over a list and calls Handle until the first denied response.

The list of handlers will consist of this one and the new Mesh-specific one.

@jakubdyszkiewicz jakubdyszkiewicz force-pushed the feature/provided-ca-validation branch 2 times, most recently from ff4822a to 4d68095 Compare December 12, 2019 14:59
@jakubdyszkiewicz jakubdyszkiewicz changed the base branch from feature/provided-ca-validation to master December 13, 2019 09:54
@jakubdyszkiewicz jakubdyszkiewicz merged commit e69e49f into master Dec 13, 2019
@jakubdyszkiewicz jakubdyszkiewicz deleted the feature/provided-ca-validation-k8s branch December 13, 2019 11:18
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

2 participants