From 4d251fb86b8acb0c399f6c783b5a04083d9c9ee5 Mon Sep 17 00:00:00 2001 From: stoneshi-yunify Date: Wed, 15 May 2024 10:18:53 +0800 Subject: [PATCH] fix create admitter Signed-off-by: stoneshi-yunify --- webhook/pvc.go | 2 +- webhook/weebhook.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/webhook/pvc.go b/webhook/pvc.go index ca769f7..436be23 100644 --- a/webhook/pvc.go +++ b/webhook/pvc.go @@ -47,7 +47,7 @@ type Admitter struct { var _ PVCAdmitter = (*Admitter)(nil) -func newAdmitter() (*Admitter, error) { +func NewAdmitter() (*Admitter, error) { cfg, err := config.GetConfig() if err != nil { return nil, err diff --git a/webhook/weebhook.go b/webhook/weebhook.go index ef1f3a4..16b0027 100644 --- a/webhook/weebhook.go +++ b/webhook/weebhook.go @@ -163,7 +163,7 @@ func main(cmd *cobra.Command, args []string) { GetCertificate: cw.GetCertificate, } - admitter, err := newAdmitter() + admitter, err := NewAdmitter() if err != nil { klog.Fatalf("failed to initialize new admitter: %v", err) }