mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 17:30:00 +00:00
fed: Fix deletion helper to use namespace-qualified object names
This commit is contained in:
parent
82bc084297
commit
fd4ff0caa5
@ -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
|
|||||||
// 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
|
|||||||
// 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
|
|||||||
// 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,
|
|||||||
// 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
|
|||||||
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,
|
||||||
|
Loading…
Reference in New Issue
Block a user