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 acme CertificateRequest controller #1943

Merged
merged 13 commits into from
Aug 16, 2019

Conversation

JoshVanL
Copy link
Contributor

@JoshVanL JoshVanL commented Jul 30, 2019

Adds the ACME CertificateRequest controller to resolve CertificateRequests that have an ACME issuer references.

TODO:

  • e2e tests

/assign

Adds ACME CertificateRequest Controller.

@jetstack-bot jetstack-bot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Jul 30, 2019
@jetstack-bot jetstack-bot added the dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. label Jul 30, 2019
@jetstack-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JoshVanL

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

@jetstack-bot jetstack-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 30, 2019
@JoshVanL JoshVanL changed the title Adds acme CertificateRequest controller WIP: Adds acme CertificateRequest controller Jul 30, 2019
@jetstack-bot jetstack-bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. area/testing Issues relating to testing size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jul 30, 2019
@jetstack-bot jetstack-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 3, 2019
@jetstack-bot jetstack-bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Aug 7, 2019
@JoshVanL JoshVanL force-pushed the cr-acme branch 3 times, most recently from ee1928f to f4a6f2f Compare August 12, 2019 13:18
@jetstack-bot jetstack-bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Aug 12, 2019
@JoshVanL
Copy link
Contributor Author

Looking good
/unassign
/assign @munnerz

@jetstack-bot jetstack-bot assigned munnerz and unassigned JoshVanL Aug 12, 2019
@JoshVanL JoshVanL changed the title WIP: Adds acme CertificateRequest controller Adds acme CertificateRequest controller Aug 12, 2019
@jetstack-bot jetstack-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 12, 2019
controllerpkg.Register(CRControllerName, func(ctx *controllerpkg.Context) (controllerpkg.Interface, error) {
acme := NewACME(ctx)

orderInformer := ctx.SharedInformerFactory.Certmanager().V1alpha1().Orders().Informer()
Copy link
Member

Choose a reason for hiding this comment

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

Should we also have a 'watch' on Issuer resources? Or does the existing CertificateRequest controller shared implementation already handle this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Indeed it does :)

pkg/controller/certificaterequests/acme/acme.go Outdated Show resolved Hide resolved
pkg/controller/certificaterequests/acme/acme.go Outdated Show resolved Hide resolved
pkg/controller/certificaterequests/acme/acme.go Outdated Show resolved Hide resolved
pkg/controller/certificaterequests/acme/acme.go Outdated Show resolved Hide resolved
pkg/controller/certificaterequests/acme/acme_test.go Outdated Show resolved Hide resolved
certificateRequest: testCR,
builder: &testpkg.Builder{
ExpectedEvents: []string{
`Normal ErrorGettingOrder Failed to get order resource default-unit-test-ns/test-cr-3958469914: this is a network error`,
Copy link
Member

Choose a reason for hiding this comment

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

Undecided whether network errors etc. should be bubbled up the events, as it could in turn place even more burden on the network. But let's think about that later 🙄

certificateRequest: testCR,
builder: &testpkg.Builder{
ExpectedEvents: []string{
`Warning OrderFailed Failed to resolve order resource default-unit-test-ns/test-cr-3958469914: order is in failure state "invalid"`,
Copy link
Member

Choose a reason for hiding this comment

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

This message feels very mechanical for something that should be human-readable

pkg/controller/certificaterequests/acme/acme_test.go Outdated Show resolved Hide resolved
pkg/controller/certificaterequests/sync.go Outdated Show resolved Hide resolved
@JoshVanL
Copy link
Contributor Author

/hold

Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
@JoshVanL
Copy link
Contributor Author

@munnerz Good for another look
/unassign
/assign @munnerz
/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 Aug 15, 2019
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
return nil, err
}

log = logf.WithResource(log, order)
Copy link
Member

Choose a reason for hiding this comment

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

This should be WithRelatedResource

Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
@munnerz
Copy link
Member

munnerz commented Aug 16, 2019

/lgtm

@jetstack-bot jetstack-bot added the lgtm Indicates that a PR is ready to be merged. label Aug 16, 2019
@JoshVanL
Copy link
Contributor Author

/retest

@munnerz
Copy link
Member

munnerz commented Aug 16, 2019

/test pull-cert-manager-e2e-v1-15

@retest-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to jetstack).
Review the full test history for this PR.
Silence the bot with an /lgtm cancel comment for consistent failures.

@jetstack-bot jetstack-bot merged commit 8ab4dc1 into cert-manager:master Aug 16, 2019
@jetstack-bot jetstack-bot added this to the v0.10 milestone Aug 16, 2019
@munnerz munnerz added this to Done in v0.10 Aug 19, 2019
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/testing Issues relating to testing dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
No open projects
v0.10
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants