fed: Fix deletion helper to use namespace-qualified object names

This commit is contained in:
Maru Newby 2017-05-02 14:12:25 -07:00
parent 82bc084297
commit fd4ff0caa5
6 changed files with 6 additions and 6 deletions

View File

@ -211,7 +211,7 @@ func NewDeploymentController(federationClient fedclientset.Interface) *Deploymen
// objNameFunc
func(obj runtime.Object) string {
deployment := obj.(*extensionsv1.Deployment)
return deployment.Name
return fmt.Sprintf("%s/%s", deployment.Namespace, deployment.Name)
},
updateTimeout,
fdc.eventRecorder,

View File

@ -294,7 +294,7 @@ func NewIngressController(client federationclientset.Interface) *IngressControll
// objNameFunc
func(obj pkgruntime.Object) string {
ingress := obj.(*extensionsv1beta1.Ingress)
return ingress.Name
return fmt.Sprintf("%s/%s", ingress.Namespace, ingress.Name)
},
ic.updateTimeout,
ic.eventRecorder,

View File

@ -183,7 +183,7 @@ func NewNamespaceController(client federationclientset.Interface, dynamicClientP
// objNameFunc
func(obj runtime.Object) string {
namespace := obj.(*apiv1.Namespace)
return namespace.Name
return fmt.Sprintf("%s/%s", namespace.Namespace, namespace.Name)
},
nc.updateTimeout,
nc.eventRecorder,

View File

@ -219,7 +219,7 @@ func NewReplicaSetController(federationClient fedclientset.Interface) *ReplicaSe
// objNameFunc
func(obj runtime.Object) string {
replicaset := obj.(*extensionsv1.ReplicaSet)
return replicaset.Name
return fmt.Sprintf("%s/%s", replicaset.Namespace, replicaset.Name)
},
updateTimeout,
frsc.eventRecorder,

View File

@ -240,7 +240,7 @@ func New(federationClient fedclientset.Interface, dns dnsprovider.Interface,
// objNameFunc
func(obj pkgruntime.Object) string {
service := obj.(*v1.Service)
return service.Name
return fmt.Sprintf("%s/%s", service.Namespace, service.Name)
},
updateTimeout,
s.eventRecorder,

View File

@ -186,7 +186,7 @@ func newFederationSyncController(client federationclientset.Interface, adapter f
s.updateObject,
// objNameFunc
func(obj pkgruntime.Object) string {
return adapter.ObjectMeta(obj).Name
return adapter.NamespacedName(obj).String()
},
s.updateTimeout,
s.eventRecorder,