fix dynamic client name

This commit is contained in:
David Eads
2018-05-09 12:58:12 -04:00
parent d8924bc1c9
commit fd044d152e
35 changed files with 96 additions and 87 deletions

View File

@@ -60,7 +60,7 @@ const ResourceResyncTime time.Duration = 0
// up to date as the notification is sent.
type GarbageCollector struct {
restMapper resettableRESTMapper
dynamicClient dynamic.DynamicInterface
dynamicClient dynamic.Interface
// garbage collector attempts to delete the items in attemptToDelete queue when the time is ripe.
attemptToDelete workqueue.RateLimitingInterface
// garbage collector attempts to orphan the dependents of the items in the attemptToOrphan queue, then deletes the items.
@@ -74,7 +74,7 @@ type GarbageCollector struct {
}
func NewGarbageCollector(
dynamicClient dynamic.DynamicInterface,
dynamicClient dynamic.Interface,
mapper resettableRESTMapper,
deletableResources map[schema.GroupVersionResource]struct{},
ignoredResources map[schema.GroupResource]struct{},

View File

@@ -91,7 +91,7 @@ type GraphBuilder struct {
// it is protected by monitorLock.
running bool
dynamicClient dynamic.DynamicInterface
dynamicClient dynamic.Interface
// monitors are the producer of the graphChanges queue, graphBuilder alters
// the in-memory graph according to the changes.
graphChanges workqueue.RateLimitingInterface
@@ -125,7 +125,7 @@ func (m *monitor) Run() {
type monitors map[schema.GroupVersionResource]*monitor
func listWatcher(client dynamic.DynamicInterface, resource schema.GroupVersionResource) *cache.ListWatch {
func listWatcher(client dynamic.Interface, resource schema.GroupVersionResource) *cache.ListWatch {
return &cache.ListWatch{
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
// We want to list this resource in all namespaces if it's namespace scoped, so not passing namespace is ok.

View File

@@ -43,7 +43,7 @@ type NamespacedResourcesDeleterInterface interface {
}
func NewNamespacedResourcesDeleter(nsClient v1clientset.NamespaceInterface,
dynamicClient dynamic.DynamicInterface, podsGetter v1clientset.PodsGetter,
dynamicClient dynamic.Interface, podsGetter v1clientset.PodsGetter,
discoverResourcesFn func() ([]*metav1.APIResourceList, error),
finalizerToken v1.FinalizerName, deleteNamespaceWhenDone bool) NamespacedResourcesDeleterInterface {
d := &namespacedResourcesDeleter{
@@ -68,7 +68,7 @@ type namespacedResourcesDeleter struct {
// Client to manipulate the namespace.
nsClient v1clientset.NamespaceInterface
// Dynamic client to list and delete all namespaced resources.
dynamicClient dynamic.DynamicInterface
dynamicClient dynamic.Interface
// Interface to get PodInterface.
podsGetter v1clientset.PodsGetter
// Cache of what operations are not supported on each group version resource.

View File

@@ -63,7 +63,7 @@ type NamespaceController struct {
// NewNamespaceController creates a new NamespaceController
func NewNamespaceController(
kubeClient clientset.Interface,
dynamicClient dynamic.DynamicInterface,
dynamicClient dynamic.Interface,
discoverResourcesFn func() ([]*metav1.APIResourceList, error),
namespaceInformer coreinformers.NamespaceInformer,
resyncPeriod time.Duration,