Skip to content

Commit d1ec8d8

Browse files
committed
bump kube to 1.33.1 and update informer interfaces
1 parent 5257c63 commit d1ec8d8

File tree

10 files changed

+831
-1133
lines changed

10 files changed

+831
-1133
lines changed

.github/workflows/build-test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on: # yamllint disable-line rule:truthy
88
branches:
99
- "*"
1010
env:
11-
GO_VERSION: "~1.20.7"
11+
GO_VERSION: "~1.24"
1212
jobs:
1313
unit:
1414
name: "Unit"

.github/workflows/lint.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on: # yamllint disable-line rule:truthy
88
pull_request:
99
branches: ["*"]
1010
env:
11-
GO_VERSION: "~1.20.7"
11+
GO_VERSION: "~1.24"
1212
jobs:
1313
go-lint:
1414
name: "Lint Go"

.golangci.yaml

Lines changed: 41 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,17 @@
11
---
2+
version: "2"
23
run:
3-
timeout: "5m"
4-
output:
5-
sort-results: true
4+
allow-parallel-runners: true
65
linters:
76
enable:
87
- "bidichk"
98
- "bodyclose"
109
- "errcheck"
1110
- "errname"
1211
- "errorlint"
13-
- "gofumpt"
14-
- "goimports"
12+
- "gocritic"
1513
- "goprintffuncname"
1614
- "gosec"
17-
- "gosimple"
1815
- "govet"
1916
- "importas"
2017
- "ineffassign"
@@ -24,11 +21,45 @@ linters:
2421
- "promlinter"
2522
- "revive"
2623
- "rowserrcheck"
24+
- "spancheck"
2725
- "staticcheck"
28-
- "stylecheck"
29-
- "tenv"
30-
- "typecheck"
26+
- "tagalign"
27+
- "testifylint"
28+
- "tparallel"
3129
- "unconvert"
32-
- "unused"
30+
- "usetesting"
3331
- "wastedassign"
3432
- "whitespace"
33+
- "unused"
34+
settings:
35+
staticcheck:
36+
checks:
37+
- "all"
38+
exclusions:
39+
generated: "lax"
40+
presets:
41+
- "comments"
42+
- "common-false-positives"
43+
- "legacy"
44+
- "std-error-handling"
45+
formatters:
46+
enable:
47+
- "gci"
48+
- "gofumpt"
49+
- "goimports"
50+
settings:
51+
gci:
52+
sections:
53+
- "standard"
54+
- "default"
55+
- "prefix(github.com/authzed)"
56+
- "localmodule"
57+
goimports:
58+
local-prefixes:
59+
- "github.com/authzed/controller-idioms"
60+
exclusions:
61+
generated: "lax"
62+
paths:
63+
- "third_party$"
64+
- "builtin$"
65+
- "examples$"

