Skip to content

Commit e62f510

Browse files
committed
chore(deps): move the Kubernetes libraries to v0.37.1
The root module's k8s.io/* move from v0.35 to v0.37.1 and controller-runtime from v0.23 to v0.25.1, its release for Kubernetes 1.37. Two things held them back: the apimachinery fork, which had to be rebased onto every minor, and the watch handler that from k8s.io/apiserver v0.36 panicked on the initial-events-end bookmark the aggregated storages sent to plain watches. Both are gone. The rest of the upgrades are what these releases require: cel-go v0.29.2, the etcd client v3.7.0, kube-openapi, structured-merge-diff and the x/ modules. code-generator moves with the libraries. Regenerating the strategy CRDs that embed core types adds the Kubernetes 1.37 fields and follows one removal: the alpha PodSpec field workloadRef became schedulingGroup upstream. Once the new CRD is applied, the apiserver prunes workloadRef from every stored strategy it serves, and the object's next write erases it from etcd. It only ever took effect behind an alpha feature gate. The gateway README and the tenantgateway CRD tests cite the apiextensions-apiserver list-type ratchet at the pinned version; it is byte-identical in v0.37.1, so only the version they name changes. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <[email protected]>
1 parent ef491f5 commit e62f510

13 files changed

Lines changed: 1508 additions & 484 deletions

File tree

‎go.mod‎

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,20 @@ require (
2525
github.com/vmware-tanzu/velero v1.18.3
2626
go.uber.org/zap v1.28.0
2727
gomodules.xyz/jsonpatch/v2 v2.5.0
28-
k8s.io/api v0.35.0
29-
k8s.io/apiextensions-apiserver v0.35.0
30-
k8s.io/apimachinery v0.35.2
31-
k8s.io/apiserver v0.35.0
32-
k8s.io/client-go v0.35.0
33-
k8s.io/component-base v0.35.0
28+
k8s.io/api v0.37.1
29+
k8s.io/apiextensions-apiserver v0.37.1
30+
k8s.io/apimachinery v0.37.1
31+
k8s.io/apiserver v0.37.1
32+
k8s.io/client-go v0.37.1
33+
k8s.io/component-base v0.37.1
3434
k8s.io/klog/v2 v2.140.0
35-
k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912
35+
k8s.io/kube-openapi v0.0.0-20260721132016-d427ff9ee9ad
3636
k8s.io/utils v0.0.0-20260707023825-cf1189d6abe3
3737
sigs.k8s.io/container-object-storage-interface-api v0.1.0
38-
sigs.k8s.io/controller-runtime v0.23.1
38+
sigs.k8s.io/controller-runtime v0.25.1
3939
sigs.k8s.io/gateway-api v1.4.1
4040
sigs.k8s.io/randfill v1.0.0
41-
sigs.k8s.io/structured-merge-diff/v6 v6.3.2-0.20260122202528-d9cc6641c482
41+
sigs.k8s.io/structured-merge-diff/v6 v6.4.2
4242
sigs.k8s.io/yaml v1.6.0
4343
)
4444

