Commit Graph

43 Commits

Author SHA1 Message Date
Adam Talbot
d27fcc2762 refactor: refactored metrics server code into internal package
Signed-off-by: Adam Talbot <adam.talbot@venafi.com>
2024-01-04 15:49:25 +00:00
Adam Talbot
ae143c15f6 feat: add tls to metrics endpoint
Signed-off-by: Adam Talbot <adam.talbot@venafi.com>
2023-12-27 17:15:00 +00:00
Richard Wall
8bed166858 Add ReadHeaderTimeout to all http.Server where that setting is missing
Signed-off-by: Richard Wall <richard.wall@venafi.com>
2023-12-07 11:42:22 +00:00
Tim Ramlot
073d90611e
limit webhook admission input
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
2023-11-17 14:23:57 +01:00
Tobo Atchou
ee638a91ff cert-manager-webhook to provide logs when handling request
Signed-off-by: Tobo Atchou <tobo.atchou@gmail.com>
2023-04-22 10:41:44 +02:00
Ashley Davis
3a055cc2f5
rename all uses of github.com/jetstack/cert-manager
This was done by running the following command twice:

 ```bash
 grep -Ri "github.com/jetstack/cert-manager" . | \
 cut -d":" -f1 | \
 sort | \
 uniq | \
 xargs sed -i
 "s/github.com\/jetstack\/cert-manager/github.com\/cert-manager\/cert-manager/"
 ```

Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
2022-02-02 09:08:31 +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
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
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
jetstack-bot
b04e42c437
Merge pull request #4253 from JoshVanL/apiextensions-v1beta1-v1
Conversion: Apiextensions v1beta1 -> v1
2021-07-30 15:49:49 +01:00
joshvanl
8470ba96f0 Change webhook admission/mutation to no longer understand and reject anything which is not
v1 (remove v1beta1)

Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2021-07-29 11:10:24 +01:00
joshvanl
5762b5706e Update Conversion webhook to no longer understand v1beta1, only v1
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2021-07-26 17:02:18 +01:00
Inteon
632459c6d9
resolve bug & cleanup
Signed-off-by: Inteon <42113979+inteon@users.noreply.github.com>
2021-07-23 15:41:24 +02:00
Inteon
81e216eeba
wait for goroutines to end before exiting
Signed-off-by: Inteon <42113979+inteon@users.noreply.github.com>
2021-07-23 15:30:26 +02:00
Ashley Davis
333af8fd94
further static check fixes
pkg/internal/apis/certmanager/validation/certificate_for_issuer_test.go:34:2 deadcode `defaultTestCrtName` is unused
pkg/issuer/acme/dns/rfc2136/provider_test.go:42:23 errcheck Error return value of `server.Shutdown` is not checked
pkg/issuer/acme/dns/rfc2136/provider_test.go:77:23 errcheck Error return value of `server.Shutdown` is not checked
pkg/issuer/vault/setup.go:37:2 deadcode `messageVaultHealthCheckFailed` is unused
pkg/issuer/venafi/client/request.go:143:5 gosimple S1023: redundant break statement
pkg/logs/logs.go:68:8 errcheck Error return value of `fs.Set` is not checked

the following fixes introduce a panic when the returned error is
non-nil, which could be a breaking change but was deemed to be worth it
pkg/webhook/server/server.go:58:30 errcheck Error return value is not checked
pkg/webhook/server/server.go:59:25 errcheck Error return value is not checked

Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
2021-05-21 12:04:05 +01:00
joshvanl
85ff4301b8 Passes through request context of webhook to admission functions
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2021-04-03 13:19:01 +01: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
Richard Wall
fd1959ec30 Use separate methods for each ConversionReview type
Signed-off-by: Richard Wall <richard.wall@jetstack.io>
2020-09-04 17:12:57 +01:00
Maartje Eyskens
b4c5221e2b One more fix
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-09-02 16:08:03 +02:00
Maartje Eyskens
c7522c2b91 Cast conversion request in the correct API group
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-09-02 16:03:14 +02:00
Maartje Eyskens
47266ffbbc Implement feedback from review
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-08-27 14:46:28 +02:00
Maartje Eyskens
e0749ad822 Implement feedback
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-08-27 13:02:18 +02:00
Maartje Eyskens
136085ac6b Fix conversion (insert facepalm here)
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-08-26 19:03:15 +02:00
Maartje Eyskens
697fe1052a DIY conversions for admissions
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-08-26 17:52:28 +02:00
Maartje Eyskens
351c03a66d Add better error
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-08-17 09:29:23 +02:00
Maartje Eyskens
0d14b65b8e Fix conversion of the conversion
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-08-14 20:29:10 +02:00
Maartje Eyskens
19cc376f79 support v1 conversion webhooks
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-08-14 20:04:19 +02:00
jetstack-bot
9822581393
Merge pull request #3167 from meyskens/admission-v1
Support v1 admission webhooks
2020-08-13 16:04:40 +01: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
Maartje Eyskens
50686d3e26 Support v1 admission webhooks
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-08-10 16:39:49 +02: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
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
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
f3a58ed991 webhook: register pprof http handlers
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-12-10 16:54:15 +00:00
James Munnelly
62c61ca59b Add extra comments to the webhook's server.go
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-10-24 19:41:55 +01:00
James Munnelly
dbd92f88ef Add conversion webhook handler
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-10-24 19:41:55 +01:00
James Munnelly
ca9e8f33b2 Clean up webhook handler interface
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-10-17 12:56:13 +01:00
James Munnelly
da8bf264fd Use standard golang http server for webhook
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-10-17 12:29:34 +01:00