Commit Graph

55 Commits

Author SHA1 Message Date
Tim Ramlot
a8b5178fc5
fix dupword linter
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
2024-04-29 13:47:25 +02:00
Tim Ramlot
205067b834
update tests to match the current Let's encrypt setup
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
2024-02-16 15:23:45 +01:00
Sam Lee
ff5c4103a0
remove URL verification from alternateCertChain tests
Signed-off-by: Sam Lee <me@shibuya-rin.moe>
2024-02-13 22:42:00 +09:00
irbekrm
dba18119aa Ensures that key for an ACME challenge is only retrieved from the ACME server once
Thus reducing the number of HTTP01ChallengeResponse/DNS01ChallengeResponse calls

Signed-off-by: irbekrm <irbekrm@gmail.com>
2023-04-05 16:28:14 +01:00
irbekrm
0964d6d03d Removes extra GET calls for ACME order resource
In cases where a synced Order does not require any processing from this controller

Signed-off-by: irbekrm <irbekrm@gmail.com>
2023-04-05 16:28:14 +01:00
Ashley Davis
3a055cc2f5
rename all uses of github.com/jetstack/cert-manager
This was done by running the following command twice:

 ```bash
 grep -Ri "github.com/jetstack/cert-manager" . | \
 cut -d":" -f1 | \
 sort | \
 uniq | \
 xargs sed -i
 "s/github.com\/jetstack\/cert-manager/github.com\/cert-manager\/cert-manager/"
 ```

Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
2022-02-02 09:08:31 +00:00
irbekrm
e7cc37ef71 Code review feedback
Signed-off-by: irbekrm <irbekrm@gmail.com>

Co-authored-by: Maël Valais <mael@vls.dev>
2022-01-11 18:09:44 +00:00
irbekrm
24866544b8 Ensures that if alternate cert chain is specified, it is retrieved
Ensures that if the cert is retrieved in a reconcile following the one that finalized the ACME order, the alternate cert chain is still respected, if specified by user

Signed-off-by: irbekrm <irbekrm@gmail.com>
2022-01-11 10:51:14 +00:00
irbekrm
de8aa2583e Ensures that ACME orders controller does not create new order if it failed to update old order's status to valid
Check the status of the ACME order if finalizing order failed to catch edge cases where the order is already finalized, but the updating of Order CR's status has failed

Signed-off-by: irbekrm <irbekrm@gmail.com>
2022-01-11 10:51:14 +00:00
irbekrm
e48846132b Add a couple new test cases for order finalization
Signed-off-by: irbekrm <irbekrm@gmail.com>
2021-11-26 16:32:02 +00:00
irbekrm
7739497f22 Don't process Order CRs that have failed
Ensure that cert-manager does not attempt to create new ACME Orders for cert-manager Order CRs that are in failed (errored, invalid or expired) state. If the CertificateRequest was created from a Certificate, the issuance will be retried after 1 hour

Signed-off-by: irbekrm <irbekrm@gmail.com>
2021-11-23 15:34:35 +00:00
irbekrm
598ed35e4a Uses go/crypto ListCertAlternates function to fetch alternative certificate chains
This allows us to use upstream go/crypto again instead of our own fork

Signed-off-by: irbekrm <irbekrm@gmail.com>
2021-10-07 15:21:26 +01:00
irbekrm
06f6b46f30 Implements feedback from code review
Signed-off-by: irbekrm <irbekrm@gmail.com>
2021-05-19 13:20:05 +01:00
irbekrm
d8c941da8e Refactors creation of ACME Orders controller
So that it easier used with the existing test framework and also is more similar to how most other controllers are created

Signed-off-by: irbekrm <irbekrm@gmail.com>
2021-05-19 13:11:18 +01:00
irbekrm
8d55b69796 Unit test pending ACME order with valid challenges
Signed-off-by: irbekrm <irbekrm@gmail.com>
2021-05-19 13:06:12 +01:00
irbekrm
1e235c79f2 Re-queue Order with finalized Challenges, but pending state
To avoid stuck Orders in case of a misbehaving ACME server

Signed-off-by: irbekrm <irbekrm@gmail.com>
2021-05-19 13:05:44 +01:00
irbekrm
881fb2ddea Make tests fail if controller registration fail
Part of work towards fixing errors discovered by static analysis tools

Signed-off-by: irbekrm <irbekrm@gmail.com>
2021-05-19 10:16:59 +01:00
Josh Soref
4d84a7fbb1 spelling: preferred
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2021-03-04 13:04:38 -05:00
Maartje Eyskens
ab0cd57dc5 Use The cert-manager Authors.
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-12-11 19:04:13 +01:00
Maartje Eyskens
1788a9d758 Update copyright to cert-manager project
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-12-08 19:04:49 +01:00
Maartje Eyskens
542b329914 Implement feedback
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-10-08 15:24:56 +02:00
Maartje Eyskens
9452327d1b Add test in order sync
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-10-08 15:24:56 +02:00
Maartje Eyskens
824e075bf8 fmt
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-08-24 17:45:52 +02:00
Maartje Eyskens
75e31fe54c Add a unit test for alt chains
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-08-24 17:33:27 +02:00
Richard Wall
758131ada2 Fix tests in github.com/jetstack/cert-manager/pkg/controller/acmeorders
Signed-off-by: Richard Wall <richard.wall@jetstack.io>
2020-08-20 14:28:06 +01:00
Richard Wall
a70298180a Run a script to update v1alpha2 usage to v1
Script is available at https://github.com/jetstack/cert-manager/pull/3201

Signed-off-by: Richard Wall <richard.wall@jetstack.io>
2020-08-20 14:26:51 +01:00
James Munnelly
8b9ab18849 Add test for unknown challenge types
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-07-06 16:39:31 +01:00
James Munnelly
09d5121713 Update acmeorders controller for new field type
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-07-06 16:25:46 +01:00
James Munnelly
b126a0c0e5 Use acme AccountRegistry throughout and tidy up ACME setup code
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-05-13 13:14:46 +01:00
James Munnelly
3e8649abc2 Handle ACME orders with already valid authorizations upon first fetch through new 'initialState' field
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-05-01 12:33:14 +01:00
James Munnelly
019f64e841 Fix test failures
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-04-21 10:25:56 +01:00
James Munnelly
641fe0da7c Switch to using upstream golang.org/x/crypto
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-12-03 16:49:31 +00:00
James Munnelly
8bf08237f7 Migrate acmechallenges and acmeorders to use UpdateStatus
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-10-02 12:38:29 +01:00
JoshVanL
b6803a2185 Fully update challenge and order in controller sync instead of UpdateStatus
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2019-09-30 13:47:51 +01:00
JoshVanL
94d077a5fb Adds status sub resource and changes updates
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2019-09-30 13:47:50 +01:00
James Munnelly
2868b4a7b7 Update pkg/controllers
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-09-23 10:07:53 +01:00
James Munnelly
bf9fbea23f Update codebase for new meta apigroup
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-09-20 19:25:04 +01:00
James Munnelly
58754abf37 Refactor codebase for v1alpha2
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-09-20 16:22:43 +01:00
James Munnelly
20840b552d Remove deprecated code from acmeorders controller
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-09-19 13:07:59 +01:00
James Munnelly
d59f21da7e Separate sync_test.go into util_test.go
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-09-11 10:23:33 +01:00
James Munnelly
b92ffbe649 Update tests
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-09-10 14:45:26 +01:00
James Munnelly
1b8a286206 Rename Setup->Init and use Start to start informers
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-08-22 13:11:33 +01:00
James Munnelly
5aeee11598 Add unit tests for deprecated config feature flag
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-07-26 17:18:48 +01:00
James Munnelly
ff0a2c00a1 Don't manually init issuer helper
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-07-26 15:24:41 +01:00
James Munnelly
57315074f7 acmeorders: remove util_test.go and refactor to use builder directly
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-07-26 12:30:23 +01:00
Michael Tsang
adfb8703c8 Fix bug where solver with no selector causes nil pointer
Signed-off-by: Michael Tsang <michael.tsang@jetstack.io>
2019-07-10 15:34:24 +01:00
James Munnelly
cf8c12c5ea Add unit tests for dnsZone selectors
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-06-25 15:18:30 +02:00
James Munnelly
fc24b9afc9 Add unit tests for challengeSpecForAuthorization function
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-06-25 15:17:17 +02:00
James Munnelly
220d39c17d Update acmeorders controller to support both formats
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-05-01 14:24:00 +01:00
James Munnelly
0fcc0c666c Update copyright header year
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-01-07 15:07:55 +00:00