File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -36,7 +36,6 @@ import (
3636 "k8s.io/apimachinery/pkg/util/validation/field"
3737 "k8s.io/utils/ptr"
3838 logf "sigs.k8s.io/controller-runtime/pkg/log"
39- "sigs.k8s.io/controller-runtime/pkg/webhook"
4039 "sigs.k8s.io/controller-runtime/pkg/webhook/admission"
4140)
4241
@@ -59,7 +58,6 @@ func SetupNovaDefaults(defaults NovaDefaults) {
5958 novalog .Info ("Nova defaults initialized" , "defaults" , defaults )
6059}
6160
62- var _ webhook.Defaulter = & Nova {}
6361
6462// Default implements webhook.Defaulter so a webhook will be registered for the type
6563func (r * Nova ) Default () {
@@ -130,7 +128,6 @@ func (spec *NovaSpecCore) Default() {
130128 }
131129}
132130
133- var _ webhook.Validator = & Nova {}
134131
135132// ValidateCellTemplates validates cell templates configuration
136133func (spec * NovaSpecCore ) ValidateCellTemplates (basePath * field.Path , namespace string ) field.ErrorList {
Original file line number Diff line number Diff line change @@ -31,7 +31,6 @@ import (
3131 "k8s.io/apimachinery/pkg/runtime/schema"
3232 "k8s.io/apimachinery/pkg/util/validation/field"
3333 logf "sigs.k8s.io/controller-runtime/pkg/log"
34- "sigs.k8s.io/controller-runtime/pkg/webhook"
3534 "sigs.k8s.io/controller-runtime/pkg/webhook/admission"
3635
3736 "github.com/openstack-k8s-operators/lib-common/modules/common/service"
@@ -54,7 +53,6 @@ func SetupNovaAPIDefaults(defaults NovaAPIDefaults) {
5453 novaapilog .Info ("NovaAPI defaults initialized" , "defaults" , defaults )
5554}
5655
57- var _ webhook.Defaulter = & NovaAPI {}
5856
5957// Default implements webhook.Defaulter so a webhook will be registered for the type
6058func (r * NovaAPI ) Default () {
@@ -70,7 +68,6 @@ func (spec *NovaAPISpec) Default() {
7068 }
7169}
7270
73- var _ webhook.Validator = & NovaAPI {}
7471
7572// ValidateCreate implements webhook.Validator so a webhook will be registered for the type
7673func (r * NovaAPI ) ValidateCreate () (admission.Warnings , error ) {
Original file line number Diff line number Diff line change @@ -33,7 +33,6 @@ import (
3333 "k8s.io/apimachinery/pkg/util/validation/field"
3434 "k8s.io/utils/ptr"
3535 logf "sigs.k8s.io/controller-runtime/pkg/log"
36- "sigs.k8s.io/controller-runtime/pkg/webhook"
3736 "sigs.k8s.io/controller-runtime/pkg/webhook/admission"
3837 topologyv1 "github.com/openstack-k8s-operators/infra-operator/apis/topology/v1beta1"
3938)
@@ -60,7 +59,6 @@ func SetupNovaCellDefaults(defaults NovaCellDefaults) {
6059 novacelllog .Info ("NovaCell defaults initialized" , "defaults" , defaults )
6160}
6261
63- var _ webhook.Defaulter = & NovaCell {}
6462
6563// Default implements webhook.Defaulter so a webhook will be registered for the type
6664func (r * NovaCell ) Default () {
@@ -90,7 +88,6 @@ func (spec *NovaCellSpec) Default() {
9088 }
9189}
9290
93- var _ webhook.Validator = & NovaCell {}
9491
9592func (spec * NovaCellSpec ) validate (basePath * field.Path , namespace string ) field.ErrorList {
9693 var errors field.ErrorList
Original file line number Diff line number Diff line change @@ -32,7 +32,6 @@ import (
3232 "k8s.io/apimachinery/pkg/runtime/schema"
3333 "k8s.io/apimachinery/pkg/util/validation/field"
3434 logf "sigs.k8s.io/controller-runtime/pkg/log"
35- "sigs.k8s.io/controller-runtime/pkg/webhook"
3635 "sigs.k8s.io/controller-runtime/pkg/webhook/admission"
3736 topologyv1 "github.com/openstack-k8s-operators/infra-operator/apis/topology/v1beta1"
3837)
@@ -53,7 +52,6 @@ func SetupNovaComputeDefaults(defaults NovaComputeDefaults) {
5352 novacomputelog .Info ("NovaCompute defaults initialized" , "defaults" , defaults )
5453}
5554
56- var _ webhook.Defaulter = & NovaCompute {}
5755
5856// Default implements webhook.Defaulter so a webhook will be registered for the type
5957func (r * NovaCompute ) Default () {
@@ -69,7 +67,6 @@ func (spec *NovaComputeSpec) Default() {
6967 }
7068}
7169
72- var _ webhook.Validator = & NovaCompute {}
7370
7471// ValidateCreate implements webhook.Validator so a webhook will be registered for the type
7572func (r * NovaCompute ) ValidateCreate () (admission.Warnings , error ) {
Original file line number Diff line number Diff line change @@ -31,7 +31,6 @@ import (
3131 "k8s.io/apimachinery/pkg/runtime/schema"
3232 "k8s.io/apimachinery/pkg/util/validation/field"
3333 logf "sigs.k8s.io/controller-runtime/pkg/log"
34- "sigs.k8s.io/controller-runtime/pkg/webhook"
3534 "sigs.k8s.io/controller-runtime/pkg/webhook/admission"
3635 topologyv1 "github.com/openstack-k8s-operators/infra-operator/apis/topology/v1beta1"
3736)
@@ -52,7 +51,6 @@ func SetupNovaConductorDefaults(defaults NovaConductorDefaults) {
5251 novaconductorlog .Info ("NovaConductor defaults initialized" , "defaults" , defaults )
5352}
5453
55- var _ webhook.Defaulter = & NovaConductor {}
5654
5755// Default implements webhook.Defaulter so a webhook will be registered for the type
5856func (r * NovaConductor ) Default () {
@@ -68,7 +66,6 @@ func (spec *NovaConductorSpec) Default() {
6866 }
6967}
7068
71- var _ webhook.Validator = & NovaConductor {}
7269
7370// ValidateCreate implements webhook.Validator so a webhook will be registered for the type
7471func (r * NovaConductor ) ValidateCreate () (admission.Warnings , error ) {
Original file line number Diff line number Diff line change @@ -31,7 +31,6 @@ import (
3131 "k8s.io/apimachinery/pkg/runtime/schema"
3232 "k8s.io/apimachinery/pkg/util/validation/field"
3333 logf "sigs.k8s.io/controller-runtime/pkg/log"
34- "sigs.k8s.io/controller-runtime/pkg/webhook"
3534 "sigs.k8s.io/controller-runtime/pkg/webhook/admission"
3635 topologyv1 "github.com/openstack-k8s-operators/infra-operator/apis/topology/v1beta1"
3736)
@@ -52,7 +51,6 @@ func SetupNovaMetadataDefaults(defaults NovaMetadataDefaults) {
5251 novametadatalog .Info ("NovaMetadata defaults initialized" , "defaults" , defaults )
5352}
5453
55- var _ webhook.Defaulter = & NovaMetadata {}
5654
5755// Default implements webhook.Defaulter so a webhook will be registered for the type
5856func (r * NovaMetadata ) Default () {
@@ -68,7 +66,6 @@ func (spec *NovaMetadataSpec) Default() {
6866 }
6967}
7068
71- var _ webhook.Validator = & NovaMetadata {}
7269
7370// ValidateCreate implements webhook.Validator so a webhook will be registered for the type
7471func (r * NovaMetadata ) ValidateCreate () (admission.Warnings , error ) {
Original file line number Diff line number Diff line change @@ -30,7 +30,6 @@ import (
3030 "k8s.io/apimachinery/pkg/runtime"
3131 "k8s.io/apimachinery/pkg/util/validation/field"
3232 logf "sigs.k8s.io/controller-runtime/pkg/log"
33- "sigs.k8s.io/controller-runtime/pkg/webhook"
3433 "k8s.io/apimachinery/pkg/runtime/schema"
3534 "sigs.k8s.io/controller-runtime/pkg/webhook/admission"
3635 topologyv1 "github.com/openstack-k8s-operators/infra-operator/apis/topology/v1beta1"
@@ -52,7 +51,6 @@ func SetupNovaNoVNCProxyDefaults(defaults NovaNoVNCProxyDefaults) {
5251 novanovncproxylog .Info ("NovaNoVNCProxy defaults initialized" , "defaults" , defaults )
5352}
5453
55- var _ webhook.Defaulter = & NovaNoVNCProxy {}
5654
5755// Default implements webhook.Defaulter so a webhook will be registered for the type
5856func (r * NovaNoVNCProxy ) Default () {
@@ -68,7 +66,6 @@ func (spec *NovaNoVNCProxySpec) Default() {
6866 }
6967}
7068
71- var _ webhook.Validator = & NovaNoVNCProxy {}
7269
7370// ValidateCreate implements webhook.Validator so a webhook will be registered for the type
7471func (r * NovaNoVNCProxy ) ValidateCreate () (admission.Warnings , error ) {
Original file line number Diff line number Diff line change @@ -29,7 +29,6 @@ import (
2929 apierrors "k8s.io/apimachinery/pkg/api/errors"
3030 "k8s.io/apimachinery/pkg/runtime"
3131 logf "sigs.k8s.io/controller-runtime/pkg/log"
32- "sigs.k8s.io/controller-runtime/pkg/webhook"
3332 "sigs.k8s.io/controller-runtime/pkg/webhook/admission"
3433 "k8s.io/apimachinery/pkg/util/validation/field"
3534 topologyv1 "github.com/openstack-k8s-operators/infra-operator/apis/topology/v1beta1"
@@ -52,7 +51,6 @@ func SetupNovaSchedulerDefaults(defaults NovaSchedulerDefaults) {
5251 novaschedulerlog .Info ("NovaScheduler defaults initialized" , "defaults" , defaults )
5352}
5453
55- var _ webhook.Defaulter = & NovaScheduler {}
5654
5755// Default implements webhook.Defaulter so a webhook will be registered for the type
5856func (r * NovaScheduler ) Default () {
@@ -68,7 +66,6 @@ func (spec *NovaSchedulerSpec) Default() {
6866 }
6967}
7068
71- var _ webhook.Validator = & NovaScheduler {}
7269
7370// ValidateCreate implements webhook.Validator so a webhook will be registered for the type
7471func (r * NovaScheduler ) ValidateCreate () (admission.Warnings , error ) {
Original file line number Diff line number Diff line change @@ -30,7 +30,6 @@ import (
3030 "k8s.io/apimachinery/pkg/runtime/schema"
3131 "k8s.io/apimachinery/pkg/util/validation/field"
3232 logf "sigs.k8s.io/controller-runtime/pkg/log"
33- "sigs.k8s.io/controller-runtime/pkg/webhook"
3433 "sigs.k8s.io/controller-runtime/pkg/webhook/admission"
3534)
3635
@@ -51,8 +50,6 @@ func SetupPlacementAPIDefaults(defaults PlacementAPIDefaults) {
5150 placementapilog .Info ("PlacementAPI defaults initialized" , "defaults" , defaults )
5251}
5352
54- var _ webhook.Defaulter = & PlacementAPI {}
55-
5653// Default implements webhook.Defaulter so a webhook will be registered for the type
5754func (r * PlacementAPI ) Default () {
5855 placementapilog .Info ("default" , "name" , r .Name )
@@ -75,8 +72,6 @@ func (spec *PlacementAPISpecCore) Default() {
7572 // nothing here yet
7673}
7774
78- var _ webhook.Validator = & PlacementAPI {}
79-
8075// ValidateCreate implements webhook.Validator so a webhook will be registered for the type
8176func (r * PlacementAPI ) ValidateCreate () (admission.Warnings , error ) {
8277 placementapilog .Info ("validate create" , "name" , r .Name )
You can’t perform that action at this time.
0 commit comments