Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 4 additions & 3 deletions admissionregistration/v1/xray.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,8 @@ func (d ValidatingWebhookXray) check(ctx context.Context) (bool, error) {
return false, err
}

if d.op == v1.Create {
switch d.op {
case v1.Create:
_, err := ri.Create(ctx, &u, metav1.CreateOptions{})
if kutil.AdmissionWebhookDeniedRequest(err) {
klog.V(10).Infof("failed to create invalid test object as expected with error: %s", err)
Expand All @@ -267,7 +268,7 @@ func (d ValidatingWebhookXray) check(ctx context.Context) (bool, error) {

_ = dynamic_util.WaitUntilDeleted(ri, d.stopCh, accessor.GetName())
return false, admreg.ErrWebhookNotActivated
} else if d.op == v1.Update {
case v1.Update:
_, err := ri.Create(ctx, &u, metav1.CreateOptions{})
if err != nil {
return false, err
Expand Down Expand Up @@ -296,7 +297,7 @@ func (d ValidatingWebhookXray) check(ctx context.Context) (bool, error) {
}

return false, admreg.ErrWebhookNotActivated
} else if d.op == v1.Delete {
case v1.Delete:
_, err := ri.Create(ctx, &u, metav1.CreateOptions{})
if err != nil {
return false, err
Expand Down
7 changes: 4 additions & 3 deletions admissionregistration/v1beta1/xray.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,8 @@ func (d ValidatingWebhookXray) check(ctx context.Context) (bool, error) {
return false, err
}

if d.op == v1beta1.Create {
switch d.op {
case v1beta1.Create:
_, err := ri.Create(ctx, &u, metav1.CreateOptions{})
if kutil.AdmissionWebhookDeniedRequest(err) {
klog.V(10).Infof("failed to create invalid test object as expected with error: %s", err)
Expand All @@ -267,7 +268,7 @@ func (d ValidatingWebhookXray) check(ctx context.Context) (bool, error) {

_ = dynamic_util.WaitUntilDeleted(ri, d.stopCh, accessor.GetName())
return false, admreg.ErrWebhookNotActivated
} else if d.op == v1beta1.Update {
case v1beta1.Update:
_, err := ri.Create(ctx, &u, metav1.CreateOptions{})
if err != nil {
return false, err
Expand Down Expand Up @@ -296,7 +297,7 @@ func (d ValidatingWebhookXray) check(ctx context.Context) (bool, error) {
}

return false, admreg.ErrWebhookNotActivated
} else if d.op == v1beta1.Delete {
case v1beta1.Delete:
_, err := ri.Create(ctx, &u, metav1.CreateOptions{})
if err != nil {
return false, err
Expand Down
2 changes: 1 addition & 1 deletion api/v1/timeofday.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ func (t *TimeOfDay) Fuzz(c fuzz.Continue) {
// Allow for about 1000 years of randomness. Leave off nanoseconds
// because JSON doesn't represent them so they can't round-trip
// properly.
t.Time = time.Unix(c.Rand.Int63n(1000*365*24*60*60), 0)
t.Time = time.Unix(c.Int63n(1000*365*24*60*60), 0)
}

// ensure Time implements fuzz.Interface
Expand Down
4 changes: 4 additions & 0 deletions client/duck/typed_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,10 @@ func (d *typedClient) Update(ctx context.Context, obj client.Object, opts ...cli
return fmt.Errorf("update not supported for duck type %+v", d.duckGVK)
}

func (d *typedClient) Apply(ctx context.Context, obj runtime.ApplyConfiguration, opts ...client.ApplyOption) error {
panic("not implemented")
}

func (d *typedClient) Patch(ctx context.Context, obj client.Object, patch client.Patch, opts ...client.PatchOption) error {
gvk, err := apiutil.GVKForObject(obj, d.c.Scheme())
if err != nil {
Expand Down
4 changes: 4 additions & 0 deletions client/duck/unstructured_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ func (uc *unstructuredClient) Update(ctx context.Context, obj client.Object, opt
return fmt.Errorf("update not supported for duck type %+v", uc.duckGVK)
}

func (uc *unstructuredClient) Apply(ctx context.Context, obj runtime.ApplyConfiguration, opts ...client.ApplyOption) error {
panic("not implemented")
}

// Delete implements client.Client.
func (uc *unstructuredClient) Delete(ctx context.Context, obj client.Object, opts ...client.DeleteOption) error {
gvk, err := apiutil.GVKForObject(obj, uc.c.Scheme())
Expand Down
10 changes: 10 additions & 0 deletions client/retryclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,16 @@ func (r *retryClient) Update(ctx context.Context, obj client.Object, opts ...cli
return
}

func (r *retryClient) Apply(ctx context.Context, obj runtime.ApplyConfiguration, opts ...client.ApplyOption) (apierror error) {
_ = wait.PollUntilContextTimeout(ctx, r.interval, r.timeout, true, func(ctx context.Context) (done bool, err error) {
apierror = r.d.Apply(ctx, obj, opts...)
err = apierror
done = err == nil || !errors.Is(err, io.EOF)
return
})
return
}

func (r *retryClient) Patch(ctx context.Context, obj client.Object, patch client.Patch, opts ...client.PatchOption) (apierror error) {
_ = wait.PollUntilContextTimeout(ctx, r.interval, r.timeout, true, func(ctx context.Context) (done bool, err error) {
apierror = r.d.Patch(ctx, obj, patch, opts...)
Expand Down
4 changes: 4 additions & 0 deletions client/typeclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,10 @@ func (d *typedClient) Update(ctx context.Context, obj client.Object, opts ...cli
return d.c.Update(ctx, llo, opts...)
}

func (d *typedClient) Apply(ctx context.Context, obj runtime.ApplyConfiguration, opts ...client.ApplyOption) error {
panic("not implemented")
}

func (d *typedClient) Patch(ctx context.Context, obj client.Object, patch client.Patch, opts ...client.PatchOption) error {
gvk, err := apiutil.GVKForObject(obj, d.c.Scheme())
if err != nil {
Expand Down
1 change: 1 addition & 0 deletions core/v1/endpoints.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

// nolint:staticcheck
package v1

import (
Expand Down
136 changes: 68 additions & 68 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,150 +6,150 @@ require (
github.com/Masterminds/semver/v3 v3.3.1
github.com/cubewise-code/go-mime v0.0.0-20200519001935-8c5762b177d8
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc
github.com/evanphx/json-patch v5.9.11+incompatible
github.com/evanphx/json-patch v5.9.0+incompatible
github.com/fatih/structs v1.1.0
github.com/fsnotify/fsnotify v1.8.0
github.com/gabriel-vasile/mimetype v1.4.8
github.com/go-logr/logr v1.4.2
github.com/fsnotify/fsnotify v1.9.0
github.com/gabriel-vasile/mimetype v1.4.11
github.com/go-logr/logr v1.4.3
github.com/gogo/protobuf v1.3.2
github.com/google/go-cmp v0.6.0
github.com/google/go-containerregistry v0.20.3
github.com/google/go-cmp v0.7.0
github.com/google/go-containerregistry v0.20.6
github.com/google/gofuzz v1.2.0
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79
github.com/imdario/mergo v0.3.6
github.com/imdario/mergo v0.3.13
github.com/json-iterator/go v1.1.12
github.com/mitchellh/mapstructure v1.5.0
github.com/onsi/gomega v1.36.2
github.com/onsi/gomega v1.36.1
github.com/pkg/errors v0.9.1
github.com/rancher/norman v0.5.2
github.com/rancher/norman v0.0.0-20241001183610-78a520c160ab
github.com/rancher/rancher/pkg/client v0.0.0-20250220153925-3abb578f42fe
github.com/spf13/pflag v1.0.6
github.com/stretchr/testify v1.10.0
github.com/yudai/gojsondiff v1.0.0
github.com/zeebo/xxh3 v1.0.2
golang.org/x/time v0.10.0
gomodules.xyz/jsonpatch/v2 v2.5.0
golang.org/x/time v0.9.0
gomodules.xyz/jsonpatch/v2 v2.4.0
gomodules.xyz/mergo v0.3.13
gomodules.xyz/pointer v0.1.0
gomodules.xyz/sync v0.1.0
gomodules.xyz/x v0.0.17
k8s.io/api v0.32.2
k8s.io/apiextensions-apiserver v0.32.2
k8s.io/apimachinery v0.32.2
k8s.io/apiserver v0.32.2
k8s.io/cli-runtime v0.32.2
k8s.io/client-go v0.32.2
k8s.io/component-base v0.32.2
k8s.io/api v0.34.2
k8s.io/apiextensions-apiserver v0.34.2
k8s.io/apimachinery v0.34.2
k8s.io/apiserver v0.34.2
k8s.io/cli-runtime v0.34.2
k8s.io/client-go v0.34.2
k8s.io/component-base v0.34.2
k8s.io/klog/v2 v2.130.1
k8s.io/kube-aggregator v0.32.2
k8s.io/kube-openapi v0.0.0-20241212222426-2c72e554b1e7
k8s.io/kube-aggregator v0.34.2
k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b
kmodules.xyz/apiversion v0.2.0
sigs.k8s.io/controller-runtime v0.20.4
sigs.k8s.io/yaml v1.4.0
sigs.k8s.io/controller-runtime v0.22.4
sigs.k8s.io/yaml v1.6.0
)

require (
cel.dev/expr v0.18.0 // indirect
cel.dev/expr v0.24.0 // indirect
github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect
github.com/NYTimes/gziphandler v1.1.1 // indirect
github.com/antlr4-go/antlr/v4 v4.13.0 // indirect
github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/blang/semver/v4 v4.0.0 // indirect
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/coreos/go-semver v0.3.1 // indirect
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
github.com/emicklei/go-restful/v3 v3.12.1 // indirect
github.com/emicklei/go-restful/v3 v3.12.2 // indirect
github.com/evanphx/json-patch/v5 v5.9.11 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
github.com/fxamacker/cbor/v2 v2.9.0 // indirect
github.com/ghodss/yaml v1.0.0 // indirect
github.com/go-errors/errors v1.4.2 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-openapi/jsonpointer v0.21.0 // indirect
github.com/go-openapi/jsonreference v0.21.0 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/swag v0.23.0 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/btree v1.1.3 // indirect
github.com/google/cel-go v0.22.0 // indirect
github.com/google/gnostic-models v0.6.9 // indirect
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
github.com/google/cel-go v0.26.0 // indirect
github.com/google/gnostic-models v0.7.0 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/gorilla/websocket v1.5.3 // indirect
github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 // indirect
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/klauspost/compress v1.17.11 // indirect
github.com/klauspost/cpuid/v2 v2.0.9 // indirect
github.com/kylelemons/godebug v1.1.0 // indirect
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/moby/spdystream v0.5.0 // indirect
github.com/moby/term v0.5.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect
github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect
github.com/onsi/ginkgo v1.16.5 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_golang v1.20.5 // indirect
github.com/prometheus/client_golang v1.22.0 // indirect
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.55.0 // indirect
github.com/prometheus/common v0.62.0 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
github.com/rancher/wrangler/v3 v3.2.0-rc.3 // indirect
github.com/rancher/wrangler/v3 v3.0.1-rc.2 // indirect
github.com/sergi/go-diff v1.2.0 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/spf13/cobra v1.8.1 // indirect
github.com/spf13/cobra v1.9.1 // indirect
github.com/stoewer/go-strcase v1.3.0 // indirect
github.com/x448/float16 v0.8.4 // indirect
github.com/xlab/treeprint v1.2.0 // indirect
github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 // indirect
github.com/yudai/pp v2.0.1+incompatible // indirect
go.etcd.io/etcd/api/v3 v3.5.16 // indirect
go.etcd.io/etcd/client/pkg/v3 v3.5.16 // indirect
go.etcd.io/etcd/client/v3 v3.5.16 // indirect
go.etcd.io/etcd/api/v3 v3.6.4 // indirect
go.etcd.io/etcd/client/pkg/v3 v3.6.4 // indirect
go.etcd.io/etcd/client/v3 v3.6.4 // indirect
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.53.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.58.0 // indirect
go.opentelemetry.io/otel v1.33.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 // indirect
go.opentelemetry.io/otel/metric v1.33.0 // indirect
go.opentelemetry.io/otel/sdk v1.33.0 // indirect
go.opentelemetry.io/otel/trace v1.33.0 // indirect
go.opentelemetry.io/proto/otlp v1.3.1 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.60.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 // indirect
go.opentelemetry.io/otel v1.36.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.34.0 // indirect
go.opentelemetry.io/otel/metric v1.36.0 // indirect
go.opentelemetry.io/otel/sdk v1.36.0 // indirect
go.opentelemetry.io/otel/trace v1.36.0 // indirect
go.opentelemetry.io/proto/otlp v1.5.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.27.0 // indirect
golang.org/x/crypto v0.45.0 // indirect
go.yaml.in/yaml/v2 v2.4.2 // indirect
go.yaml.in/yaml/v3 v3.0.4 // indirect
golang.org/x/crypto v0.36.0 // indirect
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect
golang.org/x/net v0.47.0 // indirect
golang.org/x/oauth2 v0.27.0 // indirect
golang.org/x/sync v0.18.0 // indirect
golang.org/x/sys v0.38.0 // indirect
golang.org/x/term v0.37.0 // indirect
golang.org/x/text v0.31.0 // indirect
golang.org/x/net v0.38.0 // indirect
golang.org/x/oauth2 v0.30.0 // indirect
golang.org/x/sync v0.15.0 // indirect
golang.org/x/sys v0.33.0 // indirect
golang.org/x/term v0.30.0 // indirect
golang.org/x/text v0.23.0 // indirect
gomodules.xyz/homedir v0.1.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7 // indirect
google.golang.org/grpc v1.65.0 // indirect
google.golang.org/protobuf v1.36.3 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20250303144028-a0af3efb3deb // indirect
google.golang.org/grpc v1.72.1 // indirect
google.golang.org/protobuf v1.36.5 // indirect
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/kms v0.32.2 // indirect
k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 // indirect
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.0 // indirect
sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 // indirect
sigs.k8s.io/kustomize/api v0.18.0 // indirect
sigs.k8s.io/kustomize/kyaml v0.18.1 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.3 // indirect
k8s.io/kms v0.34.2 // indirect
k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 // indirect
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2 // indirect
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect
sigs.k8s.io/kustomize/api v0.20.1 // indirect
sigs.k8s.io/kustomize/kyaml v0.20.1 // indirect
sigs.k8s.io/randfill v1.0.0 // indirect
sigs.k8s.io/structured-merge-diff/v6 v6.3.0 // indirect
)

replace github.com/imdario/mergo => github.com/imdario/mergo v0.3.6
Loading
Loading