Commit Graph

262 Commits

Author SHA1 Message Date
Richard Wall
01b5d0fa88 Fix tests in ./pkg/controller/certificates/...
Signed-off-by: Richard Wall <richard.wall@jetstack.io>
2020-08-20 14:28:06 +01:00
Richard Wall
81eb53f597 ./hack/update-all.sh
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
Richard Wall
2b1e1d1d2b Remove deprecated issuer related annotation key constants from the API
Signed-off-by: Richard Wall <richard.wall@jetstack.io>
2020-08-14 17:07:36 +01:00
jetstack-bot
d9ad986823
Merge pull request #3173 from wallrj/p12-intermed-cert
Add intermediate cert to P12 chain if ca.crt is empty
2020-08-12 13:18:59 +01:00
Maartje Eyskens
d2f86c410a Add intermediate cert to P12 chain if ca.crt is empty
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-08-12 12:39:27 +01:00
Richard Wall
5acb052194 A test for certificate chains
Signed-off-by: Richard Wall <richard.wall@jetstack.io>
2020-08-12 12:39:27 +01:00
Maartje Eyskens
3259fdfe9b Implement feedback
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-08-12 10:59:42 +02:00
Maartje Eyskens
827ce9c5ad Revert log levels on errors
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-08-12 10:59:42 +02:00
Maartje Eyskens
86dee5ed41 Set error log levels
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-08-12 10:59:41 +02:00
Maartje Eyskens
fecd0b3518 Set all log levels for info
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-08-12 10:59:41 +02:00
Richard Wall
46d4ea768b Update test for pkcs12 encoded CA data
Signed-off-by: Richard Wall <richard.wall@jetstack.io>
2020-08-07 17:26:59 +01:00
JoshVanL
016b566689
Adds Issuer Group to Secret annotation
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2020-08-06 09:24:37 +01:00
James Munnelly
fdc0960d27 Schedule a 'resync' of Certificates that have been marked as failed and are to be retried later
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-07-20 09:19:11 +01:00
Haoxiang Zhou
fe80b7d760 Moved predicate package to pkg/util
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-02 12:23:15 +01:00
James Munnelly
9e2d6a514b Move expcertificates into certificates package
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-07-01 12:16:25 +01:00
James Munnelly
2280480c02 Remove old certificates controller
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-07-01 11:46:13 +01:00
James Munnelly
6caa4c451d Rename CRPrivateKeyAnnotationKey -> CertificateRequestPrivateKeyAnnotationKey
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-06-26 14:47:27 +01:00
James Munnelly
1adfe16690 Bulk fix of non-test staticcheck failures
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-06-26 12:25:08 +01:00
James Munnelly
1d6424b8f2 Use 'clock' package in pkg/scheduler
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-06-23 16:23:42 +01:00
jetstack-bot
46eaf3d1a4
Merge pull request #2923 from JoshVanL/new-metrics
Updates the metrics package + new metrics controller
2020-06-04 12:59:38 +01:00
Haoxiang Zhou
609eedacec Do not add ca.crt key to TLS secret if empty in expcertificates as well
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-05-26 14:37:40 +01:00
Haoxiang Zhou
3591de614d Changed unit tests to expect no ca.crt instead of nil
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-05-26 12:16:55 +01:00
Haoxiang Zhou
dceae33364 Do not add ca.crt key to TLS secret if empty
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-05-26 12:16:20 +01:00
JoshVanL
9c9fe56f0b
Update new files to use 2020 copyright
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2020-05-21 10:52:56 +01:00
JoshVanL
5539bf3495
Moves metrics controller into sub-package of ./controller/certificates
and fix metrics listen address flag description

Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2020-05-21 10:47:52 +01:00
JoshVanL
92eb8d0957
Refactor controllers to use new instrumented metrics that's baked into
all controllers

Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2020-05-18 17:43:56 +01:00
James Munnelly
7978fbe081 Address review feedback and include truststore.jks with JKS mode enabled
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-04-22 15:20:49 +01:00
James Munnelly
ba33c823a3 Add 'keystores' stanza to CertificateSpec to allow dynamic keystore configuration
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-04-21 17:58:18 +01:00
James Munnelly
822b9e17a0 Remove AdditionalRunFuncs from base controller
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-03-30 20:43:00 +01:00
James Munnelly
881b886049 Update Kubernetes API client call-sites
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-03-26 12:58:50 +00:00
James Munnelly
acff2b12bb Fix JKS keystore functionality and add additional tests
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-03-23 10:02:42 +00:00
James Munnelly
98bc0d52f9 Add --experimental-issue-jks flag to enable JKS bundle generation
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-03-04 15:33:22 +00:00
James Munnelly
e9374730c9 Add --experimental-issue-pkcs12 flag to enable PKCS12 bundle generation
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-03-04 10:02:21 +00:00
Josh Soref
b4f28e5d04 spelling: deprecated
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2020-02-24 16:42:26 -05:00
Josh Soref
8d801fc100 spelling: certificate
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2020-02-24 16:15:51 -05:00
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