Skip to content

Certificates controller policies refactor - #4746

Merged
jetstack-bot merged 9 commits into
cert-manager:masterfrom
JoshVanL:controller-readiness-certificates-spec-match
Jan 27, 2022
Merged

jetstack-bot merged 9 commits into
cert-manager:masterfrom
JoshVanL:controller-readiness-certificates-spec-match

Conversation

@JoshVanL

Copy link
Copy Markdown
Contributor

This PR is branched from #4638 which should be merged first. This is a follow up to reduce reviewer load.

This PR does a small refactor by:

  • Moving the policies out of the trigger controller, and into /internal/controller. It was already being used by more than just the trigger controller so this is a better shared space for it.
  • Moves "NewChain" funcs into the policies package.
  • Moves the SecretTemplate checks into policies
  • Moves the secretsmanager package under the issuing controller, since that is where it is used.
  • Moved controller/internal/test to /test/unit/crypto to be better shared.

After this has merged, we can look at checking on other Secret violations that should cause a resync under NewSecretPostIssuancePolicyChain.

/kind cleanup
/assign @munnerz

NONE

@jetstack-bot jetstack-bot added release-note-none Denotes a PR that doesn't merit a release note. dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. needs-kind Indicates a PR lacks a `kind/foo` label and requires one. area/api Indicates a PR directly modifies the 'pkg/apis' directory area/deploy Indicates a PR modifies deployment configuration approved Indicates a PR has been approved by an approver from all required OWNERS files. area/testing Issues relating to testing size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed needs-kind Indicates a PR lacks a `kind/foo` label and requires one. labels Jan 14, 2022
@JoshVanL

Copy link
Copy Markdown
Contributor Author

Waiting for #4638

/hold

@jetstack-bot jetstack-bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 17, 2022
@JoshVanL
JoshVanL force-pushed the controller-readiness-certificates-spec-match branch from d009530 to f03d118 Compare January 17, 2022 15:10
@jetstack-bot jetstack-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 19, 2022
@JoshVanL
JoshVanL force-pushed the controller-readiness-certificates-spec-match branch from f03d118 to 38b7b93 Compare January 19, 2022 14:52
@jetstack-bot jetstack-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 19, 2022

@irbekrm irbekrm 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.

This looks like a good and straightforward change, glad that the policies are now in a more reasonable place, makes it easier to understand 👍🏼

I've added a couple questions and one ask for an extra test case, apart from that happy to lgtm

Comment thread internal/policies/checks.go Resolved
Comment thread internal/policies/checks.go Resolved
Comment thread internal/policies/policies.go Resolved
@JoshVanL

Copy link
Copy Markdown
Contributor Author

Thanks @irbekrm, I have responded to your comments.

Re: not re-reconciling on the base Secret annotations changing- I want to make followup PRs to add more post issuance policy checks. These includes things like those annotations, Certificate output formats, etc.

@irbekrm irbekrm 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.

Thanks for replying to all the questions!

/lgtm

@jetstack-bot jetstack-bot added the lgtm Indicates that a PR is ready to be merged. label Jan 27, 2022
@jetstack-bot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: irbekrm, JoshVanL

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

@JoshVanL

Copy link
Copy Markdown
Contributor Author

/hold cancel

@jetstack-bot jetstack-bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 27, 2022
@jetstack-bot
jetstack-bot merged commit b12d78d into cert-manager:master Jan 27, 2022
@jetstack-bot jetstack-bot added this to the v1.7 milestone Jan 27, 2022
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. area/api Indicates a PR directly modifies the 'pkg/apis' directory area/deploy Indicates a PR modifies deployment configuration area/testing Issues relating to testing dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants