Skip to content

Commit

Permalink
Move finalizer name to API repo
Browse files Browse the repository at this point in the history
Signed-off-by: Jian Qiu <jqiu@redhat.com>
  • Loading branch information
qiujian16 committed Aug 1, 2023
1 parent 26e75df commit fc6c6fb
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 8 deletions.
6 changes: 6 additions & 0 deletions cluster/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,3 +251,9 @@ const (
// Note: Image registries configured in the addonDeploymentConfig will take precedence over this annotation.
ClusterImageRegistriesAnnotationKey = "open-cluster-management.io/image-registries"
)

const (
// ManagedClusterFinalizer is the name of the finlaizer add to ManagedCluster, it is to ensuer that resources
// relating to the ManagedCluster is removed when the ManagedCluster is deleted.
ManagedClusterFinalizer = "cluster.open-cluster-management.io/api-resource-cleanup"
)
22 changes: 14 additions & 8 deletions work/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -475,22 +475,28 @@ const (
JsonRaw ValueType = "JsonRaw"
)

// ManifestConditionType represents the condition type of a single
// resource manifest deployed on the managed cluster.
type ManifestConditionType string

const (
// ManifestProgressing represents that the resource is being applied on the managed cluster
ManifestProgressing ManifestConditionType = "Progressing"
ManifestProgressing string = "Progressing"
// ManifestApplied represents that the resource object is applied
// on the managed cluster.
ManifestApplied ManifestConditionType = "Applied"
ManifestApplied string = "Applied"
// ManifestAvailable represents that the resource object exists
// on the managed cluster.
ManifestAvailable ManifestConditionType = "Available"
ManifestAvailable string = "Available"
// ManifestDegraded represents that the current state of resource object does not
// match the desired state for a certain period.
ManifestDegraded ManifestConditionType = "Degraded"
ManifestDegraded string = "Degraded"
)

const (
// ManifestWorkFinalizer is the name of the finalizer added to manifestworks. It is used to ensure
// related appliedmanifestwork of a manifestwork are deleted before the manifestwork itself is deleted
ManifestWorkFinalizer = "cluster.open-cluster-management.io/manifest-work-cleanup"
// AppliedManifestWorkFinalizer is the name of the finalizer added to appliedmanifestwork. It is to
// ensure all resource relates to appliedmanifestwork is deleted before appliedmanifestwork itself
// is deleted.
AppliedManifestWorkFinalizer = "cluster.open-cluster-management.io/applied-manifest-work-cleanup"
)

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
Expand Down

0 comments on commit fc6c6fb

Please sign in to comment.