From c14e9caa9a216d3efd5f3d899327c188ec3807b0 Mon Sep 17 00:00:00 2001 From: Knative Automation Date: Mon, 12 Oct 2026 13:38:09 +0000 Subject: [PATCH] upgrade to latest dependencies bumping k8s.io/code-generator 1aaf60c...ae4d7cc: > ae4d7cc Update dependencies to v0.36.5 tag > a01b27c Merge pull request # 141226 from liggitt/golang-deps-1-36 > 16eb461 Update golang.org/x deps > f2be266 Merge pull request # 140296 from jpbetz/cherry-pick-smd-306-revert > 415a84d Bump sigs.k8s.io/structured-merge-diff/v6 to v6.3.3 > a85207c Merge remote-tracking branch 'origin/master' into release-1.36 > 634d8b3 Update github.com/moby/spdystream from v0.5.0 to v0.5.1 > a8853d1 Merge pull request # 137772 from lalitc375/fix-linter > eae1aca Merge pull request # 137864 from yongruilin/dv-dra-mismatch > 8a4544d Add tests for validateTrueBeta and ValidateTrueAlpha > 6770f5f Merge pull request # 137846 from lalitc375/required-forbidden > 9681623 Add slice and map union member support with tests > b37e99e remove no-lint exemption > f4e4b3a Merge pull request # 137849 from bryantbiggs/deps/update-kube-openapi > 640d3a6 Add tests for +k8s:required and +k8s:forbidden validation tags > 6c2d782 Add nil OldValue test coverage for union doc_tests > fe9bcb7 validation-gen: move ifEnabled logic to validationStability, document overrides, and fix test comments/coverage > 7eda35e dependencies: bump kube-openapi to drop ginkgo/gomega indirect deps > 6bb5fac validation-gen: allow beta validations in alpha packages without prefixes > 22fe297 Merge pull request # 136657 from Jefftree/sharding-test > 142174d generated: regenerate proto, openapi, deepcopy, conversion, and testdata > 52fb6e8 Merge pull request # 137773 from lalitc375/graduate-forbidden > 0c804c4 Graduate +k8s:forbidden to beta. > 6b9a77f Merge pull request # 137682 from aaron-prindle/discriminator-and-member-stability-level-support > d8af3a5 Merge pull request # 137298 from dims/dsri/cri-streaming-option-a-hardcut > caa3cde address-feedback: pr review round 2 > 538e7fa staging/streaming: replace testify with stdlib in tests > 31e67ed address-feedback: pr review round 1 > 19131d8 staging: extract CRI streaming modules with client-go compatibility > a8bb4cf fix: stability level to discriminator member validations > 74e08aa Merge pull request # 137587 from thockin/dv_cleanup_and_minItems_and_maximum > 230626d Merge pull request # 137563 from pohly/golangci-lint-bump > bbb73a9 Use sets.List() instead of UnsortedList() > 297db5c Merge pull request # 136996 from everettraven/dv/minlength > 6c137b4 validation-gen: suppress staticcheck SA5008 > c8f1ac7 Add DV tag '+k8s:minItems' > 83f17fe Merge pull request # 137495 from pohly/klog-update > 95363f5 validation-gen/tests: add minlength tag tests > 2989d39 Fail to generate unsigned min and max for negative values > 9c87d31 dependencies: klog v2.140.0 > 51af35a validation-gen/validators: add minlength validator > e14e7d6 Add DV tag '+k8s:maximum' > 82047cd Merge pull request # 137456 from liggitt/go126 > 55fd8ac Add and use util.ParseBool in validation-gen > 34fab6a Merge pull request # 137473 from jpbetz/fix-set-transform > 4486a56 Bump to go 1.26 > 2928537 Use util.ParseInt in all validators > 4a90b5a generate code > c2fb32b Fix informer factory generation and add test > a50a3ad Merge pull request # 137451 from dims/update-google-protobuf-deadcode-fix > 335cf34 Update google.golang.org/protobuf to v1.36.12-0.20260120151049-f2248ac996af > c04b5f5 Merge pull request # 137349 from Jefftree/fix-model-name-bounding-dirs > 7f7de49 Pass --readonly-pkg to openapi-gen and validation-gen in kube_codegen.sh > ee780e3 update kube-openapi > e993285 Merge pull request # 137291 from everettraven/upstream/dv/maxLength-fixup > be8bd46 Merge pull request # 137348 from Jefftree/deepcopy-fix > 8be5083 validation-gen/tests: add maxBytes tag tests > 67a9732 Merge pull request # 137295 from hown3d/code-generator/validation-default-readonly-pkgs > accfcf8 deepcopy-gen: remove dead --bounding-dirs flag > 9297da7 validation-gen/validators: add maxBytes validator > 63e8cd8 Merge pull request # 137230 from lalitc375/support-subresource > 7291039 default readonly_pkgs in kube_codegen.sh > 1efb2df validation-gen/tests/maxlength: use TooLongCharacters error utility for assertions > ee7689f Merge pull request # 137286 from humblec/update-vendored-dependencies > 8537c25 Convert {is,supports}SubResource to modern tag parsing > cee6d43 validators/limits: minor fixes to MaxLength validator > 6adbd5c dependencies: bump gomega to v1.39.1 and ginkgo to v2.28.1 > 37be5ad validation-gen/util: add ParseInt utility for canonical integer parsing > 28e124c Merge pull request # 137274 from lalitc375/tags-graduation > ccc5089 Merge pull request # 137120 from lalitc375/lint-shadow > 811a664 Revert the graduation of maxLength > 05c82ed validation-gen: Fix missing MarkAlpha/MarkBeta for nested validation tags > be4a966 validation-gen: remove manual lint tracking and unused flags > 17ad913 Fix lint errors > 5bf86ce Add lint rules to enforce optional required, stability and alpha/beta prefix. > 2b3857a Merge pull request # 137233 from lalitc375/tags-graduation > 1c40b63 Promote multiple validation-gen tags to beta > 4661b4b Merge pull request # 136392 from skitt/unsupported-typo > cc2438c Merge pull request # 137084 from liggitt/proto-message > 4cde8ee Run codegen > 8df4570 Drop protomessage generator > 90a1889 Align IsWatchListSemanticsUnSupported comment > 2ae2d01 Merge pull request # 136896 from aaron-prindle/modal-validation-upstream > 3238f9f feedback: Remove disallowed tags logic from discriminator validator > 66fcbd2 feedback: Address review comments > 83d8d63 Update staging/src/k8s.io/code-generator/cmd/validation-gen/validators/mode.go > 04bae62 Fix compilation errors from cherry-picks > a034c97 Implement declarative modal validation (+k8s:discriminator and +k8s:member) > ba86954 Add MultiWrapperFunction to support bundling multiple validations > 58eb9ca Merge pull request # 136953 from lalitc375/revert-dv-native > c9a3346 Merge pull request # 136921 from dims/dump-from-utils > 657d61e Revert "validation-gen: Implement declarative validation native logic" > b08e4a5 Merge pull request # 135395 from pohly/apimachinery-wait-for-cache-sync > 270f2de Move dump package from apimachinery to k8s.io/utils > d367e0b Revert "Add DV support for cross field validators" > e6283fe Merge pull request # 136826 from alvaroaleman/bumpv0.32 > d8c5f78 client-go informers: context-aware Start + WaitForCacheSync > 668c74f Merge pull request # 136775 from atombrella/feature/activate_modernize_slicessort > 420672c Bump structured merge diff to v6.3.2 > dcd4edc Merge pull request # 136455 from pohly/client-go-simpleclient-undeprecation > 5a20340 Fixes under staging. > 6db98b2 fake client-go: un-deprecate NewSimpleClientset > 0f34ff6 Merge pull request # 135782 from richabanker/fifo-identity-metric > d8de6b3 Merge pull request # 136284 from lalitc375/dv-shadow > 6371062 Generate informers with InformerName support > 463a0e4 Merge pull request # 136747 from dims/use-k8s-utils-btree > cb35119 Extract out tags valdiations from all validations > 08d22e5 Update informer-gen to support InformerName for metrics > 094e18a Use btree from k8s.io/utils instead of github.com/google/btree > 75b21f9 Add alpha and beta tests > 5646ad8 Merge pull request # 136582 from yongruilin/master_kubeopenapi-format > 9334b7f Update validators to support alpha/beta levels > 1ef6421 Merge pull request # 136578 from yongruilin/grandtour-codegen-doc > 4343241 Bump k8s.io/kube-openapi to latest > 13f6f11 Add +k8s:alpha and +k8s:beta tags support > 6b59b4a docs: Add comprehensive overview of Kubernetes Code Generator > b8ccd2d Extract out tags validations from all validations > 41a43ea Merge pull request # 136362 from dims/update-opentelemetry-v1.39.0 > 13faf7d rename stability Level to TagStabilityLevel > 7bbd12d Update OpenTelemetry dependencies to latest versions > 8c7575e Merge pull request # 136081 from lalitc375/dv-native > 285401e Merge pull request # 136212 from dims/update-security-deps-jan2026-v2 > 44537a4 Remove non existent tags > e2758a2 Merge pull request # 135164 from helayoty/helayoty/workload-declarative-validation > 29a28c0 Update security and stability dependencies > f97617b Fix staticcheck lint error in validation-gen > 138c280 Merge pull request # 136192 from dnaeon/fix/defaulter-gen-leftover > c5321ce Add k8s-path-segment-name format validator > 1a5669e validation-gen: Implement declarative validation native logic > fc4f684 Merge pull request # 136162 from dims/update-security-deps-jan2026 > 152fe95 code-generator/defaulter-gen: remove a leftover > 3b93e15 Add DV support for cross field validators > 25219ae Update security-critical authentication and protobuf dependencies > d04171f Merge pull request # 135770 from dnaeon/code-generator/defaulter-gen > 4d14530 Merge pull request # 136161 from dims/update-golang-x-deps-jan2026 > 4f229e6 code-generator/defaulter-gen: generate defaults only if required tags are present > 0249bf1 Merge pull request # 135949 from lalitc375/stability-tag-promotion > c1a4a55 Update golang.org/x dependencies to latest versions > f6b933d Merge pull request # 136079 from lalitc375/for-each > e4e6a3c Promote validation-gen tags to Stable > a22223d Merge pull request # 136108 from pohly/ginkgo-gomega-update > e6c9861 Migrate ResourceSlice map key validation to declarative validation > 9e5b5af dependencies: ginkgo v2.27.4, gomega v1.39.0 > 0bfb56f Merge pull request # 136058 from yongruilin/vg-master_skip-list > f217a53 feat: skip validation for types that are Lists in GetTargets function > 31a3da1 Merge pull request # 135391 from jpbetz/smd-6_3_1 > e1db8cb Merge pull request # 135867 from dims/pin-versions-of-dbus-and-otelgrpc-to-avoid-breakage > 1ccc4d6 hack/pin-dependency.sh sigs.k8s.io/structured-merge-diff/v6 v6.3.1 > da472bb updated to last known good dependencies for otelgrpc and dbus > 68c815e Merge pull request # 135836 from pohly/ginkgo-gomega-update > e19e276 Merge pull request # 135845 from skitt/drop-armon-circbuf > 90a9b1a dependencies: ginkgo v2.27.3 + gomega v1.38.3 > 3d3c6c7 Merge pull request # 135229 from lalitc375/origin-union > ed4bb53 Replace armon/circbuf with k8s.io/utils/buffer > f9ba8a1 Add origins for the union validtions errors > 48c1e87 Merge pull request # 135531 from pohly/golangci-lint-bump > 4d113b6 build: remove deprecated '// +build' tag > 423c128 Merge pull request # 135760 from thockin/validation-warnings > 9e814c2 Merge pull request # 133828 from dims/drop-unnecessary-usegocmp-build-tag > 0b526fd Add validation-gen 'warning' to tag docs > ce3f9b6 Merge pull request # 135536 from dims/bump-x/crypto-to-v0.45.0 > 2e1ecd7 Drop unnecessary usegocmp build tag bumping github.com/pmezard/go-difflib 792786c...5d4384e: > 5d4384e Merge pull request # 10 from justbuchanan/master > fca3d27 travis: remove travis integration > 4d7e5c1 Update README.md > 1ef1646 README: end of maintenance notice. bumping k8s.io/apimachinery eb97e1c...e7b3319: > e7b3319 Update dependencies to v0.36.5 tag > 5af8c14 Merge pull request # 141226 from liggitt/golang-deps-1-36 > 42e032e Update golang.org/x deps > 34d46be Merge pull request # 140296 from jpbetz/cherry-pick-smd-306-revert > 66a3724 Bump sigs.k8s.io/structured-merge-diff/v6 to v6.3.3 > 2ec982d Merge pull request # 139508 from lalitc375/automated-cherry-pick-of-# 139480-origin-release-1.36 > 6a88102 Fix wrong marking of errors > efb7f26 Merge remote-tracking branch 'origin/master' into release-1.36 > d966e56 Update github.com/moby/spdystream from v0.5.0 to v0.5.1 > 79b3632 Merge pull request # 137864 from yongruilin/dv-dra-mismatch > 729062d Merge pull request # 137849 from bryantbiggs/deps/update-kube-openapi > a8822f7 Add slice and map union member support with tests > 13b12e6 dependencies: bump kube-openapi to drop ginkgo/gomega indirect deps > 7dba2d0 Use IsZero instead of IsNil for union ratcheting check > 27f4670 Merge pull request # 136657 from Jefftree/sharding-test > d95710f Fix union validation ratcheting when oldObj is nil > 175ed01 sharding: address review comments (deads2k) > 3f48e27 generated: regenerate proto, openapi, deepcopy, conversion, and testdata > 5fe3cd2 sharding: implement UID-based sharding for list and watch (KEP-5866) > f00b254 Merge pull request # 137298 from dims/dsri/cri-streaming-option-a-hardcut > 668261f staging/streaming: replace testify with stdlib in tests > 7276efa staging: extract CRI streaming modules with client-go compatibility > 65082b6 Merge pull request # 137587 from thockin/dv_cleanup_and_minItems_and_maximum > 068235c Merge pull request # 135419 from pohly/apimachinery-handle-errors-helper > 12514a9 Fix maxItems test to match minItems with ErrorMatcher > cd6628e Merge pull request # 137581 from aaron-prindle/fieldsv1-string-interning-impl > 639a717 apimachinery: clarify ErrorHandler and provide helper for formatting > 4e135c3 Add DV tag '+k8s:minItems' > 151736c Merge pull request # 136996 from everettraven/dv/minlength > 3530217 feat: add build-tag type switching for FieldsV1 to string that uses unique.Handle[string] for interning and associated tests + benchmarks > 3bd519f Fix minimum test to match maximum with ErrorMatcher > 3c9213c Merge pull request # 137495 from pohly/klog-update > 4059ba8 api/validate: add MinLength validation > 132e08c Add DV tag '+k8s:maximum' > 0366c6f Merge pull request # 137497 from atombrella/feature/modernize_activate_forvar > a19360a dependencies: klog v2.140.0 > 2851d64 field/errors: add TooShort error type > b00d825 Lint: Activate modernize/forvar rule in golangci-lint. > 647784e Merge pull request # 137456 from liggitt/go126 > ad452d7 Merge pull request # 137304 from aaron-prindle/fieldsv1-encapsulation > 641f626 Bump to go 1.26 > b70df59 Merge pull request # 137451 from dims/update-google-protobuf-deadcode-fix > 86d0ceb refactor: update in-tree FieldsV1 consumers to use format-specific accessors > 35ce3cb Update google.golang.org/protobuf to v1.36.12-0.20260120151049-f2248ac996af > 6a13c06 feat: introduce format-specific accessors and equality helper for FieldsV1 > 850367d Merge pull request # 137349 from Jefftree/fix-model-name-bounding-dirs > 15676ac refactor: extract FieldsV1 declaration, proto, deepcopy into separate manually managed files > cec3aa7 update kube-openapi > b2c4fa7 Merge pull request # 137291 from everettraven/upstream/dv/maxLength-fixup > 48224b4 Merge pull request # 137053 from danwinship/kep-4858-beta > 3586ff6 validation-gen/validators: add maxBytes validator > b6415d3 Merge pull request # 137286 from humblec/update-vendored-dependencies > 15d1001 Update the text of the StrictIPCIDRValidation warnings > ab98d2d api/validate: add MaxBytes limit validation > fc057fc dependencies: bump gomega to v1.39.1 and ginkgo to v2.28.1 > 5697b58 validate/limits: update MaxLength validation to be character-based > db8f40c Merge pull request # 136630 from lalitc375/dv-testing-utils > 68c6dac field/errors: add TooLongCharacters error utility > f797d13 Fix resource claim DV > 2c1148f Add logic to match errors according to the error origination > eae5e9e Merge pull request # 137084 from liggitt/proto-message > fe5c958 Merge pull request # 137017 from lalitc375/revert-dv-native > ecf1820 Regenerate protobuf > b2e9f88 Merge pull request # 136896 from aaron-prindle/modal-validation-upstream > c710152 Revert DV native error matcher > 2f42cbd feedback: Address review comments > 7d88c5c Implement declarative modal validation (+k8s:discriminator and +k8s:member) > 34da993 Merge pull request # 136793 from yongruilin/master_vg-strategy-alpha > aed281c Merge pull request # 136921 from dims/dump-from-utils > a7cc30b address feedback: add IsAlpha/IsBeta helpers for ValidationStabilityLevel > 843168f Move dump package from apimachinery to k8s.io/utils > ac0aa31 Merge pull request # 136826 from alvaroaleman/bumpv0.32 > 4590920 Bump structured merge diff to v6.3.2 > f12546b Merge pull request # 136284 from lalitc375/dv-shadow > c058676 Merge pull request # 135636 from mikecook/DeepEqualWithNilDifferentFromEmpty > eee5384 Add ValidationLevel to field errors > 4c7488a Merge pull request # 136747 from dims/use-k8s-utils-btree > abc87da fix DeepEqualWithNilDifferentFromEmpty comparison > 0314759 Use btree from k8s.io/utils instead of github.com/google/btree > f88bdbf Merge pull request # 136576 from pohly/log-client-go-apimachinery-network-util > 3e2a3cd Merge pull request # 136582 from yongruilin/master_kubeopenapi-format > 2f46192 apimachinery: contextual logging in network util code > d24d126 Bump k8s.io/kube-openapi to latest > 6b25f66 Merge pull request # 136574 from pohly/revert-129344-log-client-go-apimachinery-network-util > 5066725 Revert "apimachinery: contextual logging in network util code" > 7daad70 Merge pull request # 136212 from dims/update-security-deps-jan2026-v2 > ec68f9e Merge pull request # 135164 from helayoty/helayoty/workload-declarative-validation > 0ac1de4 Update security and stability dependencies > a0d8102 Merge pull request # 136259 from BenTheElder/rip-logicalhan > 606adf2 Add comment for the reason behind not checking empty or too-long names > d02adbf emeritus logicalhan, rest in peace > 6d47888 Move path-segment validation to pkg content > 8931c29 Merge pull request # 136162 from dims/update-security-deps-jan2026 > 3713556 Add k8s-path-segment-name format validator > 5891c84 Update security-critical authentication and protobuf dependencies > a1d2ec9 Merge pull request # 129344 from pohly/log-client-go-apimachinery-network-util > f5bd705 Merge pull request # 136117 from lalitc375/dv-strategy > c7d2b46 apimachinery: contextual logging in network util code > b2e788f Merge pull request # 136161 from dims/update-golang-x-deps-jan2026 > 85d39a5 apimachinery/field: Add MarkDeclarativeNative support to Error and ErrorList > c84b399 restmapper + discovery: add context-aware APIs > 58a31eb Update golang.org/x dependencies to latest versions > dd7de37 Merge pull request # 136108 from pohly/ginkgo-gomega-update > f08a5cd dependencies: ginkgo v2.27.4, gomega v1.39.0 > 2936fea Merge pull request # 136034 from lalitc375/dv-hpa-min-max > ced3c83 Address feedbacks > 8619d5d Add ignoreConversionErrors option to validation testing > 1025727 Merge pull request # 135391 from jpbetz/smd-6_3_1 > 2a337e1 Merge pull request # 135867 from dims/pin-versions-of-dbus-and-otelgrpc-to-avoid-breakage > 55e3392 hack/pin-dependency.sh sigs.k8s.io/structured-merge-diff/v6 v6.3.1 > 1630ff6 updated to last known good dependencies for otelgrpc and dbus > 41f756d Merge pull request # 135836 from pohly/ginkgo-gomega-update > f4aa7a7 Merge pull request # 135845 from skitt/drop-armon-circbuf > c4b2f2f dependencies: ginkgo v2.27.3 + gomega v1.38.3 > 1e1c913 Merge pull request # 135229 from lalitc375/origin-union > 0b8cf89 Replace armon/circbuf with k8s.io/utils/buffer > 718fd40 Add origins for the union validtions errors > 84d740c Merge pull request # 135531 from pohly/golangci-lint-bump > 680121b build: remove deprecated '// +build' tag > 94056ec Merge pull request # 135340 from ricardomaraschini/bump-cbor-limits > a9de6f8 Merge pull request # 135219 from skitt/valswap > 2b65fc8 cbor: bump limits > cec5dd0 Merge pull request # 133828 from dims/drop-unnecessary-usegocmp-build-tag > 42d68e5 Enforce Golang a, b = b, a swaps > 56aa7d5 Merge pull request # 135536 from dims/bump-x/crypto-to-v0.45.0 > bfac0d8 Drop unnecessary usegocmp build tag bumping golang.org/x/time 2c6c5a2...2b4e439: > 2b4e439 rate: use time.Time.Equal instead of == > c0b0320 all: upgrade go directive to at least 1.24.0 [generated] > 1616a7f rate: skip time.Now call in Sometimes.Do unless necessary > 0c50ed8 all: upgrade go directive to at least 1.23.0 [generated] > 66520f6 rate: simplify function advance only returns new Tokens to caller Signed-off-by: Knative Automation --- go.mod | 42 +++---- go.sum | 89 +++++++------- .../versioned/fake/clientset_generated.go | 2 +- .../informers/externalversions/factory.go | 110 ++++++++++++++---- .../internalinterfaces/factory_interfaces.go | 21 +++- .../samples/v1alpha1/addressableservice.go | 48 +++++--- .../samples/v1alpha1/simpledeployment.go | 48 +++++--- 7 files changed, 234 insertions(+), 126 deletions(-) diff --git a/go.mod b/go.mod index c2afd0ddf..36ac111b2 100644 --- a/go.mod +++ b/go.mod @@ -1,16 +1,16 @@ module knative.dev/sample-controller -go 1.25.0 +go 1.26.0 require ( go.uber.org/zap v1.28.0 - k8s.io/api v0.35.8 - k8s.io/apimachinery v0.35.8 - k8s.io/client-go v0.35.8 - k8s.io/code-generator v0.35.8 - k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912 + k8s.io/api v0.36.5 + k8s.io/apimachinery v0.36.5 + k8s.io/client-go v0.36.5 + k8s.io/code-generator v0.36.5 + k8s.io/kube-openapi v0.0.0-20260317180543-43fb72c5454a knative.dev/hack v0.0.0-20260428014158-b2a37f1b6e7b - knative.dev/pkg v0.0.0-20260918182429-5dc1978f0042 + knative.dev/pkg v0.0.0-20261009131428-795a0f63c441 ) require ( @@ -20,7 +20,7 @@ require ( github.com/cenkalti/backoff/v5 v5.0.3 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect - github.com/emicklei/go-restful/v3 v3.12.2 // indirect + github.com/emicklei/go-restful/v3 v3.13.0 // indirect github.com/evanphx/json-patch/v5 v5.9.11 // indirect github.com/felixge/httpsnoop v1.1.0 // indirect github.com/fxamacker/cbor/v2 v2.9.0 // indirect @@ -43,7 +43,7 @@ require ( github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_golang v1.24.1 // indirect github.com/prometheus/client_model v0.6.2 // indirect github.com/prometheus/common v0.70.1 // indirect @@ -71,15 +71,15 @@ require ( go.uber.org/multierr v1.11.0 // indirect go.yaml.in/yaml/v2 v2.4.4 // indirect go.yaml.in/yaml/v3 v3.0.5 // indirect - golang.org/x/mod v0.39.0 // indirect - golang.org/x/net v0.58.0 // indirect + golang.org/x/mod v0.41.0 // indirect + golang.org/x/net v0.59.0 // indirect golang.org/x/oauth2 v0.36.0 // indirect - golang.org/x/sync v0.22.0 // indirect - golang.org/x/sys v0.47.0 // indirect - golang.org/x/term v0.45.0 // indirect - golang.org/x/text v0.41.0 // indirect - golang.org/x/time v0.10.0 // indirect - golang.org/x/tools v0.49.0 // indirect + golang.org/x/sync v0.23.0 // indirect + golang.org/x/sys v0.48.0 // indirect + golang.org/x/term v0.46.0 // indirect + golang.org/x/text v0.42.0 // indirect + golang.org/x/time v0.14.0 // indirect + golang.org/x/tools v0.51.0 // indirect gomodules.xyz/jsonpatch/v2 v2.5.0 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20260803160001-6ac0973c030d // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20260803160001-6ac0973c030d // indirect @@ -88,12 +88,12 @@ require ( gopkg.in/evanphx/json-patch.v4 v4.13.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/apiextensions-apiserver v0.35.8 // indirect + k8s.io/apiextensions-apiserver v0.36.5 // indirect k8s.io/gengo/v2 v2.0.0-20250922181213-ec3ebc5fd46b // indirect - k8s.io/klog/v2 v2.130.1 // indirect - k8s.io/utils v0.0.0-20251002143259-bc988d571ff4 // indirect + k8s.io/klog/v2 v2.140.0 // indirect + k8s.io/utils v0.0.0-20260210185600-b8788abfbbc2 // indirect sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect sigs.k8s.io/randfill v1.0.0 // indirect - sigs.k8s.io/structured-merge-diff/v6 v6.3.0 // indirect + sigs.k8s.io/structured-merge-diff/v6 v6.3.3 // indirect sigs.k8s.io/yaml v1.6.0 // indirect ) diff --git a/go.sum b/go.sum index 200101b73..f1a1e3d9e 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,3 @@ -github.com/Masterminds/semver/v3 v3.4.0 h1:Zog+i5UMtVoCU8oKka5P7i9q9HgrJeGzI9SA1Xbatp0= -github.com/Masterminds/semver/v3 v3.4.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= @@ -14,8 +12,8 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/emicklei/go-restful/v3 v3.12.2 h1:DhwDP0vY3k8ZzE0RunuJy8GhNpPL6zqLkDf9B/a0/xU= -github.com/emicklei/go-restful/v3 v3.12.2/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/emicklei/go-restful/v3 v3.13.0 h1:C4Bl2xDndpU6nJ4bc1jXd+uTmYPVUwkD6bFY/oTyCes= +github.com/emicklei/go-restful/v3 v3.13.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/evanphx/json-patch v5.9.0+incompatible h1:fBXyNpNMuTTDdquAq/uisOr2lShz4oaXpDTX2bLe7ls= github.com/evanphx/json-patch v5.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch/v5 v5.9.11 h1:/8HVnzMq13/3x9TPvjG08wUGqBTmZBsCWzjTM0wiaDU= @@ -37,8 +35,6 @@ github.com/go-openapi/jsonreference v0.21.0 h1:Rs+Y7hSXT83Jacb7kFyjn4ijOuVGSvOdF github.com/go-openapi/jsonreference v0.21.0/go.mod h1:LmZmgsrTkVg9LG4EaHeY8cBDslNPMo06cago5JNLkm4= github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= -github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= -github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= github.com/gobuffalo/flect v1.0.3 h1:xeWBM2nui+qnVvNM4S3foBhCAL2XgPU+a7FdpelbTq4= github.com/gobuffalo/flect v1.0.3/go.mod h1:A5msMlrHtLqh9umBSnvabjsMrCcCpAyzglnDvkbYKHs= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= @@ -48,8 +44,6 @@ github.com/google/gnostic-models v0.7.0/go.mod h1:whL5G0m6dmc5cPxKc5bdKdEN3UjI7O github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/pprof v0.0.0-20250403155104-27863c87afa6 h1:BHT72Gu3keYf3ZEu2J0b1vyeLSOYI8bm5wbJM/8yDe8= -github.com/google/pprof v0.0.0-20250403155104-27863c87afa6/go.mod h1:boTsfXsheKC2y+lKOCMpSfarhxDeIzfZG1jqGcPl3cA= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/grpc-ecosystem/grpc-gateway/v2 v2.29.0 h1:5VipnvEpbqr2gA2VbM+nYVbkIF28c5ZQfqCBQ5g2xfk= @@ -80,15 +74,12 @@ github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee h1:W5t00kpgFd github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/onsi/ginkgo/v2 v2.27.2 h1:LzwLj0b89qtIy6SSASkzlNvX6WktqurSHwkk2ipF/Ns= -github.com/onsi/ginkgo/v2 v2.27.2/go.mod h1:ArE1D/XhNXBXCBkKOLkbsb2c81dQHCRcF5zwn/ykDRo= -github.com/onsi/gomega v1.38.2 h1:eZCjf2xjZAqe+LeWvKb5weQ+NcPwX84kqJ0cZNxok2A= -github.com/onsi/gomega v1.38.2/go.mod h1:W2MJcYxRGV63b418Ai34Ud0hEdTVXq9NW9+Sx6uXf3k= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g= github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U= github.com/prometheus/client_golang v1.24.1 h1:JnJkREXzWxUdCuPFpIWZiPispT9xVV59uiuyR2bPlnU= @@ -167,24 +158,24 @@ go.yaml.in/yaml/v2 v2.4.4 h1:tuyd0P+2Ont/d6e2rl3be67goVK4R6deVxCUX5vyPaQ= go.yaml.in/yaml/v2 v2.4.4/go.mod h1:gMZqIpDtDqOfM0uNfy0SkpRhvUryYH0Z6wdMYcacYXQ= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -golang.org/x/mod v0.39.0 h1:UF5zwQdCRRUpHfyPwr7d4UrGiVeldIsogtzWVnczL74= -golang.org/x/mod v0.39.0/go.mod h1:bvIbwjQ0HUFFf5AKukeeYQG4ZBUG9yxQbR9aEweIwYY= -golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= -golang.org/x/net v0.58.0/go.mod h1:YwCddHnFlT7eLQqVprV19OnhLGtc5xOKgE0RyqgfWAU= +golang.org/x/mod v0.41.0 h1:qJmnOUb4YB+FsEuM3HcWucdZASCPGhsX6uljO6pog0c= +golang.org/x/mod v0.41.0/go.mod h1:Ek9pY8RKWXwsWvd3rQiHYtMqkjSUV+s1Rj7j4H5Ur6o= +golang.org/x/net v0.59.0 h1:5zfYln+w5XCxwrnMMJPufRgNoXEaGxl0wo5GqPXyues= +golang.org/x/net v0.59.0/go.mod h1:2DA/G1UfVbCpQPeWTmMPGY7Cs2PkBkwu743bVX5PIVg= golang.org/x/oauth2 v0.36.0 h1:peZ/1z27fi9hUOFCAZaHyrpWG5lwe0RJEEEeH0ThlIs= golang.org/x/oauth2 v0.36.0/go.mod h1:YDBUJMTkDnJS+A4BP4eZBjCqtokkg1hODuPjwiGPO7Q= -golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= -golang.org/x/sync v0.22.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0= -golang.org/x/sys v0.47.0 h1:o7XGOvZQCADBQQ4Y7VNq2dRWQR7JmOUW8Kxx4ZsNgWs= -golang.org/x/sys v0.47.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= -golang.org/x/term v0.45.0 h1:NwWyBmoJCbfTHpxrWoZ9C6/VxOf7ic219I8xZZFdrf0= -golang.org/x/term v0.45.0/go.mod h1:9aqxs0blBcrm/n0L9QW0aRVD+ktan8ssZromtqJC43w= -golang.org/x/text v0.41.0 h1:vz/seA0lnX87Othu2f/0L24RcgrXD9/YFTSuGjj3rH8= -golang.org/x/text v0.41.0/go.mod h1:jvf1O8ajNzZqhSrQBPbutR/EB83Cc0CFrezNQIwbb5M= -golang.org/x/time v0.10.0 h1:3usCWA8tQn0L8+hFJQNgzpWbd89begxN66o1Ojdn5L4= -golang.org/x/time v0.10.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= -golang.org/x/tools v0.49.0 h1:3NI7VXzL9+1WZD52Dx2ttoPwD5DWrFGpl9mFZDlmisI= -golang.org/x/tools v0.49.0/go.mod h1:SJNXV9DBKT0UbdttsQjbfJlAE/q+y36++zo3uL3N0Oo= +golang.org/x/sync v0.23.0 h1:KameEIfc1IkluZyXWLn39Wd4tURc6GbCiISGiZm2bQk= +golang.org/x/sync v0.23.0/go.mod h1:sUUOizhqBxiL6pEWpqNLUiaJn1ShEbZ6BBqskPbjZm0= +golang.org/x/sys v0.48.0 h1:bbX/i/6MgT9BVLM9RT1thmxL04yeTAhbEz4SyadbXoo= +golang.org/x/sys v0.48.0/go.mod h1:hNLxWAXmnKAxqDtdwIYC4bM9oQPEecfsnNMuSxOs3og= +golang.org/x/term v0.46.0 h1:3+OXuTbaKDgwk8jTi3aSLHRlmWqHEUDUtxnbFigO4YE= +golang.org/x/term v0.46.0/go.mod h1:+K02xbkittuwc0Am4abfA3Fc+XRGXkvBXNO88NCXPoc= +golang.org/x/text v0.42.0 h1:JbOZXgfeCPU9gacVtYliJqOhD+zhrEqK4LfdpmlUZqI= +golang.org/x/text v0.42.0/go.mod h1:ojzP1Z+2QtioaF8DTtO8K5q7JWVVYwZKenzujK0Zd0E= +golang.org/x/time v0.14.0 h1:MRx4UaLrDotUKUdCIqzPC48t1Y9hANFKIRpNx+Te8PI= +golang.org/x/time v0.14.0/go.mod h1:eL/Oa2bBBK0TkX57Fyni+NgnyQQN4LitPmob2Hjnqw4= +golang.org/x/tools v0.51.0 h1:k4Xc/1Om9jwkBJBo4NVLMSARBoWtK10mx+W5BnXCeAI= +golang.org/x/tools v0.51.0/go.mod h1:9eEncMayCV6zRMGhR5eZEC2iBx98qWcF1HZ9Z7wJOoA= golang.org/x/tools/go/expect v0.1.1-deprecated h1:jpBZDwmgPhXsKZC6WhL20P4b/wmnpsEAGHaNy0n/rJM= golang.org/x/tools/go/expect v0.1.1-deprecated/go.mod h1:eihoPOH+FgIqa3FpoTwguz/bVUSGBlGQU67vpBeOrBY= golang.org/x/tools/go/packages/packagestest v0.1.1-deprecated h1:1h2MnaIAIXISqTFKdENegdpAgUXz6NrPEsbIeWaBRvM= @@ -211,33 +202,33 @@ gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -k8s.io/api v0.35.8 h1:hxpmPYdneQPKNh0cZyB09Hwd3vgXzdcJs5R3toDXsvU= -k8s.io/api v0.35.8/go.mod h1:I5gVNknFd4hfVVcMCixrenD7V38JUY78q3jtpGyC19c= -k8s.io/apiextensions-apiserver v0.35.8 h1:2lvyZ28M01/1uOPftaPXIbsOaCslzKHTEcdCjCI0VRE= -k8s.io/apiextensions-apiserver v0.35.8/go.mod h1:/ZbM1upeajFY5yHqGMKEzWTLb5Tx3kU2SkxTCtqB4Uw= -k8s.io/apimachinery v0.35.8 h1:piOyQQgse1sGztJVfy3B8f11YpT+KwK5KkD5Jie1EK0= -k8s.io/apimachinery v0.35.8/go.mod h1:z9Vq5oR1X38pkhh0wV531iKSeqmOVjqgHdYMjvzq2+o= -k8s.io/client-go v0.35.8 h1:tIW2sirCQMiGoCSvtOYqS059CDQ5n1nrDQa+PVt4nqY= -k8s.io/client-go v0.35.8/go.mod h1:fT8dATMU8FHMq4hlOudbsxihQ1LIQfDaLNDXBnIk6OQ= -k8s.io/code-generator v0.35.8 h1:8XUinCAnL4SldKfq4K287WqqS6in6mNwkcspTU/BNpk= -k8s.io/code-generator v0.35.8/go.mod h1:MDciHRXPlbdJb0t1RASFWCyg8o2dEHfKILGZ4VWjBDQ= +k8s.io/api v0.36.5 h1:vtL/ByHmw7suLt+SGVMPZnuj8QdfZ0kN1vvMvHRCY9c= +k8s.io/api v0.36.5/go.mod h1:erfc3/3d6z30KO2Kf+BmOewE6CajqZTz1Hcd+FQqg60= +k8s.io/apiextensions-apiserver v0.36.5 h1:pZcOcB7ur1ou+VeQSGChj3cvhrL2nA3gERMUaCHVJNQ= +k8s.io/apiextensions-apiserver v0.36.5/go.mod h1:l1uFNtfzcEBqgrYEiOIYwu+6R1RCkuZIiEvfPE6RpNs= +k8s.io/apimachinery v0.36.5 h1:X5Xbg6G4om0ma6LOcGbmUmo+B5Nq7mmIpAWhk+tgCh8= +k8s.io/apimachinery v0.36.5/go.mod h1:oPTSicSaDHDdoGwOs5DFPo6YS2wdTnzFHIYMEglfJ7I= +k8s.io/client-go v0.36.5 h1:D79FgevPon0NIBcjUHMy+QnALtihLGTBqOvIGCgoZmw= +k8s.io/client-go v0.36.5/go.mod h1:JAGQ3N4Z8E3H0W0Nm6NBg1EvB9+/wtEoBPDe8XGkHsI= +k8s.io/code-generator v0.36.5 h1:fpPI4R6mXMx9kWZnSq7MAlaeKS+T4dga9NYSqVJi3Pg= +k8s.io/code-generator v0.36.5/go.mod h1:hcPwUWz7zAAEfME+HgcvQePfBZmY/B/NMQUV7Rw3yIk= k8s.io/gengo/v2 v2.0.0-20250922181213-ec3ebc5fd46b h1:gMplByicHV/TJBizHd9aVEsTYoJBnnUAT5MHlTkbjhQ= k8s.io/gengo/v2 v2.0.0-20250922181213-ec3ebc5fd46b/go.mod h1:CgujABENc3KuTrcsdpGmrrASjtQsWCT7R99mEV4U/fM= -k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= -k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= -k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912 h1:Y3gxNAuB0OBLImH611+UDZcmKS3g6CthxToOb37KgwE= -k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912/go.mod h1:kdmbQkyfwUagLfXIad1y2TdrjPFWp2Q89B3qkRwf/pQ= -k8s.io/utils v0.0.0-20251002143259-bc988d571ff4 h1:SjGebBtkBqHFOli+05xYbK8YF1Dzkbzn+gDM4X9T4Ck= -k8s.io/utils v0.0.0-20251002143259-bc988d571ff4/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/klog/v2 v2.140.0 h1:Tf+J3AH7xnUzZyVVXhTgGhEKnFqye14aadWv7bzXdzc= +k8s.io/klog/v2 v2.140.0/go.mod h1:o+/RWfJ6PwpnFn7OyAG3QnO47BFsymfEfrz6XyYSSp0= +k8s.io/kube-openapi v0.0.0-20260317180543-43fb72c5454a h1:xCeOEAOoGYl2jnJoHkC3hkbPJgdATINPMAxaynU2Ovg= +k8s.io/kube-openapi v0.0.0-20260317180543-43fb72c5454a/go.mod h1:uGBT7iTA6c6MvqUvSXIaYZo9ukscABYi2btjhvgKGZ0= +k8s.io/utils v0.0.0-20260210185600-b8788abfbbc2 h1:AZYQSJemyQB5eRxqcPky+/7EdBj0xi3g0ZcxxJ7vbWU= +k8s.io/utils v0.0.0-20260210185600-b8788abfbbc2/go.mod h1:xDxuJ0whA3d0I4mf/C4ppKHxXynQ+fxnkmQH0vTHnuk= knative.dev/hack v0.0.0-20260428014158-b2a37f1b6e7b h1:MvbV2F2BdI8qKrYYUhDwbUZbX0BAYRSIpXM2TOtTvs0= knative.dev/hack v0.0.0-20260428014158-b2a37f1b6e7b/go.mod h1:L5RzHgbvam0u8QFHfzCX6MKxu/a/gIGEdaRBqNiVbl0= -knative.dev/pkg v0.0.0-20260918182429-5dc1978f0042 h1:hZ4eQYaloFYHe70C6EAjGb3N9mKLPNOwhEdQmNs6v2M= -knative.dev/pkg v0.0.0-20260918182429-5dc1978f0042/go.mod h1:zhIH5iW5e2l3rajXrpi3u31lEUTncLniK5BhtSe4DpI= +knative.dev/pkg v0.0.0-20261009131428-795a0f63c441 h1:sczCiV5MQN2H+9LMEfS8Uu/MlYD1SoAuyTrOb5G9eR8= +knative.dev/pkg v0.0.0-20261009131428-795a0f63c441/go.mod h1:Y0IP1sZCnEcIrKXcM9tSqO0a5326ISSngHWc/iCbzlo= sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 h1:IpInykpT6ceI+QxKBbEflcR5EXP7sU1kvOlxwZh5txg= sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg= sigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU= sigs.k8s.io/randfill v1.0.0/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY= -sigs.k8s.io/structured-merge-diff/v6 v6.3.0 h1:jTijUJbW353oVOd9oTlifJqOGEkUw2jB/fXCbTiQEco= -sigs.k8s.io/structured-merge-diff/v6 v6.3.0/go.mod h1:M3W8sfWvn2HhQDIbGWj3S099YozAsymCo/wrT5ohRUE= +sigs.k8s.io/structured-merge-diff/v6 v6.3.3 h1:u08YRbVUi59ri4YD6cg0UqNM4Dimn0sIl+wldcx5PYw= +sigs.k8s.io/structured-merge-diff/v6 v6.3.3/go.mod h1:M3W8sfWvn2HhQDIbGWj3S099YozAsymCo/wrT5ohRUE= sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs= sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4= diff --git a/pkg/client/clientset/versioned/fake/clientset_generated.go b/pkg/client/clientset/versioned/fake/clientset_generated.go index 924006a43..78a4d0f17 100644 --- a/pkg/client/clientset/versioned/fake/clientset_generated.go +++ b/pkg/client/clientset/versioned/fake/clientset_generated.go @@ -79,7 +79,7 @@ func (c *Clientset) Tracker() testing.ObjectTracker { return c.tracker } -// IsWatchListSemanticsSupported informs the reflector that this client +// IsWatchListSemanticsUnSupported informs the reflector that this client // doesn't support WatchList semantics. // // This is a synthetic method whose sole purpose is to satisfy the optional diff --git a/pkg/client/informers/externalversions/factory.go b/pkg/client/informers/externalversions/factory.go index 8651f4ca4..a65c3b141 100644 --- a/pkg/client/informers/externalversions/factory.go +++ b/pkg/client/informers/externalversions/factory.go @@ -19,6 +19,7 @@ limitations under the License. package externalversions import ( + context "context" reflect "reflect" sync "sync" time "time" @@ -26,6 +27,7 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" + wait "k8s.io/apimachinery/pkg/util/wait" cache "k8s.io/client-go/tools/cache" versioned "knative.dev/sample-controller/pkg/client/clientset/versioned" internalinterfaces "knative.dev/sample-controller/pkg/client/informers/externalversions/internalinterfaces" @@ -43,6 +45,7 @@ type sharedInformerFactory struct { defaultResync time.Duration customResync map[reflect.Type]time.Duration transform cache.TransformFunc + informerName *cache.InformerName informers map[reflect.Type]cache.SharedIndexInformer // startedInformers is used for tracking which informers have been started. @@ -89,6 +92,21 @@ func WithTransform(transform cache.TransformFunc) SharedInformerOption { } } +// WithInformerName sets the InformerName for informer identity used in metrics. +// The InformerName must be created via cache.NewInformerName() at startup, +// which validates global uniqueness. Each informer type will register its +// GVR under this name. +func WithInformerName(informerName *cache.InformerName) SharedInformerOption { + return func(factory *sharedInformerFactory) *sharedInformerFactory { + factory.informerName = informerName + return factory + } +} + +func (f *sharedInformerFactory) InformerName() *cache.InformerName { + return f.informerName +} + // NewSharedInformerFactory constructs a new instance of sharedInformerFactory for all namespaces. func NewSharedInformerFactory(client versioned.Interface, defaultResync time.Duration) SharedInformerFactory { return NewSharedInformerFactoryWithOptions(client, defaultResync) @@ -123,6 +141,10 @@ func NewSharedInformerFactoryWithOptions(client versioned.Interface, defaultResy } func (f *sharedInformerFactory) Start(stopCh <-chan struct{}) { + f.StartWithContext(wait.ContextForChannel(stopCh)) +} + +func (f *sharedInformerFactory) StartWithContext(ctx context.Context) { f.lock.Lock() defer f.lock.Unlock() @@ -132,15 +154,9 @@ func (f *sharedInformerFactory) Start(stopCh <-chan struct{}) { for informerType, informer := range f.informers { if !f.startedInformers[informerType] { - f.wg.Add(1) - // We need a new variable in each loop iteration, - // otherwise the goroutine would use the loop variable - // and that keeps changing. - informer := informer - go func() { - defer f.wg.Done() - informer.Run(stopCh) - }() + f.wg.Go(func() { + informer.RunWithContext(ctx) + }) f.startedInformers[informerType] = true } } @@ -153,9 +169,15 @@ func (f *sharedInformerFactory) Shutdown() { // Will return immediately if there is nothing to wait for. f.wg.Wait() + f.informerName.Release() } func (f *sharedInformerFactory) WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool { + result := f.WaitForCacheSyncWithContext(wait.ContextForChannel(stopCh)) + return result.Synced +} + +func (f *sharedInformerFactory) WaitForCacheSyncWithContext(ctx context.Context) cache.SyncResult { informers := func() map[reflect.Type]cache.SharedIndexInformer { f.lock.Lock() defer f.lock.Unlock() @@ -169,10 +191,31 @@ func (f *sharedInformerFactory) WaitForCacheSync(stopCh <-chan struct{}) map[ref return informers }() - res := map[reflect.Type]bool{} + // Wait for informers to sync, without polling. + cacheSyncs := make([]cache.DoneChecker, 0, len(informers)) + for _, informer := range informers { + cacheSyncs = append(cacheSyncs, informer.HasSyncedChecker()) + } + cache.WaitFor(ctx, "" /* no logging */, cacheSyncs...) + + res := cache.SyncResult{ + Synced: make(map[reflect.Type]bool, len(informers)), + } + failed := false for informType, informer := range informers { - res[informType] = cache.WaitForCacheSync(stopCh, informer.HasSynced) + hasSynced := informer.HasSynced() + if !hasSynced { + failed = true + } + res.Synced[informType] = hasSynced } + if failed { + // context.Cause is more informative than ctx.Err(). + // This must be non-nil, otherwise WaitFor wouldn't have stopped + // prematurely. + res.Err = context.Cause(ctx) + } + return res } @@ -194,7 +237,9 @@ func (f *sharedInformerFactory) InformerFor(obj runtime.Object, newFunc internal } informer = newFunc(f.client, resyncPeriod) - informer.SetTransform(f.transform) + if f.transform != nil { + informer.SetTransform(f.transform) + } f.informers[informerType] = informer return informer @@ -211,27 +256,46 @@ func (f *sharedInformerFactory) InformerFor(obj runtime.Object, newFunc internal // defer factory.WaitForStop() // Returns immediately if nothing was started. // genericInformer := factory.ForResource(resource) // typedInformer := factory.SomeAPIGroup().V1().SomeType() -// factory.Start(ctx.Done()) // Start processing these informers. -// synced := factory.WaitForCacheSync(ctx.Done()) -// for v, ok := range synced { -// if !ok { -// fmt.Fprintf(os.Stderr, "caches failed to sync: %v", v) -// return -// } +// handle, err := typeInformer.Informer().AddEventHandler(...) +// if err != nil { +// return fmt.Errorf("register event handler: %v", err) +// } +// defer typeInformer.Informer().RemoveEventHandler(handle) // Avoids leaking goroutines. +// factory.StartWithContext(ctx) // Start processing these informers. +// synced := factory.WaitForCacheSyncWithContext(ctx) +// if err := synced.AsError(); err != nil { +// return err +// } +// for v := range synced { +// // Only if desired log some information similar to this. +// fmt.Fprintf(os.Stdout, "cache synced: %s", v) +// } +// +// // Also make sure that all of the initial cache events have been delivered. +// if !WaitFor(ctx, "event handler sync", handle.HasSyncedChecker()) { +// // Must have failed because of context. +// return fmt.Errorf("sync event handler: %w", context.Cause(ctx)) // } // // // Creating informers can also be created after Start, but then // // Start must be called again: // anotherGenericInformer := factory.ForResource(resource) -// factory.Start(ctx.Done()) +// factory.StartWithContext(ctx) type SharedInformerFactory interface { internalinterfaces.SharedInformerFactory // Start initializes all requested informers. They are handled in goroutines // which run until the stop channel gets closed. // Warning: Start does not block. When run in a go-routine, it will race with a later WaitForCacheSync. + // + // Contextual logging: StartWithContext should be used instead of Start in code which supports contextual logging. Start(stopCh <-chan struct{}) + // StartWithContext initializes all requested informers. They are handled in goroutines + // which run until the context gets canceled. + // Warning: StartWithContext does not block. When run in a go-routine, it will race with a later WaitForCacheSync. + StartWithContext(ctx context.Context) + // Shutdown marks a factory as shutting down. At that point no new // informers can be started anymore and Start will return without // doing anything. @@ -246,8 +310,14 @@ type SharedInformerFactory interface { // WaitForCacheSync blocks until all started informers' caches were synced // or the stop channel gets closed. + // + // Contextual logging: WaitForCacheSync should be used instead of WaitForCacheSync in code which supports contextual logging. It also returns a more useful result. WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool + // WaitForCacheSyncWithContext blocks until all started informers' caches were synced + // or the context gets canceled. + WaitForCacheSyncWithContext(ctx context.Context) cache.SyncResult + // ForResource gives generic access to a shared informer of the matching type. ForResource(resource schema.GroupVersionResource) (GenericInformer, error) diff --git a/pkg/client/informers/externalversions/internalinterfaces/factory_interfaces.go b/pkg/client/informers/externalversions/internalinterfaces/factory_interfaces.go index c9d4e3659..6fac78118 100644 --- a/pkg/client/informers/externalversions/internalinterfaces/factory_interfaces.go +++ b/pkg/client/informers/externalversions/internalinterfaces/factory_interfaces.go @@ -1,5 +1,5 @@ /* -Copyright 2020 The Knative Authors +Copyright 2026 The Knative Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -34,7 +34,26 @@ type NewInformerFunc func(versioned.Interface, time.Duration) cache.SharedIndexI type SharedInformerFactory interface { Start(stopCh <-chan struct{}) InformerFor(obj runtime.Object, newFunc NewInformerFunc) cache.SharedIndexInformer + InformerName() *cache.InformerName } // TweakListOptionsFunc is a function that transforms a v1.ListOptions. type TweakListOptionsFunc func(*v1.ListOptions) + +// InformerOptions holds the options for creating an informer. +type InformerOptions struct { + // ResyncPeriod is the resync period for this informer. + // If not set, defaults to 0 (no resync). + ResyncPeriod time.Duration + + // Indexers are the indexers for this informer. + Indexers cache.Indexers + + // InformerName is used to uniquely identify this informer for metrics. + // If not set, metrics will not be published for this informer. + // Use cache.NewInformerName() to create an InformerName at startup. + InformerName *cache.InformerName + + // TweakListOptions is an optional function to modify the list options. + TweakListOptions TweakListOptionsFunc +} diff --git a/pkg/client/informers/externalversions/samples/v1alpha1/addressableservice.go b/pkg/client/informers/externalversions/samples/v1alpha1/addressableservice.go index c4979a6a4..c449d76bd 100644 --- a/pkg/client/informers/externalversions/samples/v1alpha1/addressableservice.go +++ b/pkg/client/informers/externalversions/samples/v1alpha1/addressableservice.go @@ -24,6 +24,7 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" + schema "k8s.io/apimachinery/pkg/runtime/schema" watch "k8s.io/apimachinery/pkg/watch" cache "k8s.io/client-go/tools/cache" apissamplesv1alpha1 "knative.dev/sample-controller/pkg/apis/samples/v1alpha1" @@ -49,48 +50,61 @@ type addressableServiceInformer struct { // Always prefer using an informer factory to get a shared informer instead of getting an independent // one. This reduces memory footprint and number of connections to the server. func NewAddressableServiceInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredAddressableServiceInformer(client, namespace, resyncPeriod, indexers, nil) + return NewAddressableServiceInformerWithOptions(client, namespace, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: indexers}) } // NewFilteredAddressableServiceInformer constructs a new informer for AddressableService type. // Always prefer using an informer factory to get a shared informer instead of getting an independent // one. This reduces memory footprint and number of connections to the server. func NewFilteredAddressableServiceInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( + return NewAddressableServiceInformerWithOptions(client, namespace, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: indexers, TweakListOptions: tweakListOptions}) +} + +// NewAddressableServiceInformerWithOptions constructs a new informer for AddressableService type with additional options. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewAddressableServiceInformerWithOptions(client versioned.Interface, namespace string, options internalinterfaces.InformerOptions) cache.SharedIndexInformer { + gvr := schema.GroupVersionResource{Group: "samples.knative.dev", Version: "v1alpha1", Resource: "addressableservices"} + identifier := options.InformerName.WithResource(gvr) + tweakListOptions := options.TweakListOptions + return cache.NewSharedIndexInformerWithOptions( cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + ListFunc: func(opts v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { - tweakListOptions(&options) + tweakListOptions(&opts) } - return client.SamplesV1alpha1().AddressableServices(namespace).List(context.Background(), options) + return client.SamplesV1alpha1().AddressableServices(namespace).List(context.Background(), opts) }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { - tweakListOptions(&options) + tweakListOptions(&opts) } - return client.SamplesV1alpha1().AddressableServices(namespace).Watch(context.Background(), options) + return client.SamplesV1alpha1().AddressableServices(namespace).Watch(context.Background(), opts) }, - ListWithContextFunc: func(ctx context.Context, options v1.ListOptions) (runtime.Object, error) { + ListWithContextFunc: func(ctx context.Context, opts v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { - tweakListOptions(&options) + tweakListOptions(&opts) } - return client.SamplesV1alpha1().AddressableServices(namespace).List(ctx, options) + return client.SamplesV1alpha1().AddressableServices(namespace).List(ctx, opts) }, - WatchFuncWithContext: func(ctx context.Context, options v1.ListOptions) (watch.Interface, error) { + WatchFuncWithContext: func(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { - tweakListOptions(&options) + tweakListOptions(&opts) } - return client.SamplesV1alpha1().AddressableServices(namespace).Watch(ctx, options) + return client.SamplesV1alpha1().AddressableServices(namespace).Watch(ctx, opts) }, }, client), &apissamplesv1alpha1.AddressableService{}, - resyncPeriod, - indexers, + cache.SharedIndexInformerOptions{ + ResyncPeriod: options.ResyncPeriod, + Indexers: options.Indexers, + Identifier: identifier, + }, ) } func (f *addressableServiceInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredAddressableServiceInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) + return NewAddressableServiceInformerWithOptions(client, f.namespace, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, InformerName: f.factory.InformerName(), TweakListOptions: f.tweakListOptions}) } func (f *addressableServiceInformer) Informer() cache.SharedIndexInformer { diff --git a/pkg/client/informers/externalversions/samples/v1alpha1/simpledeployment.go b/pkg/client/informers/externalversions/samples/v1alpha1/simpledeployment.go index c1ceb82cf..0de7df978 100644 --- a/pkg/client/informers/externalversions/samples/v1alpha1/simpledeployment.go +++ b/pkg/client/informers/externalversions/samples/v1alpha1/simpledeployment.go @@ -24,6 +24,7 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" + schema "k8s.io/apimachinery/pkg/runtime/schema" watch "k8s.io/apimachinery/pkg/watch" cache "k8s.io/client-go/tools/cache" apissamplesv1alpha1 "knative.dev/sample-controller/pkg/apis/samples/v1alpha1" @@ -49,48 +50,61 @@ type simpleDeploymentInformer struct { // Always prefer using an informer factory to get a shared informer instead of getting an independent // one. This reduces memory footprint and number of connections to the server. func NewSimpleDeploymentInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredSimpleDeploymentInformer(client, namespace, resyncPeriod, indexers, nil) + return NewSimpleDeploymentInformerWithOptions(client, namespace, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: indexers}) } // NewFilteredSimpleDeploymentInformer constructs a new informer for SimpleDeployment type. // Always prefer using an informer factory to get a shared informer instead of getting an independent // one. This reduces memory footprint and number of connections to the server. func NewFilteredSimpleDeploymentInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( + return NewSimpleDeploymentInformerWithOptions(client, namespace, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: indexers, TweakListOptions: tweakListOptions}) +} + +// NewSimpleDeploymentInformerWithOptions constructs a new informer for SimpleDeployment type with additional options. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewSimpleDeploymentInformerWithOptions(client versioned.Interface, namespace string, options internalinterfaces.InformerOptions) cache.SharedIndexInformer { + gvr := schema.GroupVersionResource{Group: "samples.knative.dev", Version: "v1alpha1", Resource: "simpledeployments"} + identifier := options.InformerName.WithResource(gvr) + tweakListOptions := options.TweakListOptions + return cache.NewSharedIndexInformerWithOptions( cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + ListFunc: func(opts v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { - tweakListOptions(&options) + tweakListOptions(&opts) } - return client.SamplesV1alpha1().SimpleDeployments(namespace).List(context.Background(), options) + return client.SamplesV1alpha1().SimpleDeployments(namespace).List(context.Background(), opts) }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { - tweakListOptions(&options) + tweakListOptions(&opts) } - return client.SamplesV1alpha1().SimpleDeployments(namespace).Watch(context.Background(), options) + return client.SamplesV1alpha1().SimpleDeployments(namespace).Watch(context.Background(), opts) }, - ListWithContextFunc: func(ctx context.Context, options v1.ListOptions) (runtime.Object, error) { + ListWithContextFunc: func(ctx context.Context, opts v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { - tweakListOptions(&options) + tweakListOptions(&opts) } - return client.SamplesV1alpha1().SimpleDeployments(namespace).List(ctx, options) + return client.SamplesV1alpha1().SimpleDeployments(namespace).List(ctx, opts) }, - WatchFuncWithContext: func(ctx context.Context, options v1.ListOptions) (watch.Interface, error) { + WatchFuncWithContext: func(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { - tweakListOptions(&options) + tweakListOptions(&opts) } - return client.SamplesV1alpha1().SimpleDeployments(namespace).Watch(ctx, options) + return client.SamplesV1alpha1().SimpleDeployments(namespace).Watch(ctx, opts) }, }, client), &apissamplesv1alpha1.SimpleDeployment{}, - resyncPeriod, - indexers, + cache.SharedIndexInformerOptions{ + ResyncPeriod: options.ResyncPeriod, + Indexers: options.Indexers, + Identifier: identifier, + }, ) } func (f *simpleDeploymentInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredSimpleDeploymentInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) + return NewSimpleDeploymentInformerWithOptions(client, f.namespace, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, InformerName: f.factory.InformerName(), TweakListOptions: f.tweakListOptions}) } func (f *simpleDeploymentInformer) Informer() cache.SharedIndexInformer {