Skip to content

Commit

Permalink
squash
Browse files Browse the repository at this point in the history
  • Loading branch information
mboersma committed Dec 2, 2024
1 parent d793491 commit 52803fb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion azure/services/aso/aso.go
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,8 @@ func isOwnedBy(resource client.Object, owner client.Object, scheme *runtime.Sche
}

func hasLegacyOwnedByLabel(labels map[string]string, clusterName string) bool {
return labels[infrav1.OwnedByClusterLabelKey] == clusterName //nolint:staticcheck
//nolint:staticcheck // Referencing this deprecated value is required for backwards compatibility.
return labels[infrav1.OwnedByClusterLabelKey] == clusterName
}

// PauseResource pauses an ASO resource by updating its `reconcile-policy` to `skip`.
Expand Down
5 changes: 3 additions & 2 deletions azure/services/aso/aso_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -565,8 +565,9 @@ func TestCreateOrUpdateResource(t *testing.T) {
Name: "name",
Namespace: "namespace",
Labels: map[string]string{
clusterv1.ClusterNameLabel: clusterName,
infrav1.OwnedByClusterLabelKey: clusterName, //nolint:staticcheck
clusterv1.ClusterNameLabel: clusterName,
//nolint:staticcheck // Referencing this deprecated value is required for backwards compatibility.
infrav1.OwnedByClusterLabelKey: clusterName,
},
Annotations: map[string]string{
asoannotations.ReconcilePolicy: string(asoannotations.ReconcilePolicySkip),
Expand Down

0 comments on commit 52803fb

Please sign in to comment.