Skip to content

Commit eeaacfd

Browse files
authored
Dont reconcile ShareReconciler if only status field has changed (#263)
1 parent 374d3e8 commit eeaacfd

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010
### Changed
1111

1212
- Change `renovate` configuration to only get upgrades for CAPA compatible versions of k8s dependencies.
13+
- Don't reconcile the `ShareReconciler` if only the status field has changed.
1314

1415
## [0.19.0] - 2025-06-17
1516

controllers/share.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import (
1414
"sigs.k8s.io/controller-runtime/pkg/client"
1515
"sigs.k8s.io/controller-runtime/pkg/controller/controllerutil"
1616
"sigs.k8s.io/controller-runtime/pkg/log"
17+
"sigs.k8s.io/controller-runtime/pkg/predicate"
1718

1819
"github.com/aws-resolver-rules-operator/pkg/resolver"
1920
"github.com/aws-resolver-rules-operator/pkg/util/annotations"
@@ -46,6 +47,11 @@ func (r *ShareReconciler) SetupWithManager(mgr ctrl.Manager) error {
4647
return ctrl.NewControllerManagedBy(mgr).
4748
Named("share-reconciler").
4849
For(&capa.AWSCluster{}).
50+
WithEventFilter(
51+
predicate.Funcs{
52+
UpdateFunc: predicateToFilterAWSClusterResourceVersionChanges,
53+
},
54+
).
4955
Complete(r)
5056
}
5157

0 commit comments

Comments
 (0)