Commit fd4ff0ca authored by Maru Newby's avatar Maru Newby

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

parent 82bc0842
...@@ -211,7 +211,7 @@ func NewDeploymentController(federationClient fedclientset.Interface) *Deploymen ...@@ -211,7 +211,7 @@ func NewDeploymentController(federationClient fedclientset.Interface) *Deploymen
// objNameFunc // objNameFunc
func(obj runtime.Object) string { func(obj runtime.Object) string {
deployment := obj.(*extensionsv1.Deployment) deployment := obj.(*extensionsv1.Deployment)
return deployment.Name return fmt.Sprintf("%s/%s", deployment.Namespace, deployment.Name)
}, },
updateTimeout, updateTimeout,
fdc.eventRecorder, fdc.eventRecorder,
......
...@@ -294,7 +294,7 @@ func NewIngressController(client federationclientset.Interface) *IngressControll ...@@ -294,7 +294,7 @@ func NewIngressController(client federationclientset.Interface) *IngressControll
// objNameFunc // objNameFunc
func(obj pkgruntime.Object) string { func(obj pkgruntime.Object) string {
ingress := obj.(*extensionsv1beta1.Ingress) ingress := obj.(*extensionsv1beta1.Ingress)
return ingress.Name return fmt.Sprintf("%s/%s", ingress.Namespace, ingress.Name)
}, },
ic.updateTimeout, ic.updateTimeout,
ic.eventRecorder, ic.eventRecorder,
......
...@@ -183,7 +183,7 @@ func NewNamespaceController(client federationclientset.Interface, dynamicClientP ...@@ -183,7 +183,7 @@ func NewNamespaceController(client federationclientset.Interface, dynamicClientP
// objNameFunc // objNameFunc
func(obj runtime.Object) string { func(obj runtime.Object) string {
namespace := obj.(*apiv1.Namespace) namespace := obj.(*apiv1.Namespace)
return namespace.Name return fmt.Sprintf("%s/%s", namespace.Namespace, namespace.Name)
}, },
nc.updateTimeout, nc.updateTimeout,
nc.eventRecorder, nc.eventRecorder,
......
...@@ -219,7 +219,7 @@ func NewReplicaSetController(federationClient fedclientset.Interface) *ReplicaSe ...@@ -219,7 +219,7 @@ func NewReplicaSetController(federationClient fedclientset.Interface) *ReplicaSe
// objNameFunc // objNameFunc
func(obj runtime.Object) string { func(obj runtime.Object) string {
replicaset := obj.(*extensionsv1.ReplicaSet) replicaset := obj.(*extensionsv1.ReplicaSet)
return replicaset.Name return fmt.Sprintf("%s/%s", replicaset.Namespace, replicaset.Name)
}, },
updateTimeout, updateTimeout,
frsc.eventRecorder, frsc.eventRecorder,
......
...@@ -240,7 +240,7 @@ func New(federationClient fedclientset.Interface, dns dnsprovider.Interface, ...@@ -240,7 +240,7 @@ func New(federationClient fedclientset.Interface, dns dnsprovider.Interface,
// objNameFunc // objNameFunc
func(obj pkgruntime.Object) string { func(obj pkgruntime.Object) string {
service := obj.(*v1.Service) service := obj.(*v1.Service)
return service.Name return fmt.Sprintf("%s/%s", service.Namespace, service.Name)
}, },
updateTimeout, updateTimeout,
s.eventRecorder, s.eventRecorder,
......
...@@ -186,7 +186,7 @@ func newFederationSyncController(client federationclientset.Interface, adapter f ...@@ -186,7 +186,7 @@ func newFederationSyncController(client federationclientset.Interface, adapter f
s.updateObject, s.updateObject,
// objNameFunc // objNameFunc
func(obj pkgruntime.Object) string { func(obj pkgruntime.Object) string {
return adapter.ObjectMeta(obj).Name return adapter.NamespacedName(obj).String()
}, },
s.updateTimeout, s.updateTimeout,
s.eventRecorder, s.eventRecorder,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment