@@ -16,80 +16,6 @@ limitations under the License.
1616
1717package v1
1818
19- const (
20- ClusterResourcePlacementKind = "ClusterResourcePlacement"
21- ClusterResourcePlacementResource = "clusterresourceplacements"
22- ClusterResourceBindingKind = "ClusterResourceBinding"
23- ClusterResourceSnapshotKind = "ClusterResourceSnapshot"
24- ClusterSchedulingPolicySnapshotKind = "ClusterSchedulingPolicySnapshot"
25- WorkKind = "Work"
26- AppliedWorkKind = "AppliedWork"
27- )
28-
29- const (
30- // Unprefixed labels/annotations are reserved for end-users
31- // we will add a kubernetes-fleet.io to designate these labels/annotations as official fleet labels/annotations.
32- // See https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#label-selector-and-annotation-conventions
33- fleetPrefix = "kubernetes-fleet.io/"
34-
35- // MemberClusterFinalizer is used to make sure that we handle gc of all the member cluster resources on the hub cluster.
36- MemberClusterFinalizer = fleetPrefix + "membercluster-finalizer"
37-
38- // WorkFinalizer is used by the work generator to make sure that the binding is not deleted until the work objects
39- // it generates are all deleted, or used by the work controller to make sure the work has been deleted in the member
40- // cluster.
41- WorkFinalizer = fleetPrefix + "work-cleanup"
42-
43- // CRPTrackingLabel is the label that points to the cluster resource policy that creates a resource binding.
44- CRPTrackingLabel = fleetPrefix + "parent-CRP"
45-
46- // IsLatestSnapshotLabel tells if the snapshot is the latest one.
47- IsLatestSnapshotLabel = fleetPrefix + "is-latest-snapshot"
48-
49- // FleetResourceLabelKey is that label that indicates the resource is a fleet resource.
50- FleetResourceLabelKey = fleetPrefix + "is-fleet-resource"
51-
52- // FirstWorkNameFmt is the format of the name of the work generated with first resource snapshot .
53- // The name of the first work is {crpName}-work.
54- FirstWorkNameFmt = "%s-work"
55-
56- // WorkNameWithSubindexFmt is the format of the name of a work generated with resource snapshot with subindex.
57- // The name of the first work is {crpName}-{subindex}.
58- WorkNameWithSubindexFmt = "%s-%d"
59-
60- // WorkNameWithConfigEnvelopeFmt is the format of the name of a work generated with config envelop.
61- // The format is {workPrefix}-configMap-uuid
62- WorkNameWithConfigEnvelopeFmt = "%s-configmap-%s"
63-
64- // ParentResourceSnapshotIndexLabel is the label applied to work that contains the index of the resource snapshot that generates the work.
65- ParentResourceSnapshotIndexLabel = fleetPrefix + "parent-resource-snapshot-index"
66-
67- // ParentBindingLabel is the label applied to work that contains the name of the binding that generates the work.
68- ParentBindingLabel = fleetPrefix + "parent-resource-binding"
69-
70- // CRPGenerationAnnotation is the annotation that indicates the generation of the CRP from
71- // which an object is derived or last updated.
72- CRPGenerationAnnotation = fleetPrefix + "CRP-generation"
73-
74- // EnvelopeConfigMapAnnotation is the annotation that indicates the configmap is an envelope configmap that contains resources
75- // we need to apply to the member cluster instead of the configMap itself.
76- EnvelopeConfigMapAnnotation = fleetPrefix + "envelope-configmap"
77-
78- // EnvelopeTypeLabel is the label that marks the work object as generated from an envelope object.
79- // The value of the annotation is the type of the envelope object.
80- EnvelopeTypeLabel = fleetPrefix + "envelope-work"
81-
82- // EnvelopeNamespaceLabel is the label that contains the namespace of the envelope object that the work is generated from.
83- EnvelopeNamespaceLabel = fleetPrefix + "envelope-namespace"
84-
85- // EnvelopeNameLabel is the label that contains the name of the envelope object that the work is generated from.
86- EnvelopeNameLabel = fleetPrefix + "envelope-name"
87-
88- // PreviousBindingStateAnnotation is the annotation that records the previous state of a binding.
89- // This is used to remember if an "unscheduled" binding was moved from a "bound" state or a "scheduled" state.
90- PreviousBindingStateAnnotation = fleetPrefix + "previous-binding-state"
91- )
92-
9319// NamespacedName comprises a resource name, with a mandatory namespace.
9420type NamespacedName struct {
9521 // Name is the name of the namespaced scope resource.
0 commit comments