Created
February 19, 2021 19:59
-
-
Save jmrodri/c04635ca818b86f3d27fc93042372f05 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
size := memcached.Spec.Size | |
if *found.Spec.Replicas != size { | |
found.Spec.Replicas = &size | |
err = r.Update(ctx, found) | |
if err != nil { | |
log.Error(err, "Failed to update Deployment", "Deployment.Namespace", found.Namespace, "Deployment.Name", found.Name) | |
return ctrl.Result{}, err | |
} | |
// Spec updated - return and requeue | |
return ctrl.Result{Requeue: true}, nil | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment