Commit Graph
422 Commits
Author SHA1 Message Date
JoshVanL 779c07baad Fix circular dependency
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2019-08-13 23:37:06 +01:00
JoshVanL a8e7584b36 Adds unit tests to vault CR controller
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2019-08-13 23:37:06 +01:00
JoshVanL bf133665a3 Both CR controller and legacy issuer use new vault client for signing
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2019-08-13 23:37:06 +01:00
JoshVanL 5923c0bdfe Adds new internal vault client pkg
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2019-08-13 23:37:06 +01:00
JoshVanL ad5e109983 Adds initial cr vault unit tests
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2019-08-13 23:37:06 +01:00
JoshVanL 312a050560 Fixes CR sync api reporting
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2019-08-13 23:37:06 +01:00
JoshVanL 356953c476 Adds status reports to vault sign method
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2019-08-13 23:36:43 +01:00
JoshVanL 6b1341505e Update CA CR controller to use a shared reporter util
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2019-08-13 23:34:18 +01:00
JoshVanL 60b349e162 Adds initial vault CR controller
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2019-08-13 23:34:17 +01:00
jetstack-botandGitHub 0c5694723f Merge pull request #1979 from JoshVanL/cr-failure-time
Adds CertificateRequest FailureTime
2019-08-13 20:50:15 +01:00
JoshVanL 7e56ce1c01 Adds CR reporter tests and cleans up code
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2019-08-13 17:24:38 +01:00
JoshVanL f1e4e2b16c Remove fired event when a certificate request is re-scheduled when
failed but < 1 hour

Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2019-08-13 12:21:28 +01:00
JoshVanL eed1e4ba21 Move certificates cr controller to use a switch on condition status
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2019-08-13 12:10:13 +01:00
James Munnelly 3bb5fb1897 Fix concurrent map write panic
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-08-13 12:07:41 +01:00
JoshVanL 0eb4ef385b Change CR reporter to be a long lived struct
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2019-08-13 11:36:53 +01:00
JoshVanL 0361a83c20 Fix reporter not setting correct conditions
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2019-08-13 10:02:53 +01:00
JoshVanL d7ada47686 Retry failed CertificateRequests in the Certificate controller based on
FailureTime of the CertificateRequest status

Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2019-08-12 14:03:37 +01:00
JoshVanL f8c617a582 Adds failure time to CertificateRequest Status
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2019-08-12 12:41:54 +01:00
JoshVanL 233afd2f94 Remove fake in CR controller and fail hard for no annotations for
selfsigned

Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2019-08-02 12:36:01 +01:00
JoshVanL 6bd9de1253 Have CR selfsigned to use reporter
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2019-08-01 17:01:39 +01:00
JoshVanL 071e5ab208 Always set secret ref annotation for CRs
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2019-08-01 16:39:01 +01:00
JoshVanL 42c47c7754 Ensures certificate controller add selfsigned annotations to CRs
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2019-08-01 16:39:01 +01:00
JoshVanL 46fd159f81 Register self signed CR controller
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2019-08-01 16:39:01 +01:00
JoshVanL 97f2183a16 Adds fake secrets lister to simulate network failure
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2019-08-01 16:39:01 +01:00
JoshVanL 6d3416325e Move tests to use new slimmer controller test builder
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2019-08-01 16:39:01 +01:00
JoshVanL d98a6dc9d6 Adds events checks to SelfSigned sign unit tests
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2019-08-01 16:39:01 +01:00
JoshVanL f26ea8dfb6 Adds selfsigned certificaterequest e2e tests
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2019-08-01 16:39:01 +01:00
JoshVanL 0ce8aab9d2 Adds SelfSigned certificaterequest controller
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2019-08-01 16:39:01 +01:00
JoshVanL 8be302dc10 Moves fake lister into /test and removes logging from reporter
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2019-08-01 13:44:19 +01:00
JoshVanL dbbce3e278 Updates certificaterequest/sync_test.go for new Sign method
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2019-08-01 11:52:54 +01:00
JoshVanL 480347aa26 Creates CR reporter util and updates ca_test.go
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2019-08-01 11:29:11 +01:00
jetstack-botandGitHub 222d46ab99 Merge pull request #1735 from kragniz/controller-tools-crd
Use controller-gen to generate CRDs
2019-07-29 19:48:32 +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 1da47b9e68 Add DisableDeprecatedACMECertificates feature gate
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-07-26 16:17:59 +01:00
James Munnelly 73364f592b Fix panic
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-07-26 15:45:34 +01:00
James Munnelly 404cfcfa43 Update certificates controller to use builder
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-07-26 15:24:42 +01:00
James Munnelly 85bdc901c5 Use CheckAndFinish and test events in new certificates controller
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-07-26 15:24:42 +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 cee2af6281 Set fixedClock on test builders
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-07-26 15:24:01 +01:00
James Munnelly 8a2bcb5dd1 Set the apiutil clock in test builder
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-07-26 15:09:24 +01:00
James Munnelly d43fb909c4 Convert acmechallenges controller to use test builder directly
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-07-26 14:14:48 +01:00
James Munnelly 331f490312 Remove util_test.go from issuers & clusterissuers
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-07-26 13:13:37 +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
James Munnelly 99bbc31386 Promote 'Clock' to be a field on controller context
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-07-26 12:30:23 +01:00
James Munnelly 70d7d222e8 Centralise fake structures into 'fake' subpackages
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-07-26 12:30:23 +01:00
James Munnelly ad686fbe58 Fix format errors
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-07-26 09:52:24 +01:00
James Munnelly 489feb3c30 Rename request->certificateRequest
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-07-25 16:35:23 +01:00
James Munnelly c4b30cd837 Use test Builder directly in CA requests controller
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-07-25 16:18:03 +01:00
James Munnelly 8047b4a5b9 Use test builder directly in CertificateRequest controller
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-07-25 15:59:17 +01:00
James Munnelly 434b2408be Add CheckAndFinish to controller test.Builder
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-07-25 15:58:39 +01:00