Skip to content

Commit a50e8b9

Browse files
Merge pull request #467 from stuggi/remove-webhook-interface-assertions
Remove deprecated webhook.Defaulter/Validator interface assertions
2 parents 7c35f5c + 3d28cf8 commit a50e8b9

6 files changed

Lines changed: 0 additions & 23 deletions

File tree

api/go.mod

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ require (
1717
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
1818
github.com/emicklei/go-restful/v3 v3.12.1 // indirect
1919
github.com/evanphx/json-patch/v5 v5.9.0 // indirect
20-
github.com/fsnotify/fsnotify v1.7.0 // indirect
2120
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
2221
github.com/go-logr/logr v1.4.3 // indirect
2322
github.com/go-openapi/jsonpointer v0.21.0 // indirect

api/go.sum

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ github.com/evanphx/json-patch v5.9.0+incompatible h1:fBXyNpNMuTTDdquAq/uisOr2lSh
1414
github.com/evanphx/json-patch v5.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
1515
github.com/evanphx/json-patch/v5 v5.9.0 h1:kcBlZQbplgElYIlo/n1hJbls2z/1awpXxpRi0/FOJfg=
1616
github.com/evanphx/json-patch/v5 v5.9.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ=
17-
github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA=
18-
github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM=
1917
github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E=
2018
github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ=
2119
github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI=

api/v1beta1/ansibletest_webhook.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,24 +28,19 @@ import (
2828
"k8s.io/apimachinery/pkg/runtime"
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

3534
// log is for logging in this package.
3635
var ansibletestlog = logf.Log.WithName("ansibletest-resource")
3736

38-
var _ webhook.Defaulter = &AnsibleTest{}
39-
4037
// Default implements webhook.Defaulter so a webhook will be registered for the type
4138
func (r *AnsibleTest) Default() {
4239
ansibletestlog.Info("default", "name", r.Name)
4340

4441
// TODO(user): fill in your defaulting logic.
4542
}
4643

47-
var _ webhook.Validator = &AnsibleTest{}
48-
4944
// ValidateCreate implements webhook.Validator so a webhook will be registered for the type
5045
func (r *AnsibleTest) ValidateCreate() (admission.Warnings, error) {
5146
ansibletestlog.Info("validate create", "name", r.Name)

api/v1beta1/horizontest_webhook.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,24 +27,19 @@ import (
2727

2828
"k8s.io/apimachinery/pkg/runtime"
2929
logf "sigs.k8s.io/controller-runtime/pkg/log"
30-
"sigs.k8s.io/controller-runtime/pkg/webhook"
3130
"sigs.k8s.io/controller-runtime/pkg/webhook/admission"
3231
)
3332

3433
// log is for logging in this package.
3534
var horizontestlog = logf.Log.WithName("horizontest-resource")
3635

37-
var _ webhook.Defaulter = &HorizonTest{}
38-
3936
// Default implements webhook.Defaulter so a webhook will be registered for the type
4037
func (r *HorizonTest) Default() {
4138
horizontestlog.Info("default", "name", r.Name)
4239

4340
// TODO(user): fill in your defaulting logic.
4441
}
4542

46-
var _ webhook.Validator = &HorizonTest{}
47-
4843
// ValidateCreate implements webhook.Validator so a webhook will be registered for the type
4944
func (r *HorizonTest) ValidateCreate() (admission.Warnings, error) {
5045
horizontestlog.Info("validate create", "name", r.Name)

api/v1beta1/tempest_webhook.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,12 @@ import (
2929
"k8s.io/apimachinery/pkg/runtime"
3030
"k8s.io/apimachinery/pkg/util/validation/field"
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.
3736
var tempestlog = logf.Log.WithName("tempest-resource")
3837

39-
var _ webhook.Defaulter = &Tempest{}
40-
4138
// Default implements webhook.Defaulter so a webhook will be registered for the type
4239
func (r *Tempest) Default() {
4340
tempestlog.Info("default", "name", r.Name)
@@ -60,8 +57,6 @@ func (r *Tempest) PrivilegedRequired() bool {
6057
return len(r.Spec.TempestRun.ExtraImages) > 0
6158
}
6259

63-
var _ webhook.Validator = &Tempest{}
64-
6560
// ValidateCreate implements webhook.Validator so a webhook will be registered for the type
6661
func (r *Tempest) ValidateCreate() (admission.Warnings, error) {
6762
tempestlog.Info("validate create", "name", r.Name)

api/v1beta1/tobiko_webhook.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,24 +29,19 @@ import (
2929
"k8s.io/apimachinery/pkg/runtime"
3030
"k8s.io/apimachinery/pkg/util/validation/field"
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.
3736
var tobikolog = logf.Log.WithName("tobiko-resource")
3837

39-
var _ webhook.Defaulter = &Tobiko{}
40-
4138
// Default implements webhook.Defaulter so a webhook will be registered for the type
4239
func (r *Tobiko) Default() {
4340
tobikolog.Info("default", "name", r.Name)
4441

4542
// TODO(user): fill in your defaulting logic.
4643
}
4744

48-
var _ webhook.Validator = &Tobiko{}
49-
5045
// ValidateCreate implements webhook.Validator so a webhook will be registered for the type
5146
func (r *Tobiko) ValidateCreate() (admission.Warnings, error) {
5247
tobikolog.Info("validate create", "name", r.Name)

0 commit comments

Comments
 (0)