diff --git a/hooks/application.go b/hooks/application.go index f9848d0..ca4c0d0 100644 --- a/hooks/application.go +++ b/hooks/application.go @@ -18,7 +18,7 @@ import ( type applicationValidator struct { client client.Client - dec *admission.Decoder + dec admission.Decoder config *config.Config } @@ -45,7 +45,7 @@ func (v *applicationValidator) Handle(ctx context.Context, req admission.Request } // SetupApplicationWebhook registers the webhooks for Application -func SetupApplicationWebhook(mgr manager.Manager, dec *admission.Decoder, config *config.Config) { +func SetupApplicationWebhook(mgr manager.Manager, dec admission.Decoder, config *config.Config) { serv := mgr.GetWebhookServer() v := &applicationValidator{ diff --git a/hooks/tenant.go b/hooks/tenant.go index 441cd81..d4ede39 100644 --- a/hooks/tenant.go +++ b/hooks/tenant.go @@ -21,7 +21,7 @@ import ( //+kubebuilder:webhook:path=/mutate-cattage-cybozu-io-v1beta1-tenant,mutating=true,failurePolicy=fail,sideEffects=None,groups=cattage.cybozu.io,resources=tenants,verbs=create;update,versions=v1beta1,name=mtenant.kb.io,admissionReviewVersions={v1} type tenantMutator struct { - dec *admission.Decoder + dec admission.Decoder } var _ admission.Handler = &tenantMutator{} @@ -49,7 +49,7 @@ func (m *tenantMutator) Handle(ctx context.Context, req admission.Request) admis type tenantValidator struct { client client.Client - dec *admission.Decoder + dec admission.Decoder config *config.Config } @@ -107,7 +107,7 @@ func (v *tenantValidator) Handle(ctx context.Context, req admission.Request) adm } // SetupTenantWebhook registers the webhooks for Tenant -func SetupTenantWebhook(mgr manager.Manager, dec *admission.Decoder, config *config.Config) { +func SetupTenantWebhook(mgr manager.Manager, dec admission.Decoder, config *config.Config) { serv := mgr.GetWebhookServer() m := &tenantMutator{