Commit Graph

81 Commits

Author SHA1 Message Date
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
irbekrm
f4452f1cfa Fix some flag descriptions
Signed-off-by: irbekrm <irbekrm@gmail.com>
2021-12-31 09:15:32 +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
e21c6e6272 Add test for flag precedence
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
jetstack-bot
5eabeb0020
Merge pull request #4520 from mcaci/lint
Remove t.Fatal from goroutine
2021-10-26 13:02:40 +01: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
Michele Caci
ac4bf927c2 Remove t.Fatal from goroutine
Signed-off-by: Michele Caci <michele.caci@amadeus.com>
2021-10-19 12:53:46 +02:00
joshvanl
64feb85490 Adds bazel to build and release cmctl, along with kubectl-cert_manager
binary

Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2021-10-14 15:49:46 +01:00
Eng Zer Jun
54e70d2cc4
refactor: move from io/ioutil to io and os package
The io/ioutil package has been deprecated in Go 1.16. This commit
replaces the existing io/ioutil functions with their new definitions in
io and os packages.

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2021-08-23 19:50:42 +08:00
Inteon
91ec4c773a
use correct contexts everywhere & don't restart apiserver to add crds
Signed-off-by: Inteon <42113979+inteon@users.noreply.github.com>
2021-08-12 20:05:01 +02:00
Inteon
a569e79776
cleanup test contexts
Signed-off-by: Inteon <42113979+inteon@users.noreply.github.com>
2021-08-06 17:31:19 +02: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
irbekrm
4413774944 Removes unused Bazel deps
Signed-off-by: irbekrm <irbekrm@gmail.com>
2021-06-01 08:49:30 +01:00
irbekrm
d79a058b14 Allow controlling whether cgo is enabled via flags to Bazel
Signed-off-by: irbekrm <irbekrm@gmail.com>
2021-06-01 08:47:06 +01:00
joshvanl
56a604c6f0 Init plugins in webhook cmd
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2021-03-26 17:26:28 +00:00
joshvanl
109b3e0b28 Rename Wehook's API server host flag from --master to --api-server-host
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
827ce9c5ad Revert log levels on errors
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
Maartje Eyskens
9dd00905e9 Update klog
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>

klog v2

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
jetstack-bot
fba7b09ac8
Merge pull request #2725 from JoshVanL/ctl-version
cert-manager-ctl CLI with version
2020-04-08 12:45:15 +01:00
JoshVanL
49d3bde7eb
Move cmd signal handler into shared util
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2020-04-02 11:02:33 +01:00
James Munnelly
e36c1acf1c Add '-ubi' suffix to AppVersion in UBI artifacts
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-04-01 19:34:34 +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
jetstack-bot
e328cfd5aa
Merge pull request #2708 from munnerz/fix-image-uid
Fix issue causing docker images to use UID 0 (root)
2020-03-17 09:51:25 +00:00
James Munnelly
0935277f3d Remove old 'image' targets and update to consistently use //build targets
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-03-17 09:47:01 +00: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
jetstack-bot
f9c23dcb8f
Merge pull request #2556 from munnerz/release-tars
Add release-tars targets to construct cert-manager release artifacts
2020-02-10 16:10:13 +00:00
Will Thames
e1bf54d0e3 Add cipher suites configuration and defaults
Add a --tls-cipher-suites command line flag and set to sensible
defaults.

Signed-off-by: Will Thames <will@thames.id.au>
2020-02-03 22:57:59 +10:00
James Munnelly
22f4f1e1f2 Add release-tars targets to construct cert-manager release artifacts
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-01-30 21:02:58 +00:00
James Munnelly
c27ccd78d7 Update webhook validation handler for validation registry
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-01-20 10:05:54 +00:00