Skip to content

Commit 52803fb

Browse files
committed
squash
1 parent d793491 commit 52803fb

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

azure/services/aso/aso.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,8 @@ func isOwnedBy(resource client.Object, owner client.Object, scheme *runtime.Sche
378378
}
379379

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

384385
// PauseResource pauses an ASO resource by updating its `reconcile-policy` to `skip`.

azure/services/aso/aso_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -565,8 +565,9 @@ func TestCreateOrUpdateResource(t *testing.T) {
565565
Name: "name",
566566
Namespace: "namespace",
567567
Labels: map[string]string{
568-
clusterv1.ClusterNameLabel: clusterName,
569-
infrav1.OwnedByClusterLabelKey: clusterName, //nolint:staticcheck
568+
clusterv1.ClusterNameLabel: clusterName,
569+
//nolint:staticcheck // Referencing this deprecated value is required for backwards compatibility.
570+
infrav1.OwnedByClusterLabelKey: clusterName,
570571
},
571572
Annotations: map[string]string{
572573
asoannotations.ReconcilePolicy: string(asoannotations.ReconcilePolicySkip),

0 commit comments

Comments
 (0)