Merge pull request #129000 from RogerTaylor130/fix-log-info-in-sample-controller

Fix the log for current and desired number of replicas in sample controller
This commit is contained in:
Kubernetes Prow Robot 2024-12-23 10:40:11 +01:00 committed by GitHub
commit e85c72d417
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -289,7 +289,7 @@ func (c *Controller) syncHandler(ctx context.Context, objectRef cache.ObjectName
// number does not equal the current desired replicas on the Deployment, we
// should update the Deployment resource.
if foo.Spec.Replicas != nil && *foo.Spec.Replicas != *deployment.Spec.Replicas {
logger.V(4).Info("Update deployment resource", "currentReplicas", *foo.Spec.Replicas, "desiredReplicas", *deployment.Spec.Replicas)
logger.V(4).Info("Update deployment resource", "currentReplicas", *deployment.Spec.Replicas, "desiredReplicas", *foo.Spec.Replicas)
deployment, err = c.kubeclientset.AppsV1().Deployments(foo.Namespace).Update(ctx, newDeployment(foo), metav1.UpdateOptions{FieldManager: FieldManager})
}