Make objects in fed controller reconcilation function fully writable

This commit is contained in:
Marcin Wielgus
2016-11-08 00:07:06 +01:00
committed by Marcin
parent 15fa0df93e
commit f91b3feee4
10 changed files with 31 additions and 15 deletions

View File

@@ -391,9 +391,10 @@ func (nc *NamespaceController) reconcileNamespace(namespace string) {
nc.deliverNamespace(namespace, 0, true)
return
}
// The object should not be modified.
desiredNamespace := &api_v1.Namespace{
ObjectMeta: util.CopyObjectMeta(baseNamespace.ObjectMeta),
Spec: baseNamespace.Spec,
ObjectMeta: util.DeepCopyRelevantObjectMeta(baseNamespace.ObjectMeta),
Spec: util.DeepCopyApiTypeOrPanic(baseNamespace.Spec).(api_v1.NamespaceSpec),
}
glog.V(5).Infof("Desired namespace in underlying clusters: %+v", desiredNamespace)