-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🌱 add clusterDeleting condition and cleanup-priority annotation #286
🌱 add clusterDeleting condition and cleanup-priority annotation #286
Conversation
/assign @qiujian16 |
utils/constants.go
Outdated
// 2. delete resources with invalid value of this label. | ||
// 3. delete resources following the priority value. For example, there are 2 manifestWorks, one value is set 100 | ||
// and another is set 10, the manifestWorks with 10 will be deleted before the one with 100. | ||
LabelDeletionPriority string = "open-cluster-management.io/deletion-priority" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems to me it should be a field rather than label
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed to annotation with the name cleanup-priority.
3fc8402
to
5482cc8
Compare
5482cc8
to
8d45f64
Compare
cluster/v1/types.go
Outdated
|
||
const ( | ||
// ManagedClusterConditionDeleting is a condition which means the cluster is in deletion process. | ||
ManagedClusterConditionDeleting string = "ManagedClusterIsDeleting" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deleting is good enough, it is ManagedCluster resource so it is not needed to specify it in the type
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
utils/constants.go
Outdated
// 2. delete resources with invalid value of this annotation (!= [0,100]). | ||
// 3. delete resources following the priority value. For example, there are 2 manifestWorks, one value is set 100 | ||
// and another is set 10, the manifestWorks with 10 will be deleted before the one with 100. | ||
CleanupPriorityAnnotationKey string = "open-cluster-management.io/cleanup-priority" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should also be in the types, but not here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moved to types of clusters
Signed-off-by: ZhiweiYin <zyin@redhat.com>
8d45f64
to
bb8a3af
Compare
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: qiujian16, zhiweiyin318 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
c2e638b
into
open-cluster-management-io:main
Summary
Related issue(s)
Fixes #