@@ -33,7 +33,6 @@ import (
3333 "sigs.k8s.io/cluster-api/util"
3434 "sigs.k8s.io/cluster-api/util/annotations"
3535 "sigs.k8s.io/cluster-api/util/conditions"
36- "sigs.k8s.io/cluster-api/util/patch"
3736 "sigs.k8s.io/cluster-api/util/predicates"
3837 ctrl "sigs.k8s.io/controller-runtime"
3938 "sigs.k8s.io/controller-runtime/pkg/client"
@@ -162,16 +161,6 @@ func (r *AzureClusterReconciler) Reconcile(ctx context.Context, req ctrl.Request
162161 conditions .MarkFalse (azureCluster , infrav1 .NetworkInfrastructureReadyCondition , infrav1 .NamespaceNotAllowedByIdentity , clusterv1 .ConditionSeverityError , "" )
163162 return reconcile.Result {}, errors .New ("AzureClusterIdentity list of allowed namespaces doesn't include current cluster namespace" )
164163 }
165- if identity .Namespace == azureCluster .Namespace {
166- patchhelper , err := patch .NewHelper (identity , r .Client )
167- if err != nil {
168- return reconcile.Result {}, errors .Wrap (err , "failed to init patch helper" )
169- }
170- identity .ObjectMeta .OwnerReferences = azureCluster .GetOwnerReferences ()
171- if err := patchhelper .Patch (ctx , identity ); err != nil {
172- return reconcile.Result {}, err
173- }
174- }
175164 } else {
176165 warningMessage := ("You're using deprecated functionality: " )
177166 warningMessage += ("Using Azure credentials from the manager environment is deprecated and will be removed in future releases. " )
0 commit comments