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

Use abstract types in webhook to support testing #19

Closed
christopherfriedrich opened this issue Oct 12, 2020 · 4 comments
Closed

Use abstract types in webhook to support testing #19

christopherfriedrich opened this issue Oct 12, 2020 · 4 comments

Comments

@christopherfriedrich
Copy link
Member

christopherfriedrich commented Oct 12, 2020

In the webhook struct we are currently using kubernetes.Clientset as type for the kubeClient field instead of its abstraction kubernetes.Interface

Due to that testing (#2) with injecting fake.Clientset from https://godoc.org/k8s.io/client-go/kubernetes/fake is not possible because of a type mismatch.

@rahulchheda
Copy link
Member

Great, would you like to create a PR for this, or I could go ahead with this.

@christopherfriedrich
Copy link
Member Author

You can go ahead.

@christopherfriedrich
Copy link
Member Author

@rahulchheda wouldn't it be even better to completely switch to dynamic client / dynamic interface as of #4 to also support OpenShift?

@rahulchheda
Copy link
Member

Right, that makes a lot of sense, let me spend some time on it.

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

No branches or pull requests

2 participants