habitat-sh / habitat-operator

A Kubernetes operator for Habitat services
Apache License 2.0
61 stars 17 forks source link

Compare Resource Versions on update #272

Closed asymmetric closed 6 years ago

asymmetric commented 6 years ago

Accoriding to the controller design doc:

In cases where you are certain that you don't need to requeue items when there are no new changes, you can compare the resource version of the old and new objects. If they are the same, you skip requeuing the work.

We don't need to do anything when the Habitat hasn't changed so we can safely skip requeueing the object.