Skip to content

How could I differ oldDeployment and newDeployment is the equal #2515

Closed Answered by camilamacedo86
mingregister asked this question in Support
Discussion options

You must be logged in to vote

Hi,

  1. Reconciliation Triggers: When you use the Kubebuilder/controller-runtime framework to watch a resource, any change to that resource will trigger the reconciliation loop for the controller. This means if somebody modifies the Deployment using kubectl edit, your controller will automatically be notified and the reconciliation will start.

    err := ctrl.NewControllerManagedBy(mgr).
        For(&appsv1.Deployment{}).
        Complete(r)
  2. Avoiding Diffing: Generally, controllers shouldn't worry about diffing the old and new versions of resources. The main idea behind Kubernetes controllers is to ensure the current state of the resource matches the desired state. So, your controller should always a…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by camilamacedo86
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Support
Labels
None yet
2 participants