Skip to content

Commit

Permalink
build: update k8s and controller runtime pkgs
Browse files Browse the repository at this point in the history
this commit update the kubernetes pkgs to latest 0.27.2
and controller runtime version to 1.15.0.

Signed-off-by: subhamkrai <[email protected]>

Signed-off-by: subhamkrai <[email protected]>
  • Loading branch information
subhamkrai authored and mergify[bot] committed Jun 26, 2023
1 parent d58e6b4 commit d4463a0
Show file tree
Hide file tree
Showing 571 changed files with 40,355 additions and 23,110 deletions.
17 changes: 9 additions & 8 deletions apis/csiaddons/v1alpha1/csiaddonsnode_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import (
ctrl "sigs.k8s.io/controller-runtime"
logf "sigs.k8s.io/controller-runtime/pkg/log"
"sigs.k8s.io/controller-runtime/pkg/webhook"
"sigs.k8s.io/controller-runtime/pkg/webhook/admission"
)

// log is for logging in this package.
Expand All @@ -42,17 +43,17 @@ func (c *CSIAddonsNode) SetupWebhookWithManager(mgr ctrl.Manager) error {
var _ webhook.Validator = &CSIAddonsNode{}

// ValidateCreate implements webhook.Validator so a webhook will be registered for the type
func (c *CSIAddonsNode) ValidateCreate() error {
return nil
func (c *CSIAddonsNode) ValidateCreate() (admission.Warnings, error) {
return nil, nil
}

// ValidateUpdate implements webhook.Validator so a webhook will be registered for the type
func (c *CSIAddonsNode) ValidateUpdate(old runtime.Object) error {
func (c *CSIAddonsNode) ValidateUpdate(old runtime.Object) (admission.Warnings, error) {
csnLog.Info("validate update", "name", c.Name)

oldCSIAddonsNode, ok := old.(*CSIAddonsNode)
if !ok {
return errors.New("error casting CSIAddonsNode object")
return nil, errors.New("error casting CSIAddonsNode object")
}

var allErrs field.ErrorList
Expand All @@ -66,15 +67,15 @@ func (c *CSIAddonsNode) ValidateUpdate(old runtime.Object) error {
}

if len(allErrs) != 0 {
return apierrors.NewInvalid(
return nil, apierrors.NewInvalid(
schema.GroupKind{Group: "csiaddons.openshift.io", Kind: "CSIAddonsNode"},
c.Name, allErrs)
}

return nil
return nil, nil
}

// ValidateDelete implements webhook.Validator so a webhook will be registered for the type
func (r *CSIAddonsNode) ValidateDelete() error {
return nil
func (r *CSIAddonsNode) ValidateDelete() (admission.Warnings, error) {
return nil, nil
}
17 changes: 9 additions & 8 deletions apis/csiaddons/v1alpha1/networkfence_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (
ctrl "sigs.k8s.io/controller-runtime"
logf "sigs.k8s.io/controller-runtime/pkg/log"
"sigs.k8s.io/controller-runtime/pkg/webhook"
"sigs.k8s.io/controller-runtime/pkg/webhook/admission"
)

// log is for logging in this package.
Expand All @@ -43,17 +44,17 @@ func (n *NetworkFence) SetupWebhookWithManager(mgr ctrl.Manager) error {
var _ webhook.Validator = &NetworkFence{}

// ValidateCreate implements webhook.Validator so a webhook will be registered for the type
func (n *NetworkFence) ValidateCreate() error {
return nil
func (n *NetworkFence) ValidateCreate() (admission.Warnings, error) {
return nil, nil
}

// ValidateUpdate implements webhook.Validator so a webhook will be registered for the type
func (n *NetworkFence) ValidateUpdate(old runtime.Object) error {
func (n *NetworkFence) ValidateUpdate(old runtime.Object) (admission.Warnings, error) {
nfLog.Info("validate update", "name", n.Name)

oldNetworkFence, ok := old.(*NetworkFence)
if !ok {
return errors.New("error casting NetworkFence object")
return nil, errors.New("error casting NetworkFence object")
}

var allErrs field.ErrorList
Expand All @@ -74,15 +75,15 @@ func (n *NetworkFence) ValidateUpdate(old runtime.Object) error {
}

if len(allErrs) != 0 {
return apierrors.NewInvalid(
return nil, apierrors.NewInvalid(
schema.GroupKind{Group: "csiaddons.openshift.io", Kind: "NetworkFence"},
n.Name, allErrs)
}

return nil
return nil, nil
}

// ValidateDelete implements webhook.Validator so a webhook will be registered for the type
func (n *NetworkFence) ValidateDelete() error {
return nil
func (n *NetworkFence) ValidateDelete() (admission.Warnings, error) {
return nil, nil
}
17 changes: 9 additions & 8 deletions apis/csiaddons/v1alpha1/reclaimspacecronjob_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import (
ctrl "sigs.k8s.io/controller-runtime"
logf "sigs.k8s.io/controller-runtime/pkg/log"
"sigs.k8s.io/controller-runtime/pkg/webhook"
"sigs.k8s.io/controller-runtime/pkg/webhook/admission"
)

// log is for logging in this package.
Expand All @@ -42,17 +43,17 @@ func (r *ReclaimSpaceCronJob) SetupWebhookWithManager(mgr ctrl.Manager) error {
var _ webhook.Validator = &ReclaimSpaceCronJob{}

// ValidateCreate implements webhook.Validator so a webhook will be registered for the type
func (r *ReclaimSpaceCronJob) ValidateCreate() error {
return nil
func (r *ReclaimSpaceCronJob) ValidateCreate() (admission.Warnings, error) {
return nil, nil
}

// ValidateUpdate implements webhook.Validator so a webhook will be registered for the type
func (r *ReclaimSpaceCronJob) ValidateUpdate(old runtime.Object) error {
func (r *ReclaimSpaceCronJob) ValidateUpdate(old runtime.Object) (admission.Warnings, error) {
rscjLog.Info("validate update", "name", r.Name)

oldReclaimSpaceCronJob, ok := old.(*ReclaimSpaceCronJob)
if !ok {
return errors.New("error casting ReclaimSpaceCronJob object")
return nil, errors.New("error casting ReclaimSpaceCronJob object")
}

var allErrs field.ErrorList
Expand All @@ -62,14 +63,14 @@ func (r *ReclaimSpaceCronJob) ValidateUpdate(old runtime.Object) error {
}

if len(allErrs) != 0 {
return apierrors.NewInvalid(
return nil, apierrors.NewInvalid(
schema.GroupKind{Group: "csiaddons.openshift.io", Kind: "ReclaimSpaceCronJob"},
r.Name, allErrs)
}
return nil
return nil, nil
}

// ValidateDelete implements webhook.Validator so a webhook will be registered for the type
func (r *ReclaimSpaceCronJob) ValidateDelete() error {
return nil
func (r *ReclaimSpaceCronJob) ValidateDelete() (admission.Warnings, error) {
return nil, nil
}
17 changes: 9 additions & 8 deletions apis/csiaddons/v1alpha1/reclaimspacejob_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import (
ctrl "sigs.k8s.io/controller-runtime"
logf "sigs.k8s.io/controller-runtime/pkg/log"
"sigs.k8s.io/controller-runtime/pkg/webhook"
"sigs.k8s.io/controller-runtime/pkg/webhook/admission"
)

// log is for logging in this package.
Expand All @@ -42,17 +43,17 @@ func (r *ReclaimSpaceJob) SetupWebhookWithManager(mgr ctrl.Manager) error {
var _ webhook.Validator = &ReclaimSpaceJob{}

// ValidateCreate implements webhook.Validator so a webhook will be registered for the type
func (r *ReclaimSpaceJob) ValidateCreate() error {
return nil
func (r *ReclaimSpaceJob) ValidateCreate() (admission.Warnings, error) {
return nil, nil
}

// ValidateUpdate implements webhook.Validator so a webhook will be registered for the type
func (r *ReclaimSpaceJob) ValidateUpdate(old runtime.Object) error {
func (r *ReclaimSpaceJob) ValidateUpdate(old runtime.Object) (admission.Warnings, error) {
rsjLog.Info("validate update", "name", r.Name)

oldReclaimSpaceJob, ok := old.(*ReclaimSpaceJob)
if !ok {
return errors.New("error casting ReclaimSpaceJob object")
return nil, errors.New("error casting ReclaimSpaceJob object")
}

var allErrs field.ErrorList
Expand All @@ -62,15 +63,15 @@ func (r *ReclaimSpaceJob) ValidateUpdate(old runtime.Object) error {
}

if len(allErrs) != 0 {
return apierrors.NewInvalid(
return nil, apierrors.NewInvalid(
schema.GroupKind{Group: "csiaddons.openshift.io", Kind: "ReclaimSpaceJob"},
r.Name, allErrs)
}

return nil
return nil, nil
}

// ValidateDelete implements webhook.Validator so a webhook will be registered for the type
func (r *ReclaimSpaceJob) ValidateDelete() error {
return nil
func (r *ReclaimSpaceJob) ValidateDelete() (admission.Warnings, error) {
return nil, nil
}
17 changes: 9 additions & 8 deletions apis/replication.storage/v1alpha1/volumereplication_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (
ctrl "sigs.k8s.io/controller-runtime"
logf "sigs.k8s.io/controller-runtime/pkg/log"
"sigs.k8s.io/controller-runtime/pkg/webhook"
"sigs.k8s.io/controller-runtime/pkg/webhook/admission"
)

// log is for logging in this package.
Expand All @@ -43,17 +44,17 @@ func (v *VolumeReplication) SetupWebhookWithManager(mgr ctrl.Manager) error {
var _ webhook.Validator = &VolumeReplication{}

// ValidateCreate implements webhook.Validator so a webhook will be registered for the type
func (v *VolumeReplication) ValidateCreate() error {
return nil
func (v *VolumeReplication) ValidateCreate() (admission.Warnings, error) {
return nil, nil
}

// ValidateUpdate implements webhook.Validator so a webhook will be registered for the type
func (v *VolumeReplication) ValidateUpdate(old runtime.Object) error {
func (v *VolumeReplication) ValidateUpdate(old runtime.Object) (admission.Warnings, error) {
vrLog.Info("validate update", "name", v.Name)

oldReplication, ok := old.(*VolumeReplication)
if !ok {
return errors.New("error casting old VolumeReplication object")
return nil, errors.New("error casting old VolumeReplication object")
}

var allErrs field.ErrorList
Expand All @@ -69,15 +70,15 @@ func (v *VolumeReplication) ValidateUpdate(old runtime.Object) error {
}

if len(allErrs) != 0 {
return apierrors.NewInvalid(
return nil, apierrors.NewInvalid(
schema.GroupKind{Group: "replication.storage.openshift.io", Kind: "VolumeReplication"},
v.Name, allErrs)
}

return nil
return nil, nil
}

// ValidateDelete implements webhook.Validator so a webhook will be registered for the type
func (v *VolumeReplication) ValidateDelete() error {
return nil
func (v *VolumeReplication) ValidateDelete() (admission.Warnings, error) {
return nil, nil
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (
ctrl "sigs.k8s.io/controller-runtime"
logf "sigs.k8s.io/controller-runtime/pkg/log"
"sigs.k8s.io/controller-runtime/pkg/webhook"
"sigs.k8s.io/controller-runtime/pkg/webhook/admission"
)

// log is for logging in this package.
Expand All @@ -43,17 +44,17 @@ func (v *VolumeReplicationClass) SetupWebhookWithManager(mgr ctrl.Manager) error
var _ webhook.Validator = &VolumeReplicationClass{}

// ValidateCreate implements webhook.Validator so a webhook will be registered for the type
func (v *VolumeReplicationClass) ValidateCreate() error {
return nil
func (v *VolumeReplicationClass) ValidateCreate() (admission.Warnings, error) {
return nil, nil
}

// ValidateUpdate implements webhook.Validator so a webhook will be registered for the type
func (v *VolumeReplicationClass) ValidateUpdate(old runtime.Object) error {
func (v *VolumeReplicationClass) ValidateUpdate(old runtime.Object) (admission.Warnings, error) {
vrcLog.Info("validate update", "name", v.Name)

oldReplicationClass, ok := old.(*VolumeReplicationClass)
if !ok {
return errors.New("error casting old VolumeReplicationClass object")
return nil, errors.New("error casting old VolumeReplicationClass object")
}

var allErrs field.ErrorList
Expand All @@ -68,16 +69,16 @@ func (v *VolumeReplicationClass) ValidateUpdate(old runtime.Object) error {
}

if len(allErrs) == 0 {
return nil
return nil, nil
}

return apierrors.NewInvalid(
return nil, apierrors.NewInvalid(
schema.GroupKind{Group: "replication.storage.openshift.io", Kind: "VolumeReplicationClass"},
v.Name, allErrs)

}

// ValidateDelete implements webhook.Validator so a webhook will be registered for the type
func (v *VolumeReplicationClass) ValidateDelete() error {
return nil
func (v *VolumeReplicationClass) ValidateDelete() (admission.Warnings, error) {
return nil, nil
}
37 changes: 17 additions & 20 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ require (
go.uber.org/zap v1.24.0
google.golang.org/grpc v1.56.1
google.golang.org/protobuf v1.30.0
k8s.io/api v0.26.3
k8s.io/apimachinery v0.26.3
k8s.io/client-go v0.26.3
k8s.io/api v0.27.2
k8s.io/apimachinery v0.27.2
k8s.io/client-go v0.27.2
k8s.io/klog/v2 v2.100.1
sigs.k8s.io/controller-runtime v0.14.6
sigs.k8s.io/controller-runtime v0.15.0
)

require (
Expand All @@ -31,35 +31,32 @@ require (
github.com/evanphx/json-patch v5.6.0+incompatible // indirect
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/go-logr/zapr v1.2.3 // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
github.com/go-openapi/jsonreference v0.20.0 // indirect
github.com/go-logr/zapr v1.2.4 // indirect
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/go-openapi/jsonreference v0.20.1 // indirect
github.com/go-openapi/swag v0.22.3 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/gnostic v0.6.9 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/imdario/mergo v0.3.13 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/kr/pretty v0.3.0 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.2 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/nxadm/tail v1.4.8 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_golang v1.14.0 // indirect
github.com/prometheus/client_model v0.3.0 // indirect
github.com/prometheus/common v0.37.0 // indirect
github.com/prometheus/procfs v0.8.0 // indirect
github.com/rogpeppe/go-internal v1.8.0 // indirect
github.com/prometheus/client_golang v1.15.1 // indirect
github.com/prometheus/client_model v0.4.0 // indirect
github.com/prometheus/common v0.42.0 // indirect
github.com/prometheus/procfs v0.9.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
go.uber.org/atomic v1.10.0 // indirect
go.uber.org/multierr v1.8.0 // indirect
Expand All @@ -69,18 +66,18 @@ require (
golang.org/x/term v0.8.0 // indirect
golang.org/x/text v0.9.0 // indirect
golang.org/x/time v0.3.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.3.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/apiextensions-apiserver v0.26.2 // indirect
k8s.io/component-base v0.26.2 // indirect
k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 // indirect
k8s.io/apiextensions-apiserver v0.27.2 // indirect
k8s.io/component-base v0.27.2 // indirect
k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f // indirect
k8s.io/utils v0.0.0-20230220204549-a5ecb0141aa5 // indirect
sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
)
Loading

0 comments on commit d4463a0

Please sign in to comment.