Refactor: use Kubernetes.Interface instead of *Clientset
So we can call with a mock for testing
This commit is contained in:
1 parent
7dcd4bdf47
commit
c3ce052cc5
4 files changed
+6
-6
No files matched your search
@@ -26,11 +26,11 @@ type configMapAnnotations struct {
|
||||
cm *v1.ConfigMap
|
||||
}
|
||||
|
||||
func newConfigMapAnnotations(ns string, configMapName string, clientset *kubernetes.Clientset) *configMapAnnotations {
|
||||
func newConfigMapAnnotations(ns string, configMapName string, c kubernetes.Interface) *configMapAnnotations {
|
||||
return &configMapAnnotations{
|
||||
Namespace: ns,
|
||||
ConfigMapName: configMapName,
|
||||
Client: clientset.CoreV1(),
|
||||
Client: c.CoreV1(),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user