Merge pull request #37290 from mwielgus/rev-fed-dep
Automatic merge from submit-queue Revision handling in federated deployment controller Deployment controller in regular kubernetes automatically adds an annotation in deployment. This causes a bit of confusion in controller and tests. This PR skips revision annotation in checks. In the next K8S release we will need to have better support for deployment revisions. Helps with #36588 cc: @nikhiljindal @madhusudancs
This commit is contained in:
@@ -556,10 +556,7 @@ func (fdc *DeploymentController) reconcileDeployment(key string) (reconciliation
|
||||
}
|
||||
|
||||
// The object can be modified.
|
||||
ld := &extensionsv1.Deployment{
|
||||
ObjectMeta: fedutil.DeepCopyRelevantObjectMeta(fd.ObjectMeta),
|
||||
Spec: fedutil.DeepCopyApiTypeOrPanic(fd.Spec).(extensionsv1.DeploymentSpec),
|
||||
}
|
||||
ld := fedutil.DeepCopyDeployment(fd)
|
||||
specReplicas := int32(replicas)
|
||||
ld.Spec.Replicas = &specReplicas
|
||||
|
||||
@@ -579,7 +576,7 @@ func (fdc *DeploymentController) reconcileDeployment(key string) (reconciliation
|
||||
|
||||
currentLd := ldObj.(*extensionsv1.Deployment)
|
||||
// Update existing replica set, if needed.
|
||||
if !fedutil.ObjectMetaAndSpecEquivalent(ld, currentLd) {
|
||||
if !fedutil.DeploymentEquivalent(ld, currentLd) {
|
||||
fdc.eventRecorder.Eventf(fd, api.EventTypeNormal, "UpdateInCluster",
|
||||
"Updating deployment in cluster %s", clusterName)
|
||||
|
||||
|
Reference in New Issue
Block a user