Commit Graph

29 Commits

Author SHA1 Message Date
James Munnelly
708de3c580 webhook: use new admission-plugin backed validation and mutation handlers
Signed-off-by: James Munnelly <jmunnelly@apple.com>
2022-01-20 10:56:46 +00:00
James Munnelly
ea2d04e2c0 Add webhook-specific 'feature' package and wire it up through config
Signed-off-by: James Munnelly <jmunnelly@apple.com>
2022-01-07 12:17:38 +00:00
James Munnelly
81f22fd49c Upgrade k8s.io dependencies to v0.23.1
Signed-off-by: James Munnelly <jmunnelly@apple.com>
2021-12-17 16:27:47 +00:00
Richard Wall
4eedf4fcfd Test conversion code using sample CRDs and remove conversion configuration from cert-manager CRDs
* Generate CRDs for the sample API types
* Allow alternative CRDs to be loaded into the envtest API server
* Override the conversion configuration of the CRDs
* Show webhook server logs in tests
* Simplify the loading of the test API CRDs
* Allow the ConversionHandler to be overridden in tests

Signed-off-by: Richard Wall <richard.wall@jetstack.io>
2021-12-14 17:33:22 +00:00
James Munnelly
1a96d9f32d config.cert-manager.io -> webhook.config.cert-manager.io
Signed-off-by: James Munnelly <jmunnelly@apple.com>
2021-12-01 12:57:08 +00:00
James Munnelly
71a69cc488 Add unit tests for configfile loading
Signed-off-by: James Munnelly <jmunnelly@apple.com>
2021-11-26 14:12:54 +00:00
James Munnelly
0e1d603c93 Add support for reading config from WebhookConfiguration object
Signed-off-by: James Munnelly <jmunnelly@apple.com>
2021-11-26 14:12:54 +00:00
James Munnelly
2e3eb29327 Register logger flags
Signed-off-by: James Munnelly <jmunnelly@apple.com>
2021-11-26 14:12:54 +00:00
James Munnelly
afa8e5a304 Refactoring webhook initialisation to support early config handling
Signed-off-by: James Munnelly <jmunnelly@apple.com>
2021-11-26 14:12:54 +00:00
irbekrm
73a696ddb3 Pprof addr for webhook defaults to localhost
Also whether it is enabled and the address can now be configured via commandline flags

Signed-off-by: irbekrm <irbekrm@gmail.com>
2021-10-26 12:18:32 +03:00
Inteon
d6cd6f457d
set correct exit codes when exiting
Signed-off-by: Inteon <42113979+inteon@users.noreply.github.com>
2021-07-22 12:57:08 +02:00
joshvanl
56a604c6f0 Init plugins in webhook cmd
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2021-03-26 17:26:28 +00:00
joshvanl
59049ee58a Add SubjectAccessReview client to validation registration on webhook start. Make API address configurable
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2021-03-26 17:26:28 +00:00
joshvanl
33f3fe473c Rename webhook SchemeBackedMutator -> RegistryBackedMutator
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2021-02-10 09:39:52 +00:00
joshvanl
90f0869899 Updates webhook command to use new mutating registry
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2021-02-08 19:23:15 +00: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
3259fdfe9b Implement feedback
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-08-12 10:59:42 +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
JoshVanL
d45847d302
Reverse webhook cmd run parameters
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2020-06-26 13:47:24 +01:00
JoshVanL
c3e2aae551
Fix binary names, printing errors, and help messages
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2020-06-26 13:47:11 +01:00
JoshVanL
7c831c537e
Add missing webhook flags and make options pointer
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2020-06-26 13:47:07 +01:00
JoshVanL
1107390b23
Fix webhook testing cmd
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2020-06-26 13:46:55 +01:00
JoshVanL
964a9b27dc
Move the webhook runtime into cobra
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2020-06-26 13:46:48 +01:00
James Munnelly
793f9677ae Use default Golang ciphersuites if none are specified
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-03-31 09:32:21 +01:00
James Munnelly
e0db0296d2 Run webhook on random port during integration tests
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-03-30 14:26:05 +01:00
James Munnelly
5036693fcf Add support for dynamic secret source to webhook binary
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-03-30 14:25:54 +01:00
James Munnelly
577e53b9bb webhook: create 'tls' package containing certificates sources + tests
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-03-30 14:25:54 +01:00
James Munnelly
053e3fc74c Refactor webhook cmd to be reused
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-03-13 15:30:57 +01:00