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:
@@ -42,6 +42,10 @@ func (a imageRepositoryAdapter) asClientObject() client.Object {
|
||||
return a.ImageRepository
|
||||
}
|
||||
|
||||
func (a imageRepositoryAdapter) deepCopyClientObject() client.Object {
|
||||
return a.ImageRepository.DeepCopy()
|
||||
}
|
||||
|
||||
// imagev1.ImageRepositoryList
|
||||
|
||||
type imageRepositoryListAdapter struct {
|
||||
@@ -100,6 +104,10 @@ func (a imageUpdateAutomationAdapter) asClientObject() client.Object {
|
||||
return a.ImageUpdateAutomation
|
||||
}
|
||||
|
||||
func (a imageUpdateAutomationAdapter) deepCopyClientObject() client.Object {
|
||||
return a.ImageUpdateAutomation.DeepCopy()
|
||||
}
|
||||
|
||||
// autov1.ImageUpdateAutomationList
|
||||
|
||||
type imageUpdateAutomationListAdapter struct {
|
||||
|
||||
Reference in New Issue
Block a user