Commit Graph

665 Commits

Author SHA1 Message Date
JoshVanL
c115e6c2bf
internal/test.go accepts fixed clock and Shares
generaleLocallySignedCertificate

Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2020-04-27 16:29:58 +01:00
JoshVanL
7d1d94fedb
Adds issuing controller temporary certificate units tests
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2020-04-26 19:39:08 +01:00
JoshVanL
095976548d
Adds temporary certificate logic to issuing controller based on
annotation

Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2020-04-26 19:16:57 +01:00
JoshVanL
92c2d3c7c4
Moves secretmanager and testing util into separate package to refactor
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2020-04-26 15:45:10 +01:00
JoshVanL
11961b992d
Moves Certificate Issuing validation logic and key fetch earlier in sync
loop

Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2020-04-26 15:01:32 +01:00
Maartje Eyskens
f2b36483a4 Set Issuer kind specific to Issuer if cert-manager.io/issuer is specified.
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-04-24 16:16:04 +02: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
jetstack-bot
4aff1ce3f0
Merge pull request #2814 from munnerz/privatekey-rotation
keymanager: support private key rotationPolicy field
2020-04-21 16:02:53 +01:00
James Munnelly
6a827c6b8b Don't use fixed length map
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-04-21 14:49:25 +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
8a628c3315 Update field comments on ChallengeSpec
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-04-21 10:07:03 +01:00
James Munnelly
a17d04260e requestmanager: copy labels and annotations onto CertificateRequest resources
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-04-21 09:49:32 +01:00
James Munnelly
f04696747c Fix SecretDataAltNamesMatchSpec for loose matching and add tests
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-04-21 09:49:32 +01:00
James Munnelly
23892bc6e4 keymanager: support private key rotationPolicy field
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-04-21 09:49:32 +01:00
James Munnelly
e8cc2ba4ac Fix selfsigned issuer unit tests
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-04-20 15:08:31 +01:00
James Munnelly
a9dd260e95 requestmanager: tidy up and add unit tests
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-04-20 15:08:31 +01:00
James Munnelly
48958036bf Set NotAfter field in readiness controller
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-04-20 15:08:31 +01:00
James Munnelly
1c26ae412d Move some logic into separate method
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-04-20 15:08:31 +01:00
James Munnelly
945dde4175 Fix PolicyFunc reference in trigger controller tests
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-04-20 15:08:31 +01:00
James Munnelly
8aaca4a2ad expcertificates: add readiness controller
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-04-20 15:08:31 +01:00
James Munnelly
53fa3b70ab Move trigger policies into separate package
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-04-20 15:08:31 +01:00
James Munnelly
707b7a486a Fix missing append bug
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-04-20 15:08:31 +01:00
James Munnelly
a572f739c2 Add trigger policy for private key not matching spec
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-04-20 15:08:31 +01:00
James Munnelly
b5c169e35a Fix panic in issuing controller
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-04-20 15:08:31 +01:00
James Munnelly
cde13aa6fd Add requestmanager controller
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-04-20 15:08:31 +01:00
jetstack-bot
91d598b1de
Merge pull request #2810 from munnerz/keymanager-controller
expcertificates: add keymanager controller
2020-04-20 10:17:38 +01:00
jetstack-bot
687d47f832
Merge pull request #2027 from pepov/auditsink-injector
Add auditsinks in auditregistration.k8s.io/v1alpha1 to the supported injector targets
2020-04-20 08:23:38 +01:00
Maartje Eyskens
db45891705 Add missing context
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-04-17 16:39:06 +02:00
James Munnelly
d60cb08f13 expcertificates: add keymanager controller
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-04-16 19:10:41 +01:00
James Munnelly
d0b919a2f7 expcertificates: add PrivateKeyMatchesSpec function
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-04-16 19:10:41 +01:00
James Munnelly
5e00879749 Add Secret listing function
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-04-16 19:10:38 +01:00
James Munnelly
26948ed459 Register additional event handlers in issuing controller
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-04-16 17:08:39 +01:00
James Munnelly
c2aed0842e Create 'predicate' package and standardise list and enqueue predicates
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-04-16 14:28:52 +01:00
James Munnelly
9da334164c Update references to cmapi.CertificateRequestRevisionAnnotationKey
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-04-15 16:49:47 +01:00
James Munnelly
572e46759c Fixup error text and cleanup test instantiation
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-04-15 16:28:29 +01:00
JoshVanL
b5405adb54 Adds some logging to issuing controller
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2020-04-15 16:16:08 +01:00
JoshVanL
f297ead1f3 Update generate files
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2020-04-15 16:16:08 +01:00
JoshVanL
48ca027906 Adds unit tests for issuing controller
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2020-04-15 16:16:08 +01:00
JoshVanL
a6a8ee29e3 Moves issuing controller secret handler into secretsManager struct
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2020-04-15 16:16:08 +01:00
JoshVanL
ffb5201d95 Adds extensible issuing controller
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2020-04-15 16:16:08 +01:00
James Munnelly
b3fcd23f8d Fixup tautological condition
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-04-15 15:14:47 +01:00
James Munnelly
919a160bc4 Fix error message when looking up an owner fails
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-04-15 15:14:47 +01:00
James Munnelly
645ed70579 Add trigger controller unit tests
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-04-15 15:14:47 +01:00
James Munnelly
93a6dc56d2 Fix bug causing certificates to not be triggered after failure
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-04-15 15:14:47 +01:00
James Munnelly
221f6d4eb7 Log message when parsing a workqueue item fails
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-04-15 15:14:47 +01:00
James Munnelly
0f32bb46a8 Allow multiple predicate functions when listing CertificateRequests
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-04-15 15:14:47 +01:00
James Munnelly
cf7e344425 Export PolicyChain type
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-04-15 15:14:46 +01:00
James Munnelly
97b33abf11 Add missing boilerplate headers
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-04-15 12:27:25 +01:00
James Munnelly
1fc9981359 Fix up use of Kubernetes clientset after rebase
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-04-15 12:27:15 +01:00