Request reconcile using patch instead of update
This should prevent the generation of the object getting bumped, as observed on a GKE K8s 1.18 cluster using the logic before this commit. We only want to generation to increase when there are actual changes to the `spec` of a resource, as some controllers use the `generation` value to make assumptions about what they should do during a reconciliation. Signed-off-by: Hidde Beydals <hello@hidde.co>
This commit is contained in:
@@ -39,6 +39,13 @@ type adapter interface {
|
||||
asClientObject() client.Object
|
||||
}
|
||||
|
||||
// copyable is an interface for a wrapper or alias from which we can
|
||||
// get a deep copied client.Object, required when you e.g. want to
|
||||
// calculate a patch.
|
||||
type copyable interface {
|
||||
deepCopyClientObject() client.Object
|
||||
}
|
||||
|
||||
// listAdapater is the analogue to adapter, but for lists; the
|
||||
// controller runtime distinguishes between methods dealing with
|
||||
// objects and lists.
|
||||
|
||||
Reference in New Issue
Block a user