avoid required label override by overridepolicy
Signed-off-by: hanweisen <hanweisen_yewu@cmss.chinamobile.com>
This commit is contained in:
parent
4a243f447a
commit
7219bf6655
|
@ -93,8 +93,6 @@ func ensureWork(
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
workLabel := mergeLabel(clonedWorkload, workNamespace, binding, scope)
|
|
||||||
|
|
||||||
if hasScheduledReplica {
|
if hasScheduledReplica {
|
||||||
if resourceInterpreter.HookEnabled(clonedWorkload.GroupVersionKind(), configv1alpha1.InterpreterOperationReviseReplica) {
|
if resourceInterpreter.HookEnabled(clonedWorkload.GroupVersionKind(), configv1alpha1.InterpreterOperationReviseReplica) {
|
||||||
clonedWorkload, err = resourceInterpreter.ReviseReplica(clonedWorkload, desireReplicaInfos[targetCluster.Name])
|
clonedWorkload, err = resourceInterpreter.ReviseReplica(clonedWorkload, desireReplicaInfos[targetCluster.Name])
|
||||||
|
@ -124,6 +122,7 @@ func ensureWork(
|
||||||
klog.Errorf("Failed to apply overrides for %s/%s/%s, err is: %v", clonedWorkload.GetKind(), clonedWorkload.GetNamespace(), clonedWorkload.GetName(), err)
|
klog.Errorf("Failed to apply overrides for %s/%s/%s, err is: %v", clonedWorkload.GetKind(), clonedWorkload.GetNamespace(), clonedWorkload.GetName(), err)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
workLabel := mergeLabel(clonedWorkload, workNamespace, binding, scope)
|
||||||
|
|
||||||
annotations := mergeAnnotations(clonedWorkload, binding, scope)
|
annotations := mergeAnnotations(clonedWorkload, binding, scope)
|
||||||
annotations, err = recordAppliedOverrides(cops, ops, annotations)
|
annotations, err = recordAppliedOverrides(cops, ops, annotations)
|
||||||
|
|
Loading…
Reference in New Issue