Skip to content

chore: Add finalizer to handle CRL Distribution Point cleanup#3

Merged
TeddyAndrieux merged 1 commit intomainfrom
improvement/add-finalizer-to-clean-crl-dp
Nov 7, 2025
Merged

chore: Add finalizer to handle CRL Distribution Point cleanup#3
TeddyAndrieux merged 1 commit intomainfrom
improvement/add-finalizer-to-clean-crl-dp

Conversation

@TeddyAndrieux
Copy link
Contributor

No description provided.

@TeddyAndrieux TeddyAndrieux requested a review from a team as a code owner November 4, 2025 15:39
// handleDeletion handles the deletion of a ManagedCRL resource by cleaning up
// the CRL distribution points from the issuer and removing the finalizer.
// nolint:unparam // ctrl.Result is always empty for deletion, which is expected
func (r *ManagedCRLReconciler) handleDeletion(logger logr.Logger, ctx context.Context, instance *crloperatorv1alpha1.ManagedCRL) (ctrl.Result, error) {
Copy link

Choose a reason for hiding this comment

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

Wouldn't it be better to have the logger directly in the struct instead of passed as parameter ?

Copy link
Contributor Author

@TeddyAndrieux TeddyAndrieux Nov 4, 2025

Choose a reason for hiding this comment

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

Since we fill the logger with some context everytime we reconcile I'm not sure it's a good idea here

But for lager operator I would have a "intermediate struct" that would include the logger yes

@TeddyAndrieux TeddyAndrieux force-pushed the improvement/add-finalizer-to-clean-crl-dp branch 2 times, most recently from f18cb69 to 80f25a3 Compare November 4, 2025 16:40
@TeddyAndrieux TeddyAndrieux force-pushed the improvement/add-finalizer-to-clean-crl-dp branch from 80f25a3 to 252a5e4 Compare November 6, 2025 15:02
Base automatically changed from improvement/update-ci to main November 7, 2025 08:12
@TeddyAndrieux TeddyAndrieux force-pushed the improvement/add-finalizer-to-clean-crl-dp branch from 252a5e4 to 6b36429 Compare November 7, 2025 08:43
Signed-off-by: Teddy Andrieux <teddy.andrieux@scality.com>
@TeddyAndrieux TeddyAndrieux force-pushed the improvement/add-finalizer-to-clean-crl-dp branch from 6b36429 to 3ef2c5f Compare November 7, 2025 08:46
@TeddyAndrieux TeddyAndrieux merged commit f47b2a6 into main Nov 7, 2025
5 checks passed
@TeddyAndrieux TeddyAndrieux deleted the improvement/add-finalizer-to-clean-crl-dp branch November 7, 2025 08:55
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.

3 participants