Commit Graph

226 Commits

Author SHA1 Message Date
James Munnelly
1f7f23895d Ensure fetched certificate is valid for CSRs public key before issuing
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-01-22 16:42:58 +00:00
JoshVanL
2f3fe4c3d7
Reduce comments by removing invalid data in CR implementations doing
better InvalidRequest checking

Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2020-01-17 14:11:25 +00:00
JoshVanL
f9f8fbd311
Add InvalidRequest condition check to Certificate controller:
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2020-01-09 15:14:21 +00:00
James Munnelly
9daad6dd93 Update tests to ensure temporary certificates are not re-issued when dnsNames mismatch
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-12-16 15:11:07 +00:00
James Munnelly
7076041de6 Don't overwrite existing certificates when issuing a temporary certificate
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-12-16 13:53:38 +00:00
James Munnelly
698e7a522a Fix certificate controller expiry metrics
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-11-29 18:29:23 +00:00
JoshVanL
232b1133fd Adds more tests for deprecated secret annotations and update secret
annotations if deprecated ones exist

Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2019-11-27 15:12:25 +00:00
JoshVanL
0d9d0eeb22 Allow secrets with legacy annotations for issuer name and kind to match
existing certificates

Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2019-11-26 12:13:58 +00:00
JoshVanL
bca6ebc520 Ensure key usages are set on CertificateRequests created by the
Certificate controller

Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2019-11-05 14:22:25 +00:00
James Munnelly
6b19892908 Fix regression in certificates controller setting owner references
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-10-09 11:33:21 +01:00
JoshVanL
7d615ff8e4 Remove getting secret from lister in matches spec func
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2019-10-03 10:01:57 +01:00
JoshVanL
66cda5cbd7 Only match for common name in DNS names if common name was given
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2019-10-02 17:48:37 +01:00
JoshVanL
54f8069a78 Make annotation of secret if nil to prevent panic
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2019-10-02 17:48:37 +01:00
JoshVanL
18e0dcdb63 Adds boilerplate copyright to util_test.go
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2019-10-02 17:48:37 +01:00
JoshVanL
13b0584838 Change behaviour to be more relaxed around common names
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2019-10-02 17:48:37 +01:00
JoshVanL
f249888112 Only add common-name annotation if commonName exists
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2019-10-02 17:48:37 +01:00
JoshVanL
dd7213866f Adds validation for URIs to certificate validation
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2019-10-02 17:48:37 +01:00
James Munnelly
9a807be80a Fix not returning updateErr if updating status failed
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-10-02 14:09:24 +01:00
JoshVanL
de07651142 Remote updatestatus todos and add minimal version to docs
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
JoshVanL
869370e226 Cleans up code and naming
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2019-09-26 17:35:52 +01:00
JoshVanL
ced21c287f Conformance: Ensure if a certificate is deleted then a new certificate is signed with
same key

Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2019-09-26 17:34:42 +01:00
James Munnelly
973f4aa424 Update codebase for external dependencies
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-09-26 12:52:43 +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
80cbcb35fb Add issue-temporary-certificate annotation to control temporary cert issuance
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-09-20 15:26:41 +01:00
James Munnelly
7e1312794c Set certificate-name annotation on CertificateRequest resources
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-09-19 17:05:02 +01:00
James Munnelly
79f2cd60f4 Pass down annotations from Certificate resources to Orders via CertificateRequests
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-09-19 16:38:43 +01:00
James Munnelly
51bf98581e Remove deprecated code from certificates controller
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-09-19 13:07:59 +01:00
jetstack-bot
f1d591a531
Merge pull request #1959 from munnerz/basic-conformance-certificates
Add very basic Certificates based conformance suite
2019-09-04 15:18:33 +01:00
James Munnelly
c4e00311ba Set certificate name annotation in certificates controller
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-09-03 11:20:51 +01:00
James Munnelly
cb71859bad Copy labels from Certificate to CertificateRequest
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-09-03 10:52:32 +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
jetstack-bot
dcba8ebd06
Merge pull request #2002 from munnerz/internal-apiversion
Add internal API version, enable defaulter & conversion-gen and implement mutating webhook
2019-08-21 21:53:36 +01:00
James Munnelly
6052e0558e Refactor base controller and allow Running additional informers
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-08-21 13:22:57 +01:00
James Munnelly
73d66c44ab Move API validations package
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-08-21 13:11:01 +01:00
jetstack-bot
f7f0e9f16a
Merge pull request #1987 from munnerz/ca-crt-api
Move TLSCAKey to v1alpha1 package
2019-08-14 12:02:55 +01:00
James Munnelly
ce475e1640 Move TLSCAKey to v1alpha1 package
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-08-14 01:21:15 +01:00
jetstack-bot
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
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
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
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
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