Skip to content
This repository has been archived by the owner on Apr 7, 2020. It is now read-only.

Commit

Permalink
Fix secret to worker mapper
Browse files Browse the repository at this point in the history
  • Loading branch information
rfranzke committed May 29, 2019
1 parent 0afbb3e commit 62af1a5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
5 changes: 2 additions & 3 deletions pkg/controller/worker/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@ package worker

import (
extensionscontroller "github.com/gardener/gardener-extensions/pkg/controller"
extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1"
"sigs.k8s.io/controller-runtime/pkg/client"

extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1"
corev1 "k8s.io/api/core/v1"

"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/controller"
"sigs.k8s.io/controller-runtime/pkg/handler"
"sigs.k8s.io/controller-runtime/pkg/manager"
Expand Down
12 changes: 2 additions & 10 deletions pkg/controller/worker/mapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,6 @@ func (m *secretToWorkerMapper) Map(obj handler.MapObject) []reconcile.Request {

var requests []reconcile.Request
for _, worker := range workerList.Items {
if worker.Spec.SecretRef.Name == secret.Name {
requests = append(requests, reconcile.Request{
NamespacedName: types.NamespacedName{
Namespace: worker.Namespace,
Name: worker.Name,
},
})
continue
}

if !extensionscontroller.EvalGenericPredicate(&worker, m.predicates...) {
continue
}
Expand All @@ -76,8 +66,10 @@ func (m *secretToWorkerMapper) Map(obj handler.MapObject) []reconcile.Request {
Name: worker.Name,
},
})
continue
}
}

return requests
}

Expand Down

0 comments on commit 62af1a5

Please sign in to comment.