Skip to content

Commit 61cf309

Browse files
authored
add constant annotaitons for addon (#197)
Signed-off-by: Zhiwei Yin <[email protected]> Signed-off-by: Zhiwei Yin <[email protected]>
1 parent d2016d3 commit 61cf309

File tree

1 file changed

+24
-3
lines changed

1 file changed

+24
-3
lines changed

addon/v1alpha1/types_managedclusteraddon.go

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -235,17 +235,38 @@ const (
235235

236236
// AddonPreDeleteHookLabelKey is the label key to identify that a resource manifest is used as pre-delete hook for an addon
237237
// and should be created and deleted before the specified ManagedClusterAddon is deleted.
238+
// Deprecated, and will be removed in the future release, please use annotation AddonPreDeleteHookAnnotationKey from v0.10.0.
238239
AddonPreDeleteHookLabelKey = "open-cluster-management.io/addon-pre-delete"
239240

241+
// AddonPreDeleteHookAnnotationKey is the annotation key to identify that a resource manifest is used as pre-delete hook for an addon
242+
// and should be created and deleted before the specified ManagedClusterAddon is deleted.
243+
AddonPreDeleteHookAnnotationKey = "addon.open-cluster-management.io/addon-pre-delete"
244+
240245
// HostingClusterNameAnnotationKey is the annotation key for indicating the hosting cluster name, it should be set
241246
// on ManagedClusterAddon resource only.
242247
HostingClusterNameAnnotationKey = "addon.open-cluster-management.io/hosting-cluster-name"
243248

244-
// DeletionOrphanAnnotationKey is an annotation for the manifest of addin indicating that it will not be cleaned up
249+
// DeletionOrphanAnnotationKey is an annotation for the manifest of addon indicating that it will not be cleaned up
245250
// after the addon is deleted.
246251
DeletionOrphanAnnotationKey = "addon.open-cluster-management.io/deletion-orphan"
247252

248-
// HostedManifestLocationLabelKey is the label key for indicating the cluster that the manifest should be deployed in Hosted
249-
// mode.
253+
// HostedManifestLocationLabelKey is the label key to identify where a resource manifest of addon agent
254+
// with this label should be deployed in Hosted mode.
255+
// Deprecated, will be removed in the future release, please use annotation HostedManifestLocationAnnotationKey from v0.10.0.
250256
HostedManifestLocationLabelKey = "addon.open-cluster-management.io/hosted-manifest-location"
257+
258+
// HostedManifestLocationAnnotationKey is the annotation key to identify where a resource manifest of addon agent
259+
// with this annotation should be deployed in Hosted mode.
260+
HostedManifestLocationAnnotationKey = "addon.open-cluster-management.io/hosted-manifest-location"
261+
262+
// HostedManifestLocationManagedValue is a value of the annotation HostedManifestLocationAnnotationKey,
263+
// indicates the manifest will be deployed on the managed cluster in Hosted mode,
264+
// it is the default value of a manifest in Hosted mode.
265+
HostedManifestLocationManagedValue = "managed"
266+
// HostedManifestLocationHostingValue is a value of the annotation HostedManifestLocationAnnotationKey,
267+
// indicates the manifest will be deployed on the hosting cluster in Hosted mode.
268+
HostedManifestLocationHostingValue = "hosting"
269+
// HostedManifestLocationNoneValue is a value of the annotation HostedManifestLocationAnnotationKey,,
270+
// indicates the manifest will not be deployed in Hosted mode.
271+
HostedManifestLocationNoneValue = "none"
251272
)

0 commit comments

Comments
 (0)