Skip to content

Commit ba12790

Browse files
authored
feat: rename finalizerString to FinalizerString (#556)
Issue #, if available: closes [#2201]( aws-controllers-k8s/community#2201) Description of changes: Rename finalizerString to FinalizerString to export the constant. By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent ab15f92 commit ba12790

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

templates/pkg/resource/descriptor.go.tpl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515
)
1616

1717
const (
18-
finalizerString = "finalizers.{{ .APIGroup }}/{{ .CRD.Kind }}"
18+
FinalizerString = "finalizers.{{ .APIGroup }}/{{ .CRD.Kind }}"
1919
)
2020

2121
var (
@@ -75,8 +75,8 @@ func (d *resourceDescriptor) IsManaged(
7575
// https://github.com/kubernetes-sigs/controller-runtime/issues/994 is
7676
// fixed. This should be able to be:
7777
//
78-
// return k8sctrlutil.ContainsFinalizer(obj, finalizerString)
79-
return containsFinalizer(obj, finalizerString)
78+
// return k8sctrlutil.ContainsFinalizer(obj, FinalizerString)
79+
return containsFinalizer(obj, FinalizerString)
8080
}
8181

8282
// Remove once https://github.com/kubernetes-sigs/controller-runtime/issues/994
@@ -105,7 +105,7 @@ func (d *resourceDescriptor) MarkManaged(
105105
// Should not happen. If it does, there is a bug in the code
106106
panic("nil RuntimeMetaObject in AWSResource")
107107
}
108-
k8sctrlutil.AddFinalizer(obj, finalizerString)
108+
k8sctrlutil.AddFinalizer(obj, FinalizerString)
109109
}
110110

111111
// MarkUnmanaged removes the supplied resource from management by ACK. What
@@ -120,7 +120,7 @@ func (d *resourceDescriptor) MarkUnmanaged(
120120
// Should not happen. If it does, there is a bug in the code
121121
panic("nil RuntimeMetaObject in AWSResource")
122122
}
123-
k8sctrlutil.RemoveFinalizer(obj, finalizerString)
123+
k8sctrlutil.RemoveFinalizer(obj, FinalizerString)
124124
}
125125

126126
// MarkAdopted places descriptors on the custom resource that indicate the

0 commit comments

Comments
 (0)