Skip to content

Create 20220720-per-certificate-owner-ref.md - #5324

Merged
cert-manager-prow[bot] merged 29 commits into
masterfrom
design-doc-cert-owner-refs
Oct 8, 2025
Merged

cert-manager-prow[bot] merged 29 commits into
masterfrom
design-doc-cert-owner-refs

Conversation

@maelvls

@maelvls maelvls commented Jul 20, 2022 •

Copy link
Copy Markdown
Member

🌟 This design document was written by Maël Valais on 20 July 2022 in order to facilitate @RomanenkoDenys's feature request presented in #5158.

NONE

CyberArk tracker: VC-45306

@jetstack-bot jetstack-bot added dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. needs-kind Indicates a PR lacks a `kind/foo` label and requires one. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. kind/design Categorizes issue or PR as related to design. labels Jul 20, 2022
@jetstack-bot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: maelvls

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details 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

@jetstack-bot jetstack-bot added approved Indicates a PR has been approved by an approver from all required OWNERS files. and removed needs-kind Indicates a PR lacks a `kind/foo` label and requires one. labels Jul 20, 2022
@jetstack-bot jetstack-bot added release-note-none Denotes a PR that doesn't merit a release note. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Jul 20, 2022

@JoshVanL JoshVanL left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Added some questions from my side 🙂

@maelvls

maelvls commented Jul 21, 2022 •

Copy link
Copy Markdown
Member Author

Irbe suggested that I follow the formatting mandated by the design template. I will address Josh's comments and reformat the document to match the expected template.

Update 26 July 2022: I have rearranged the document so that it matches the design template. I tried answering the four questions asked by @JoshVanL.

Update 30 July 2022: I will be on vacation from 30 July to 15 August 2022.

maelvls added 2 commits July 21, 2022 13:58
Signed-off-by: Maël Valais <[email protected]>
@jetstack-bot jetstack-bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jul 26, 2022
@maelvls

maelvls commented Aug 22, 2022

Copy link
Copy Markdown
Member Author

/test pull-cert-manager-master-make-test

maelvls and others added 3 commits September 7, 2022 18:27
Co-authored-by: Josh Soref <[email protected]>
Signed-off-by: Maël Valais <[email protected]>
Signed-off-by: Maël Valais <[email protected]>
@maelvls

maelvls commented Sep 13, 2022

Copy link
Copy Markdown
Member Author

I am unsure how to proceed with this design. @RomanenkoDenys would like to know what to do now.

The design has some missing sections but I don't think that's a stopper. This the discussion is settling down, I propose that we proceed with implementing that design.

Please let me know @JoshVanL if you have more comments.

@maelvls

maelvls commented Sep 30, 2025

Copy link
Copy Markdown
Member Author

IMO this design doc should be merged. No need to wait another year 😅

@jsoref jsoref left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm fine w/ the proposed change, but it needs to be applied throughout the document.

There's a section for Alternatives to which the previous proposal should be relegated

@maelvls
maelvls requested a review from Copilot September 30, 2025 17:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a design document for enabling per-certificate control over secret cleanup behavior in cert-manager. The design aims to address the need for fine-grained control over whether secrets should be deleted when their associated certificates are removed.

  • Adds a new deletionPolicy field to Certificate resources with values Delete or Orphan
  • Introduces a new --default-secret-cleanup-policy flag to replace the global --enable-certificate-owner-ref flag
  • Provides backward compatibility while enabling per-certificate cleanup control

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@maelvls
maelvls force-pushed the design-doc-cert-owner-refs branch from 30914c0 to c213f87 Compare September 30, 2025 19:31
@maelvls

maelvls commented Oct 1, 2025

Copy link
Copy Markdown
Member Author

Hey. Due to the change from cleanupPolicy to deletionPolicy, the flag --default-certificate-cleanup-policy no longer made sense. Thus, I've renamed it to --default-secret-deletion-policy. Please let me know if that doesn't work.

maelvls and others added 3 commits October 1, 2025 15:28
Signed-off-by: Maël Valais <[email protected]>
Co-authored-by: Josh Soref <[email protected]>
Signed-off-by: Maël Valais <[email protected]>
or from `Delete` to `Orphan` is not immediate: the change requires a re-issuance
of the Certificate resources.

The default value for `--default-secret-deletion-policy` is `Orphan`.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Are we sure we want this? I'll definitely vote for Delete as the default. When introducing a new flag, we should have the best default value. And orphaning a lot of secrets in the cluster doesn't seem like a good default to me.

To avoid a "surprising" behavior for users, I suggest making the existing --enable-certificate-owner-ref take precedence (with its current default) until we graduate this feature (behind a feature gate?).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'd be ok with this being a behavior change to Delete as the default.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We discussed this in today's stand-up, and there are valid reasons for keeping the current Orphan as the default. Changing this could create a lot of noise that we want to avoid.

@erikgb erikgb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for picking this really old design up again, @maelvls! 🚀

/lgtm
/approve
/hold

Adding a hold in case anyone else is reviewing. Feel free to unhold - it's "just" a design. 😉

@cert-manager-prow cert-manager-prow Bot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lgtm Indicates that a PR is ready to be merged. labels Oct 2, 2025
@cert-manager-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: erikgb

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details 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

@maelvls

maelvls commented Oct 7, 2025

Copy link
Copy Markdown
Member Author

/unhold

@cert-manager-prow cert-manager-prow Bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 7, 2025
@wallrj-cyberark
wallrj-cyberark dismissed stale reviews from wallrj and JoshVanL October 8, 2025 10:17

Stale

@cert-manager-prow
cert-manager-prow Bot merged commit 968fa16 into master Oct 8, 2025
@wallrj-cyberark
wallrj-cyberark deleted the design-doc-cert-owner-refs branch October 8, 2025 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cybr Used by CyberArk-employed maintainers to report to line management what's being worked on. dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. kind/design Categorizes issue or PR as related to design. lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.