Skip to content
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

adds the ability to delete resources created by a Rollout. #557

Merged
merged 1 commit into from
Jan 12, 2024

Conversation

LiZhenCheng9527
Copy link
Contributor

What type of PR is this?
/kind feature
What this PR does / why we need it:
adds the ability to delete resources created by a Rollout.
Which issue(s) this PR fixes:
Fixes #435

Copy link

netlify bot commented Jan 10, 2024

Deploy Preview for kurator-dev canceled.

Name Link
🔨 Latest commit ceeddc3
🔍 Latest deploy log https://app.netlify.com/sites/kurator-dev/deploys/659fe6beeb2f7c0008686993

@@ -167,6 +167,48 @@ func (a *ApplicationManager) syncRolloutPolicyForCluster(ctx context.Context,
return ctrl.Result{}, nil
}

func (a *ApplicationManager) deleteResourcesInClusters(ctx context.Context, app *applicationapi.Application, fleet *fleetapi.Fleet) error {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

deleteResourcesInClusters is to remove resources in member cluster?

If so i would rename it to deleteResourcesInMemberClusters

func (a *ApplicationManager) deleteResourcesInClusters(ctx context.Context, app *applicationapi.Application, fleet *fleetapi.Fleet) error {
log := ctrl.LoggerFrom(ctx)

for _, syncPolicy := range app.Spec.SyncPolicies {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe it is handled in other place, but here i cannot see how we delete the resources when we update application by removing SyncPolicies

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on our existing framework, when deleting the SyncPolicies of an application, there is no corresponding deletion operation for its underlying resources. We should probably address this issue in future versions.

Copy link
Member

@hzxuzhonghu hzxuzhonghu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@kurator-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hzxuzhonghu

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kurator-bot kurator-bot merged commit 617bf0d into kurator-dev:main Jan 12, 2024
11 checks passed
@LiZhenCheng9527 LiZhenCheng9527 deleted the rollout-delete branch January 17, 2024 06:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FR]Provide a CI/CD Solution for Kurator
3 participants