Apply object meta functions to controllers

This commit is contained in:
Marcin Wielgus
2016-08-21 13:02:55 +02:00
parent 66df63f618
commit b0ec300ce8
2 changed files with 6 additions and 4 deletions

View File

@@ -263,7 +263,7 @@ func (nc *NamespaceController) reconcileNamespace(namespace string) {
return
}
desiredNamespace := &api_v1.Namespace{
ObjectMeta: baseNamespace.ObjectMeta,
ObjectMeta: util.CopyObjectMeta(baseNamespace.ObjectMeta),
Spec: baseNamespace.Spec,
}
@@ -277,7 +277,7 @@ func (nc *NamespaceController) reconcileNamespace(namespace string) {
clusterNamespace := clusterNamespaceObj.(*api_v1.Namespace)
// Update existing namespace, if needed.
if !reflect.DeepEqual(desiredNamespace.ObjectMeta, clusterNamespace.ObjectMeta) ||
if !util.ObjectMetaEquivalent(desiredNamespace.ObjectMeta, clusterNamespace.ObjectMeta) ||
!reflect.DeepEqual(desiredNamespace.Spec, clusterNamespace.Spec) {
operations = append(operations, util.FederatedOperation{
Type: util.OperationTypeUpdate,