component/ensure_component_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ func TestEnsureServiceHandler(t *testing.T) {
7878
"example.com/component": "the-main-service-component",
7979
},
8080
Annotations: map[string]string{
81-
hashKey: "n649h58dh598h654hc4hc9hbbh689q",
81+
hashKey: "n55dh7ch6bh5c4h75h68bh644hcfq",
8282
},
8383
}},
8484
},
@@ -93,7 +93,7 @@ func TestEnsureServiceHandler(t *testing.T) {
9393
"example.com/component": "the-main-service-component",
9494
},
9595
Annotations: map[string]string{
96-
hashKey: "n649h58dh598h654hc4hc9hbbh689q",
96+
hashKey: "n55dh7ch6bh5c4h75h68bh644hcfq",
9797
},
9898
},
9999
}, &corev1.Service{ObjectMeta: metav1.ObjectMeta{

fileinformer/file_informer.go

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,12 @@ func NewFileSharedIndexInformer(log logr.Logger, fileName string, watcher *fsnot
165165
func (f *FileSharedIndexInformer) IsStopped() bool { return !f.started }
166166

167167
func (f *FileSharedIndexInformer) AddEventHandler(handler cache.ResourceEventHandler) (cache.ResourceEventHandlerRegistration, error) {
168-
return f.AddEventHandlerWithResyncPeriod(handler, f.defaultEventHandlerResyncPeriod)
168+
return f.AddEventHandlerWithOptions(handler, cache.HandlerOptions{
169+
ResyncPeriod: &f.defaultEventHandlerResyncPeriod,
170+
})
169171
}
170172

171-
func (f *FileSharedIndexInformer) AddEventHandlerWithResyncPeriod(handler cache.ResourceEventHandler, _ time.Duration) (cache.ResourceEventHandlerRegistration, error) {
173+
func (f *FileSharedIndexInformer) AddEventHandlerWithOptions(handler cache.ResourceEventHandler, options cache.HandlerOptions) (cache.ResourceEventHandlerRegistration, error) {
172174
f.RLock()
173175
if f.started {
174176
panic("cannot add event handlers after informer has started")
@@ -182,6 +184,12 @@ func (f *FileSharedIndexInformer) AddEventHandlerWithResyncPeriod(handler cache.
182184
return nil, nil
183185
}
184186

187+
func (f *FileSharedIndexInformer) AddEventHandlerWithResyncPeriod(handler cache.ResourceEventHandler, _ time.Duration) (cache.ResourceEventHandlerRegistration, error) {
188+
return f.AddEventHandlerWithOptions(handler, cache.HandlerOptions{
189+
ResyncPeriod: &f.defaultEventHandlerResyncPeriod,
190+
})
191+
}
192+
185193
// RemoveEventHandler implements cache.SharedInformer
186194
func (*FileSharedIndexInformer) RemoveEventHandler(_ cache.ResourceEventHandlerRegistration) error {
187195
// TODO implement me
@@ -198,6 +206,10 @@ func (f *FileSharedIndexInformer) GetController() cache.Controller {
198206
panic("implement me")
199207
}
200208

209+
func (f *FileSharedIndexInformer) RunWithContext(ctx context.Context) {
210+
f.Run(ctx.Done())
211+
}
212+
201213
func (f *FileSharedIndexInformer) Run(stopCh <-chan struct{}) {
202214
f.Do(func() {
203215
defer utilruntime.HandleCrash()
@@ -311,6 +323,11 @@ func (f *FileSharedIndexInformer) SetWatchErrorHandler(_ cache.WatchErrorHandler
311323
panic("implement me")
312324
}
313325

326+
func (f *FileSharedIndexInformer) SetWatchErrorHandlerWithContext(handler cache.WatchErrorHandlerWithContext) error {
327+
// TODO implement me
328+
panic("implement me")
329+
}
330+
314331
func (f *FileSharedIndexInformer) AddIndexers(_ cache.Indexers) error {
315332
// TODO implement me
316333
panic("implement me")

go.mod

Lines changed: 98 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -1,136 +1,139 @@
11
module github.com/authzed/controller-idioms
22

3-
go 1.20
3+
go 1.24.0
4+
5+
toolchain go1.24.3
6+
7+
// pinning versions for kube 1.33.1 compatibility
8+
replace (
9+
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc => go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.58.0
10+
go.opentelemetry.io/otel/exporters/otlp/otlptrace => go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.33.0
11+
)
412

513
require (
6-
github.com/cespare/xxhash/v2 v2.2.0
14+
github.com/cespare/xxhash/v2 v2.3.0
715
github.com/davecgh/go-spew v1.1.1
8-
github.com/fsnotify/fsnotify v1.6.0
9-
github.com/go-logr/logr v1.2.4
10-
github.com/maxbrunsfeld/counterfeiter/v6 v6.7.0
11-
github.com/prometheus/client_golang v1.16.0
12-
github.com/stretchr/testify v1.8.4
13-
golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1
14-
golang.org/x/sync v0.3.0
15-
k8s.io/api v0.28.0
16-
k8s.io/apiextensions-apiserver v0.28.0
17-
k8s.io/apimachinery v0.28.0
18-
k8s.io/apiserver v0.28.0
19-
k8s.io/cli-runtime v0.28.0
20-
k8s.io/client-go v0.28.0
21-
k8s.io/component-base v0.28.0
22-
k8s.io/controller-manager v0.28.0
23-
k8s.io/klog/v2 v2.100.1
24-
k8s.io/kubectl v0.28.0
25-
k8s.io/utils v0.0.0-20230406110748-d93618cff8a2
16+
github.com/fsnotify/fsnotify v1.9.0
17+
github.com/go-logr/logr v1.4.3
18+
github.com/maxbrunsfeld/counterfeiter/v6 v6.11.2
19+
github.com/prometheus/client_golang v1.22.0
20+
github.com/stretchr/testify v1.10.0
21+
golang.org/x/exp v0.0.0-20250606033433-dcc06ee1d476
22+
golang.org/x/sync v0.15.0
23+
k8s.io/api v0.33.1
24+
k8s.io/apiextensions-apiserver v0.33.1
25+
k8s.io/apimachinery v0.33.1
26+
k8s.io/apiserver v0.33.1
27+
k8s.io/cli-runtime v0.33.1
28+
k8s.io/client-go v0.33.1
29+
k8s.io/component-base v0.33.1
30+
k8s.io/controller-manager v0.33.1
31+
k8s.io/klog/v2 v2.130.1
32+
k8s.io/kubectl v0.33.1
33+
k8s.io/utils v0.0.0-20250604170112-4c0f3b243397
34+
2635
)
2736

2837
require (
2938
github.com/NYTimes/gziphandler v1.1.1 // indirect
30-
github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a // indirect
3139
github.com/beorn7/perks v1.0.1 // indirect
3240
github.com/blang/semver/v4 v4.0.0 // indirect
33-
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
3441
github.com/coreos/go-semver v0.3.1 // indirect
3542
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
36-
github.com/emicklei/go-restful/v3 v3.9.0 // indirect
37-
github.com/evanphx/json-patch v5.6.0+incompatible // indirect
38-
github.com/felixge/httpsnoop v1.0.3 // indirect
43+
github.com/emicklei/go-restful/v3 v3.12.2 // indirect
44+
github.com/felixge/httpsnoop v1.0.4 // indirect
3945
github.com/go-logr/stdr v1.2.2 // indirect
4046
github.com/gogo/protobuf v1.3.2 // indirect
41-
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
42-
github.com/golang/protobuf v1.5.3 // indirect
43-
github.com/google/cel-go v0.16.0 // indirect
44-
github.com/google/go-cmp v0.5.9 // indirect
45-
github.com/google/gofuzz v1.2.0 // indirect
46-
github.com/google/pprof v0.0.0-20230705174524-200ffdc848b8 // indirect
47-
github.com/google/uuid v1.3.0 // indirect
47+
github.com/golang/protobuf v1.5.4 // indirect
48+
github.com/google/cel-go v0.25.0 // indirect
49+
github.com/google/go-cmp v0.7.0 // indirect
50+
github.com/google/uuid v1.6.0 // indirect
4851
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect
49-
github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0 // indirect
50-
github.com/imdario/mergo v0.3.12 // indirect
52+
github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 // indirect
5153
github.com/inconshreveable/mousetrap v1.1.0 // indirect
5254
github.com/josharian/intern v1.0.0 // indirect
5355
github.com/json-iterator/go v1.1.12 // indirect
54-
github.com/mailru/easyjson v0.7.7 // indirect
55-
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
56+
github.com/mailru/easyjson v0.9.0 // indirect
5657
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
5758
github.com/modern-go/reflect2 v1.0.2 // indirect
5859
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
5960
github.com/pkg/errors v0.9.1 // indirect
6061
github.com/pmezard/go-difflib v1.0.0 // indirect
61-
github.com/prometheus/client_model v0.4.0 // indirect
62-
github.com/prometheus/common v0.44.0 // indirect
63-
github.com/prometheus/procfs v0.10.1 // indirect
64-
github.com/sirupsen/logrus v1.9.3 // indirect
65-
github.com/spf13/cobra v1.7.0 // indirect
66-
github.com/spf13/pflag v1.0.5 // indirect
67-
github.com/stoewer/go-strcase v1.2.0 // indirect
68-
github.com/stretchr/objx v0.5.0 // indirect
69-
go.etcd.io/etcd/api/v3 v3.5.9 // indirect
70-
go.etcd.io/etcd/client/pkg/v3 v3.5.9 // indirect
71-
go.etcd.io/etcd/client/v3 v3.5.9 // indirect
72-
go.uber.org/atomic v1.11.0 // indirect
62+
github.com/prometheus/client_model v0.6.2 // indirect
63+
github.com/prometheus/common v0.64.0 // indirect
64+
github.com/prometheus/procfs v0.16.1 // indirect
65+
github.com/spf13/cobra v1.9.1 // indirect
66+
github.com/spf13/pflag v1.0.6 // indirect
67+
github.com/stoewer/go-strcase v1.3.0 // indirect
68+
github.com/stretchr/objx v0.5.2 // indirect
69+
go.etcd.io/etcd/api/v3 v3.6.1 // indirect
70+
go.etcd.io/etcd/client/pkg/v3 v3.6.1 // indirect
71+
go.etcd.io/etcd/client/v3 v3.6.1 // indirect
7372
go.uber.org/multierr v1.11.0 // indirect
74-
go.uber.org/zap v1.24.0 // indirect
75-
golang.org/x/crypto v0.12.0 // indirect
76-
golang.org/x/net v0.14.0 // indirect
77-
golang.org/x/oauth2 v0.8.0 // indirect
78-
golang.org/x/sys v0.11.0 // indirect
79-
golang.org/x/term v0.11.0 // indirect
80-
golang.org/x/text v0.12.0 // indirect
81-
golang.org/x/time v0.3.0 // indirect
82-
golang.org/x/tools v0.12.0 // indirect
83-
google.golang.org/appengine v1.6.7 // indirect
84-
google.golang.org/genproto v0.0.0-20230526161137-0005af68ea54 // indirect
85-
google.golang.org/grpc v1.54.0 // indirect
86-
google.golang.org/protobuf v1.31.0 // indirect
73+
go.uber.org/zap v1.27.0 // indirect
74+
golang.org/x/crypto v0.39.0 // indirect
75+
golang.org/x/net v0.41.0 // indirect
76+
golang.org/x/oauth2 v0.30.0 // indirect
77+
golang.org/x/sys v0.33.0 // indirect
78+
golang.org/x/term v0.32.0 // indirect
79+
golang.org/x/text v0.26.0 // indirect
80+
golang.org/x/time v0.12.0 // indirect
81+
golang.org/x/tools v0.34.0 // indirect
82+
google.golang.org/grpc v1.73.0 // indirect
83+
google.golang.org/protobuf v1.36.6 // indirect
8784
gopkg.in/inf.v0 v0.9.1 // indirect
88-
gopkg.in/yaml.v2 v2.4.0 // indirect
8985
gopkg.in/yaml.v3 v3.0.1 // indirect
90-
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.1.2 // indirect
91-
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
92-
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
93-
sigs.k8s.io/yaml v1.3.0 // indirect
86+
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.33.0 // indirect
87+
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect
88+
sigs.k8s.io/structured-merge-diff/v4 v4.7.0 // indirect
89+
sigs.k8s.io/yaml v1.4.0 // indirect
9490
)
9591

9692
require (
97-
cloud.google.com/go/compute v1.19.1 // indirect
98-
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
93+
cel.dev/expr v0.24.0 // indirect
94+
github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect
9995
github.com/MakeNowJust/heredoc v1.0.0 // indirect
100-
github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df // indirect
96+
github.com/antlr4-go/antlr/v4 v4.13.1 // indirect
97+
github.com/cenkalti/backoff/v5 v5.0.2 // indirect
10198
github.com/chai2010/gettext-go v1.0.2 // indirect
102-
github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d // indirect
99+
github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f // indirect
100+
github.com/fxamacker/cbor/v2 v2.8.0 // indirect
103101
github.com/go-errors/errors v1.4.2 // indirect
104-
github.com/go-openapi/jsonpointer v0.19.6 // indirect
105-
github.com/go-openapi/jsonreference v0.20.2 // indirect
106-
github.com/go-openapi/swag v0.22.3 // indirect
107-
github.com/google/btree v1.0.1 // indirect
108-
github.com/google/gnostic-models v0.6.8 // indirect
102+
github.com/go-openapi/jsonpointer v0.21.1 // indirect
103+
github.com/go-openapi/jsonreference v0.21.0 // indirect
104+
github.com/go-openapi/swag v0.23.1 // indirect
105+
github.com/google/btree v1.1.3 // indirect
106+
github.com/google/gnostic-models v0.6.9 // indirect
109107
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
110-
github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 // indirect
108+
github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 // indirect
109+
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 // indirect
110+
github.com/kylelemons/godebug v1.1.0 // indirect
111111
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect
112112
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
113-
github.com/moby/spdystream v0.2.0 // indirect
114-
github.com/moby/term v0.0.0-20221205130635-1aeaba878587 // indirect
113+
github.com/moby/spdystream v0.5.0 // indirect
114+
github.com/moby/term v0.5.0 // indirect
115115
github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect
116+
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect
116117
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
117118
github.com/russross/blackfriday/v2 v2.1.0 // indirect
119+
github.com/x448/float16 v0.8.4 // indirect
118120
github.com/xlab/treeprint v1.2.0 // indirect
119-
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.35.0 // indirect
120-
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.35.1 // indirect
121-
go.opentelemetry.io/otel v1.10.0 // indirect
122-
go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.10.0 // indirect
123-
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.10.0 // indirect
124-
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.10.0 // indirect
125-
go.opentelemetry.io/otel/metric v0.31.0 // indirect
126-
go.opentelemetry.io/otel/sdk v1.10.0 // indirect
127-
go.opentelemetry.io/otel/trace v1.10.0 // indirect
128-
go.opentelemetry.io/proto/otlp v0.19.0 // indirect
129-
go.starlark.net v0.0.0-20230525235612-a134d8f9ddca // indirect
130-
golang.org/x/mod v0.12.0 // indirect
131-
google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9 // indirect
132-
google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19 // indirect
133-
k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect
134-
sigs.k8s.io/kustomize/api v0.13.5-0.20230601165947-6ce0bf390ce3 // indirect
135-
sigs.k8s.io/kustomize/kyaml v0.14.3-0.20230601165947-6ce0bf390ce3 // indirect
121+
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
122+
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0 // indirect
123+
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 // indirect
124+
go.opentelemetry.io/otel v1.36.0 // indirect
125+
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.36.0 // indirect
126+
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.36.0 // indirect
127+
go.opentelemetry.io/otel/metric v1.36.0 // indirect
128+
go.opentelemetry.io/otel/sdk v1.36.0 // indirect
129+
go.opentelemetry.io/otel/trace v1.36.0 // indirect
130+
go.opentelemetry.io/proto/otlp v1.7.0 // indirect
131+
golang.org/x/mod v0.25.0 // indirect
132+
google.golang.org/genproto/googleapis/api v0.0.0-20250603155806-513f23925822 // indirect
133+
google.golang.org/genproto/googleapis/rpc v0.0.0-20250603155806-513f23925822 // indirect
134+
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
135+
k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff // indirect
136+
sigs.k8s.io/kustomize/api v0.19.0 // indirect
137+
sigs.k8s.io/kustomize/kyaml v0.19.0 // indirect
138+
sigs.k8s.io/randfill v1.0.0 // indirect
136139
)

0 commit comments

Comments
 (0)