File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,7 +28,6 @@ import (
2828 "k8s.io/apimachinery/pkg/runtime/schema"
2929 "k8s.io/apimachinery/pkg/util/validation/field"
3030 logf "sigs.k8s.io/controller-runtime/pkg/log"
31- "sigs.k8s.io/controller-runtime/pkg/webhook"
3231 "sigs.k8s.io/controller-runtime/pkg/webhook/admission"
3332
3433 common_webhook "github.com/openstack-k8s-operators/lib-common/modules/common/webhook"
@@ -50,8 +49,6 @@ func SetupMemcachedDefaults(defaults MemcachedDefaults) {
5049 memcachedlog .Info ("Memcached defaults initialized" , "defaults" , defaults )
5150}
5251
53- var _ webhook.Defaulter = & Memcached {}
54-
5552// Default implements webhook.Defaulter so a webhook will be registered for the type
5653func (r * Memcached ) Default () {
5754 memcachedlog .Info ("default" , "name" , r .Name )
@@ -72,8 +69,6 @@ func (spec *MemcachedSpecCore) Default() {
7269 // nothing here
7370}
7471
75- var _ webhook.Validator = & Memcached {}
76-
7772// ValidateCreate implements webhook.Validator so a webhook will be registered for the type
7873func (r * Memcached ) ValidateCreate () (admission.Warnings , error ) {
7974 memcachedlog .Info ("validate create" , "name" , r .Name )
Original file line number Diff line number Diff line change @@ -25,7 +25,6 @@ import (
2525 "k8s.io/apimachinery/pkg/runtime/schema"
2626 "k8s.io/apimachinery/pkg/util/validation/field"
2727 logf "sigs.k8s.io/controller-runtime/pkg/log"
28- "sigs.k8s.io/controller-runtime/pkg/webhook"
2928 "sigs.k8s.io/controller-runtime/pkg/webhook/admission"
3029)
3130
@@ -45,8 +44,6 @@ func SetupDNSMasqDefaults(defaults DNSMasqDefaults) {
4544 dnsmasqlog .Info ("DNSMasq defaults initialized" , "defaults" , defaults )
4645}
4746
48- var _ webhook.Defaulter = & DNSMasq {}
49-
5047// Default implements webhook.Defaulter so a webhook will be registered for the type
5148func (r * DNSMasq ) Default () {
5249 dnsmasqlog .Info ("default" , "name" , r .Name )
@@ -85,8 +82,6 @@ func (spec *DNSMasqSpecCore) Default(namespace string) {
8582 }
8683}
8784
88- var _ webhook.Validator = & DNSMasq {}
89-
9085// ValidateCreate implements webhook.Validator so a webhook will be registered for the type
9186func (r * DNSMasq ) ValidateCreate () (admission.Warnings , error ) {
9287 dnsmasqlog .Info ("validate create" , "name" , r .Name )
Original file line number Diff line number Diff line change @@ -29,24 +29,19 @@ import (
2929 "k8s.io/apimachinery/pkg/util/validation/field"
3030 k8snet "k8s.io/utils/net"
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)
3534
3635// log is for logging in this package.
3736var ipsetlog = logf .Log .WithName ("ipset-resource" )
3837
39- var _ webhook.Defaulter = & IPSet {}
40-
4138// Default implements webhook.Defaulter so a webhook will be registered for the type
4239func (r * IPSet ) Default () {
4340 ipsetlog .Info ("default" , "name" , r .Name )
4441
4542 // TODO(user): fill in your defaulting logic.
4643}
4744
48- var _ webhook.Validator = & IPSet {}
49-
5045// ValidateCreate implements webhook.Validator so a webhook will be registered for the type
5146func (r * IPSet ) ValidateCreate () (admission.Warnings , error ) {
5247 ipsetlog .Info ("validate create" , "name" , r .Name )
Original file line number Diff line number Diff line change @@ -30,15 +30,12 @@ import (
3030 "k8s.io/apimachinery/pkg/util/validation/field"
3131 k8snet "k8s.io/utils/net"
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
3736// log is for logging in this package.
3837var netconfiglog = logf .Log .WithName ("netconfig-resource" )
3938
40- var _ webhook.Defaulter = & NetConfig {}
41-
4239// Default implements webhook.Defaulter so a webhook will be registered for the type
4340func (r * NetConfig ) Default () {
4441 for idx , net := range r .Spec .Networks {
@@ -48,8 +45,6 @@ func (r *NetConfig) Default() {
4845 }
4946}
5047
51- var _ webhook.Validator = & NetConfig {}
52-
5348// ValidateCreate implements webhook.Validator so a webhook will be registered for the type
5449func (r * NetConfig ) ValidateCreate () (admission.Warnings , error ) {
5550 netconfiglog .Info ("validate create" , "name" , r .Name )
Original file line number Diff line number Diff line change @@ -19,24 +19,19 @@ package v1beta1
1919import (
2020 "k8s.io/apimachinery/pkg/runtime"
2121 logf "sigs.k8s.io/controller-runtime/pkg/log"
22- "sigs.k8s.io/controller-runtime/pkg/webhook"
2322 "sigs.k8s.io/controller-runtime/pkg/webhook/admission"
2423)
2524
2625// log is for logging in this package.
2726var reservationlog = logf .Log .WithName ("reservation-resource" )
2827
29- var _ webhook.Defaulter = & Reservation {}
30-
3128// Default implements webhook.Defaulter so a webhook will be registered for the type
3229func (r * Reservation ) Default () {
3330 reservationlog .Info ("default" , "name" , r .Name )
3431
3532 // TODO(user): fill in your defaulting logic.
3633}
3734
38- var _ webhook.Validator = & Reservation {}
39-
4035// ValidateCreate implements webhook.Validator so a webhook will be registered for the type
4136func (r * Reservation ) ValidateCreate () (admission.Warnings , error ) {
4237 reservationlog .Info ("validate create" , "name" , r .Name )
Original file line number Diff line number Diff line change @@ -29,7 +29,6 @@ import (
2929 "k8s.io/apimachinery/pkg/util/validation/field"
3030 "sigs.k8s.io/controller-runtime/pkg/client"
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)
3534
@@ -162,8 +161,6 @@ func (spec *RabbitMqSpecCore) Default(isNew bool) {
162161 }
163162}
164163
165- var _ webhook.Validator = & RabbitMq {}
166-
167164// ValidateCreate implements webhook.Validator so a webhook will be registered for the type
168165func (r * RabbitMq ) ValidateCreate () (admission.Warnings , error ) {
169166 rabbitmqlog .Info ("validate create" , "name" , r .Name )
Original file line number Diff line number Diff line change @@ -28,7 +28,6 @@ import (
2828 "k8s.io/apimachinery/pkg/runtime/schema"
2929 "k8s.io/apimachinery/pkg/util/validation/field"
3030 logf "sigs.k8s.io/controller-runtime/pkg/log"
31- "sigs.k8s.io/controller-runtime/pkg/webhook"
3231 "sigs.k8s.io/controller-runtime/pkg/webhook/admission"
3332
3433 common_webhook "github.com/openstack-k8s-operators/lib-common/modules/common/webhook"
@@ -50,8 +49,6 @@ func SetupRedisDefaults(defaults RedisDefaults) {
5049 redislog .Info ("Redis defaults initialized" , "defaults" , defaults )
5150}
5251
53- var _ webhook.Defaulter = & Redis {}
54-
5552// Default implements webhook.Defaulter so a webhook will be registered for the type
5653func (r * Redis ) Default () {
5754 redislog .Info ("default" , "name" , r .Name )
@@ -72,8 +69,6 @@ func (spec *RedisSpecCore) Default() {
7269 //nothing to validate yet
7370}
7471
75- var _ webhook.Validator = & Redis {}
76-
7772// ValidateCreate implements webhook.Validator so a webhook will be registered for the type
7873func (r * Redis ) ValidateCreate () (admission.Warnings , error ) {
7974 redislog .Info ("validate create" , "name" , r .Name )
You can’t perform that action at this time.
0 commit comments