Skip to content

Commit dead0b1

Browse files
authored
Add externally managed annotations to IBMPowerVSCluster resource (#899)
1 parent efa4bd7 commit dead0b1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

controllers/ibmpowervscluster_controller.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ import (
3636

3737
capiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1"
3838
"sigs.k8s.io/cluster-api/util"
39+
"sigs.k8s.io/cluster-api/util/predicates"
3940

4041
infrav1beta1 "sigs.k8s.io/cluster-api-provider-ibmcloud/api/v1beta1"
4142
"sigs.k8s.io/cluster-api-provider-ibmcloud/cloud/scope"
@@ -241,5 +242,6 @@ func (c clusterDescendants) filterOwnedDescendants(cluster *infrav1beta1.IBMPowe
241242
func (r *IBMPowerVSClusterReconciler) SetupWithManager(mgr ctrl.Manager) error {
242243
return ctrl.NewControllerManagedBy(mgr).
243244
For(&infrav1beta1.IBMPowerVSCluster{}).
245+
WithEventFilter(predicates.ResourceIsNotExternallyManaged(ctrl.LoggerFrom(context.TODO()))).
244246
Complete(r)
245247
}

0 commit comments

Comments
 (0)