mirror of
https://github.com/projectcapsule/capsule.git
synced 2026-05-05 17:06:40 +00:00
feat: generate TLS certificates before starting controllers
This commit is contained in:
committed by
Dario Tranchitella
parent
37381184d2
commit
f1dc028649
@@ -5,7 +5,6 @@ package webhook
|
||||
|
||||
import (
|
||||
"context"
|
||||
"io/ioutil"
|
||||
|
||||
admissionv1 "k8s.io/api/admission/v1"
|
||||
"k8s.io/client-go/tools/record"
|
||||
@@ -16,12 +15,6 @@ import (
|
||||
)
|
||||
|
||||
func Register(manager controllerruntime.Manager, webhookList ...Webhook) error {
|
||||
// skipping webhook setup if certificate is missing
|
||||
certData, _ := ioutil.ReadFile("/tmp/k8s-webhook-server/serving-certs/tls.crt")
|
||||
if len(certData) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
recorder := manager.GetEventRecorderFor("tenant-webhook")
|
||||
|
||||
server := manager.GetWebhookServer()
|
||||
|
||||
Reference in New Issue
Block a user