@@ -80,17 +80,15 @@ require (
8080
github.com/go-openapi/swag/yamlutils v0.29.2 // indirect
8181
github.com/go-openapi/testify/enable/yaml/v2 v2.8.0 // indirect
8282
github.com/go-openapi/testify/v2 v2.8.0 // indirect
83-
github.com/gogo/protobuf v1.3.2 // indirect
8483
github.com/golang/protobuf v1.5.4 // indirect
85-
github.com/google/btree v1.1.3 // indirect
8684
github.com/google/cel-go v0.29.2 // indirect
8785
github.com/google/gnostic-models v0.7.1 // indirect
8886
github.com/google/go-cmp v0.7.0 // indirect
8987
github.com/google/pprof v0.0.0-20260906184651-6331bc6350fe // indirect
9088
github.com/google/uuid v1.6.0 // indirect
9189
github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 // indirect
90+
github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.1.0 // indirect
9291
github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.3.4 // indirect
93-
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect
9492
github.com/grpc-ecosystem/grpc-gateway/v2 v2.30.0 // indirect
9593
github.com/inconshreveable/mousetrap v1.1.0 // indirect
9694
github.com/json-iterator/go v1.1.12 // indirect
@@ -100,20 +98,17 @@ require (
10098
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
10199
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect
102100
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
103-
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect
104101
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
105102
github.com/prometheus/client_model v0.6.3 // indirect
106103
github.com/prometheus/common v0.71.0 // indirect
107104
github.com/prometheus/procfs v0.22.0 // indirect
108105
github.com/rogpeppe/go-internal v1.16.0 // indirect
109106
github.com/sirupsen/logrus v1.10.2 // indirect
110-
github.com/stretchr/objx v0.5.3 // indirect
111107
github.com/tidwall/match v1.2.0 // indirect
112108
github.com/x448/float16 v0.8.4 // indirect
113-
go.etcd.io/etcd/api/v3 v3.6.15 // indirect
114-
go.etcd.io/etcd/client/pkg/v3 v3.6.15 // indirect
115-
go.etcd.io/etcd/client/v3 v3.6.15 // indirect
116-
go.etcd.io/etcd/server/v3 v3.6.15 // indirect
109+
go.etcd.io/etcd/api/v3 v3.7.0 // indirect
110+
go.etcd.io/etcd/client/pkg/v3 v3.7.0 // indirect
111+
go.etcd.io/etcd/client/v3 v3.7.0 // indirect
117112
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
118113
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.71.0 // indirect
119114
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.71.0 // indirect
@@ -145,7 +140,8 @@ require (
145140
gopkg.in/evanphx/json-patch.v4 v4.13.0 // indirect
146141
gopkg.in/inf.v0 v0.9.1 // indirect
147142
gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
148-
k8s.io/kms v0.35.0 // indirect
143+
k8s.io/kms v0.37.1 // indirect
144+
k8s.io/streaming v0.37.1 // indirect
149145
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.36.0 // indirect
150146
sigs.k8s.io/json v0.0.0-20260909141634-11ed52e25bc5 // indirect
151147
)

‎go.sum‎

Lines changed: 38 additions & 74 deletions
Large diffs are not rendered by default.

‎hack/update-codegen.sh‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ SCRIPT_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
2424
# for `[email protected]` and expects exactly one match, so keep
2525
# the version literal only in CODEGEN_PKG (not duplicated in any
2626
# comment) — bump both lines together when upgrading.
27-
CODEGEN_VERSION=v0.35.0
28-
CODEGEN_PKG=${CODEGEN_PKG:-~/go/pkg/mod/k8s.io/code-generator@v0.35.0}
27+
CODEGEN_VERSION=v0.37.1
28+
CODEGEN_PKG=${CODEGEN_PKG:-~/go/pkg/mod/k8s.io/code-generator@v0.37.1}
2929

3030
# Pre-fetch the code-generator module if it is not yet in the local
3131
# module cache. We intentionally do not declare k8s.io/code-generator

‎internal/controller/tenantgateway/crdcel_test.go‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ func TestCRDPassesInstallTimeValidation(t *testing.T) {
511511
// list-type semantics only when the stored object passes them, for the
512512
// object as a whole. That is read from
513513
// pkg/registry/customresource/strategy.go in apiextensions-apiserver
514-
// v0.35.0, the version go.mod pins. So a stored duplicate does not block writes, it
514+
// v0.37.1, the version go.mod pins. So a stored duplicate does not block writes, it
515515
// stops every list on the resource from being checked. The duplicate
516516
// row below therefore stays admissible whether or not the field carries
517517
// a marker, which is why the marker's absence is pinned by the schema
@@ -556,7 +556,7 @@ func TestTightenedConstraintsOnExistingObjects(t *testing.T) {
556556
// guard is reproduced here rather than exercised. Dropping it would
557557
// model an apiserver that refuses writes it accepts. Reproduced
558558
// means it does not track upstream, so a bump of
559-
// apiextensions-apiserver past the pinned v0.35.0 is where to
559+
// apiextensions-apiserver past the pinned v0.37.1 is where to
560560
// re-read strategy.go and confirm the shape still holds.
561561
rejectsUpdate := func(newSpec, oldSpec map[string]any) bool {
562562
if errs := apiservervalidation.ValidateCustomResourceUpdate(
@@ -633,9 +633,9 @@ func TestTightenedConstraintsOnExistingObjects(t *testing.T) {
633633
// write. It would not: customresource.ValidateUpdate validates the
634634
// incoming object's list-type semantics only when the stored object
635635
// passes them, so a duplicate already in etcd is ratcheted through.
636-
// Byte-identical across apiextensions-apiserver v0.31.1, the pinned
637-
// v0.35.0 and v0.36.3, so it is settled behaviour rather than a version
638-
// quirk, but it is upstream's to change. The
636+
// That guard is byte-identical across apiextensions-apiserver v0.31.1,
637+
// v0.35.0, v0.36.3 and the pinned v0.37.1, so it is settled behaviour
638+
// rather than a version quirk, but it is upstream's to change. The
639639
// reason is the grain of that ratchet. It is taken over the whole
640640
// object, not per field, so one stored duplicate stops list-type
641641
// validation for every list on the resource, silently and with nothing

‎packages/extra/gateway/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ Before upgrading, check one thing about `api.<apex>` in particular: once the ter
108108

109109
If something does depend on that terminate path, there are three ways forward and they are not equivalent. Moving the consumer to another hostname under the apex costs nothing: a name outside `tlsPassthroughServices` still earns its own terminate listener and ACME certificate, while the passthrough name goes on answering the platform's own `TLSRoute`. Switching `certMode` to `dns01` or `existingSecret` keeps the pre-upgrade shape wholesale, since neither mode renders per-hostname listeners and the wildcard covers passthrough names along with everything else, at the price of DNS-01 credentials or an operator-supplied certificate, and both modes refuse `tlsPassthroughListeners` outright. Keeping the pre-upgrade shape is the caveat, not the benefit: those modes leave the `tls-<svc>` passthrough listeners standing beside the wildcard terminate listener that covers their names, so the undetermined race returns with them. Both port-443 filter chains carry the same SNI again, and on the pinned Cilium nothing on the objects says which one answers, with no `Conflicted` condition to read. Someone picking this path to get termination back gets the pre-upgrade ambiguity back instead. Removing a service from `tlsPassthroughServices` does not bring its terminate listener back, and that is the point worth reading twice: the passthrough listener goes, the platform `TLSRoute` that attached to it by `sectionName: tls-<svc>` has nothing left to attach to, and the hostname is then claimed by a `TLSRoute` alone, which earns no terminate listener either. Nothing serves the name until something else claims it. So this path is a rewrite rather than a rollback, and it is only finished once the component is republished by an `HTTPRoute` on that hostname, which does earn a terminate listener and a certificate. For `api` that is the Kubernetes API endpoint, and passthrough means its clients hold a TLS session with the apiserver itself; terminating in front of it changes what that session authenticates against, so check what your clients present before picking this one.
110110

111-
Schema constraints tightened alongside this field reach objects that already exist, and every one of them is a kind the apiserver ratchets. `apex` is bounded at 253 characters, and `tlsPassthroughServices` at 62 entries each a DNS-1123 subdomain of at most 249 characters; a stored value that violates one still passes any write that leaves it unchanged, and the rule bites only once the value itself changes. `apex` gets no format pattern, deliberately, and that is not a statement that a mixed-case host works. It arrives verbatim from the `namespace.cozystack.io/host` label, which nothing normalizes and which may hold upper case, and the controller then composes listener hostnames from it that Gateway API refuses, so such a tenant's Gateway does not render with or without a pattern here. What a pattern changes is only where that lands: refused at the write it fails this HelmRelease and everything the release owns, admitted it is `Ready=False` on the one Gateway. An apex no listener hostname can sit within is caught only when `tlsPassthroughListeners` is in use, and then by the containment rule rather than by the controller: that CEL rule compares bytes as well, so a mixed-case apex with a lowercase listener hostname is refused at the write, with a message naming the hostname, and the controller's own check, which names the apex, is reached only where the CRD lags the controller. A repeated `tlsPassthroughServices` entry is reported by the controller as `Ready=False` rather than refused at admission, and that is deliberate, though not for the reason symmetry suggests. Ratcheting does reach a list-type error, and at a coarser grain than the rest: the apiserver checks an incoming object's list-type semantics only when the stored object passes them, for the whole object at once (read from `pkg/registry/customresource/strategy.go` in the pinned `k8s.io/apiextensions-apiserver` v0.35.0). So declaring the list a set would not block writes to an object already carrying a duplicate; it would stop every list on that `TenantGateway` from being checked at all, silently, while the duplicate the controller can name goes on being reported by name. The shipped defaults and the chart's own `fail` on an empty host conform to all of it, and for `tlsPassthroughServices` nothing else can reach the field: the only key the tenant writes into this chart's HelmRelease values is `gatewayClassName`, and only when the tenant chose a class, while everything else arrives through `valuesFrom` the `cozystack-values` Secret, and the platform writes no such key into that Secret, so the chart default is the only value that arrives and the bounds guard a value only an edit to this chart can change. An upgrade is a no-op.
111+
Schema constraints tightened alongside this field reach objects that already exist, and every one of them is a kind the apiserver ratchets. `apex` is bounded at 253 characters, and `tlsPassthroughServices` at 62 entries each a DNS-1123 subdomain of at most 249 characters; a stored value that violates one still passes any write that leaves it unchanged, and the rule bites only once the value itself changes. `apex` gets no format pattern, deliberately, and that is not a statement that a mixed-case host works. It arrives verbatim from the `namespace.cozystack.io/host` label, which nothing normalizes and which may hold upper case, and the controller then composes listener hostnames from it that Gateway API refuses, so such a tenant's Gateway does not render with or without a pattern here. What a pattern changes is only where that lands: refused at the write it fails this HelmRelease and everything the release owns, admitted it is `Ready=False` on the one Gateway. An apex no listener hostname can sit within is caught only when `tlsPassthroughListeners` is in use, and then by the containment rule rather than by the controller: that CEL rule compares bytes as well, so a mixed-case apex with a lowercase listener hostname is refused at the write, with a message naming the hostname, and the controller's own check, which names the apex, is reached only where the CRD lags the controller. A repeated `tlsPassthroughServices` entry is reported by the controller as `Ready=False` rather than refused at admission, and that is deliberate, though not for the reason symmetry suggests. Ratcheting does reach a list-type error, and at a coarser grain than the rest: the apiserver checks an incoming object's list-type semantics only when the stored object passes them, for the whole object at once (read from `pkg/registry/customresource/strategy.go` in the pinned `k8s.io/apiextensions-apiserver` v0.37.1). So declaring the list a set would not block writes to an object already carrying a duplicate; it would stop every list on that `TenantGateway` from being checked at all, silently, while the duplicate the controller can name goes on being reported by name. The shipped defaults and the chart's own `fail` on an empty host conform to all of it, and for `tlsPassthroughServices` nothing else can reach the field: the only key the tenant writes into this chart's HelmRelease values is `gatewayClassName`, and only when the tenant chose a class, while everything else arrives through `valuesFrom` the `cozystack-values` Secret, and the platform writes no such key into that Secret, so the chart default is the only value that arrives and the bounds guard a value only an edit to this chart can change. An upgrade is a no-op.
112112

113113
## Parameters
114114

0 commit comments

Comments
 (0)