Created
February 19, 2021 19:58
-
-
Save jmrodri/79de9fe46f5914a3348a5844ee6d28d0 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{Requeue: true}, err | |
} | |
// Spec updated - return and requeue | |
return ctrl.Result{}, nil | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment