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

Added finalizer to kbsConfig CRD during creation #27

Merged
merged 1 commit into from
May 24, 2024

Conversation

lmilleri
Copy link
Member

@lmilleri lmilleri commented May 23, 2024

Making sure the finalizer is added to the KbsResource at creation time

@lmilleri lmilleri requested a review from bpradipt May 23, 2024 07:54
@@ -294,6 +295,10 @@ func (r *KbsConfigReconciler) deployOrUpdateKbsDeployment(ctx context.Context) e
}

// Add the kbsFinalizer to the KbsConfig if it doesn't already exist
return r.addKbsConfigFinalizer(ctx)
Copy link
Member

Choose a reason for hiding this comment

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

The finalizer needs to be added only during the creation. So this can be removed.

@@ -275,7 +275,8 @@ func (r *KbsConfigReconciler) deployOrUpdateKbsDeployment(ctx context.Context) e
} else {
// Deployment created successfully
r.log.Info("Created a new deployment", "Deployment.Namespace", r.namespace, "Deployment.Name", KbsDeploymentName)
return nil
// Add the kbsFinalizer to the KbsConfig if it doesn't already exist
return r.addKbsConfigFinalizer(ctx)
Copy link
Member

Choose a reason for hiding this comment

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

Good catch. ..This was missing

@lmilleri lmilleri changed the title Fix delete deployment when crd is deleted Added finalizer to kbsConfig CRD during creation May 23, 2024
Copy link
Member

@bpradipt bpradipt left a comment

Choose a reason for hiding this comment

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

/lgtm

@bpradipt bpradipt merged commit 5df4660 into confidential-containers:main May 24, 2024
3 checks passed
lmilleri pushed a commit to lmilleri/trustee-operator that referenced this pull request Aug 6, 2024
…4-my-rebase

Revert "Rebase upstream 26-jul"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants