Skip to content

Commit 6005d29

Browse files
authored
Merge pull request #39 from ecordell/k127
bump kube dependencies for 1.27
2 parents 45ed61d + 7b3974a commit 6005d29

File tree

10 files changed

+146
-166
lines changed

10 files changed

+146
-166
lines changed

.github/workflows/build-test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ jobs:
1515
- uses: "actions/checkout@v3"
1616
- uses: "actions/setup-go@v3"
1717
with:
18-
go-version: "~1.19"
18+
go-version: "~1.20"
1919
- uses: "authzed/actions/go-test@main"

.github/workflows/lint.yaml

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- uses: "actions/checkout@v3"
1616
- uses: "actions/setup-go@v3"
1717
with:
18-
go-version: "~1.19"
18+
go-version: "~1.20"
1919
- uses: "authzed/actions/gofumpt@main"
2020
- uses: "authzed/actions/go-generate@main"
2121
- uses: "authzed/actions/golangci-lint@main"
@@ -27,19 +27,3 @@ jobs:
2727
- uses: "actions/checkout@v3"
2828
- uses: "authzed/actions/yaml-lint@main"
2929
- uses: "authzed/actions/markdown-lint@main"
30-
31-
# TODO: enable when public
32-
# codeql:
33-
# name: "Analyze with CodeQL"
34-
# runs-on: "ubuntu-latest"
35-
# permissions:
36-
# actions: "read"
37-
# contents: "read"
38-
# security-events: "write"
39-
# strategy:
40-
# fail-fast: false
41-
# matrix:
42-
# language: ["go"]
43-
# steps:
44-
# - uses: "actions/checkout@v3"
45-
# - uses: "authzed/actions/codeql@main"

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: "n5d8h56h6dhc7h96h8h545h96q",
81+
hashKey: "n649h58dh598h654hc4hc9hbbh689q",
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: "n5d8h56h6dhc7h96h8h545h96q",
96+
hashKey: "n649h58dh598h654hc4hc9hbbh689q",
9797
},
9898
},
9999
}, &corev1.Service{ObjectMeta: metav1.ObjectMeta{

fileinformer/file_informer.go

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ func NewFileInformerFactory(log logr.Logger) (*Factory, error) {
4545
}, nil
4646
}
4747

48-
// Start starts watching the files defined byt the informers.
48+
// Start starts watching the files defined by the informers.
4949
func (f *Factory) Start(stopCh <-chan struct{}) {
5050
f.Lock()
5151
defer f.Unlock()
@@ -58,6 +58,9 @@ func (f *Factory) Start(stopCh <-chan struct{}) {
5858
}
5959
}
6060

61+
// Shutdown stops watching the files defined by the informers.
62+
func (f *Factory) Shutdown() {}
63+
6164
// ForResource will create an informer for a specific file.
6265
func (f *Factory) ForResource(gvr schema.GroupVersionResource) informers.GenericInformer {
6366
f.Lock()
@@ -165,7 +168,7 @@ func (f *FileSharedIndexInformer) AddEventHandler(handler cache.ResourceEventHan
165168
return f.AddEventHandlerWithResyncPeriod(handler, f.defaultEventHandlerResyncPeriod)
166169
}
167170

168-
func (f *FileSharedIndexInformer) AddEventHandlerWithResyncPeriod(handler cache.ResourceEventHandler, resyncPeriod time.Duration) (cache.ResourceEventHandlerRegistration, error) {
171+
func (f *FileSharedIndexInformer) AddEventHandlerWithResyncPeriod(handler cache.ResourceEventHandler, _ time.Duration) (cache.ResourceEventHandlerRegistration, error) {
169172
f.RLock()
170173
if f.started {
171174
panic("cannot add event handlers after informer has started")
@@ -180,7 +183,7 @@ func (f *FileSharedIndexInformer) AddEventHandlerWithResyncPeriod(handler cache.
180183
}
181184

182185
// RemoveEventHandler implements cache.SharedInformer
183-
func (*FileSharedIndexInformer) RemoveEventHandler(handle cache.ResourceEventHandlerRegistration) error {
186+
func (*FileSharedIndexInformer) RemoveEventHandler(_ cache.ResourceEventHandlerRegistration) error {
184187
// TODO implement me
185188
panic("unimplemented")
186189
}
@@ -212,7 +215,7 @@ func (f *FileSharedIndexInformer) Run(stopCh <-chan struct{}) {
212215
// do an initial read
213216
f.RLock()
214217
for _, h := range f.handlers {
215-
h.OnAdd(fileName)
218+
h.OnAdd(fileName, true)
216219
}
217220
f.RUnlock()
218221

@@ -253,7 +256,7 @@ func (f *FileSharedIndexInformer) Run(stopCh <-chan struct{}) {
253256
if event.Has(fsnotify.Write) || event.Has(fsnotify.Create) {
254257
f.RLock()
255258
for _, h := range f.handlers {
256-
h.OnAdd(fileName)
259+
h.OnAdd(fileName, false)
257260
}
258261
f.RUnlock()
259262
}
@@ -303,12 +306,12 @@ func (f *FileSharedIndexInformer) LastSyncResourceVersion() string {
303306
panic("implement me")
304307
}
305308

306-
func (f *FileSharedIndexInformer) SetWatchErrorHandler(handler cache.WatchErrorHandler) error {
309+
func (f *FileSharedIndexInformer) SetWatchErrorHandler(_ cache.WatchErrorHandler) error {
307310
// TODO implement me
308311
panic("implement me")
309312
}
310313

311-
func (f *FileSharedIndexInformer) AddIndexers(indexers cache.Indexers) error {
314+
func (f *FileSharedIndexInformer) AddIndexers(_ cache.Indexers) error {
312315
// TODO implement me
313316
panic("implement me")
314317
}
@@ -318,7 +321,7 @@ func (f *FileSharedIndexInformer) GetIndexer() cache.Indexer {
318321
panic("implement me")
319322
}
320323

321-
func (f *FileSharedIndexInformer) SetTransform(handler cache.TransformFunc) error {
324+
func (f *FileSharedIndexInformer) SetTransform(_ cache.TransformFunc) error {
322325
// TODO implement me
323326
panic("implement me")
324327
}

fileinformer/file_informer_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ type MockEventHandlers struct {
100100

101101
var _ cache.ResourceEventHandler = &MockEventHandlers{}
102102

103-
func (m *MockEventHandlers) OnAdd(obj interface{}) {
103+
func (m *MockEventHandlers) OnAdd(obj interface{}, _ bool) {
104104
m.Lock()
105105
defer m.Unlock()
106106
m.Called(obj)

go.mod

Lines changed: 37 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -9,54 +9,56 @@ require (
99
github.com/go-logr/logr v1.2.3
1010
github.com/maxbrunsfeld/counterfeiter/v6 v6.5.0
1111
github.com/prometheus/client_golang v1.14.0
12-
github.com/stretchr/testify v1.8.0
12+
github.com/stretchr/testify v1.8.1
1313
golang.org/x/exp v0.0.0-20220823124025-807a23277127
14-
golang.org/x/sync v0.0.0-20220819030929-7fc1605a5dde
15-
k8s.io/api v0.26.0
16-
k8s.io/apiextensions-apiserver v0.26.0
17-
k8s.io/apimachinery v0.26.0
18-
k8s.io/apiserver v0.26.0
19-
k8s.io/client-go v0.26.0
20-
k8s.io/component-base v0.26.0
21-
k8s.io/controller-manager v0.26.0
22-
k8s.io/klog/v2 v2.80.1
23-
k8s.io/utils v0.0.0-20221128185143-99ec85e7a448
14+
golang.org/x/sync v0.1.0
15+
k8s.io/api v0.27.2
16+
k8s.io/apiextensions-apiserver v0.27.2
17+
k8s.io/apimachinery v0.27.2
18+
k8s.io/apiserver v0.27.2
19+
k8s.io/client-go v0.27.2
20+
k8s.io/component-base v0.27.2
21+
k8s.io/controller-manager v0.27.2
22+
k8s.io/klog/v2 v2.90.1
23+
k8s.io/utils v0.0.0-20230209194617-a36077c30491
2424
mvdan.cc/gofumpt v0.3.1
2525
sigs.k8s.io/controller-runtime v0.14.1
2626
)
2727

2828
require (
2929
github.com/NYTimes/gziphandler v1.1.1 // indirect
3030
github.com/antlr/antlr4/runtime/Go/antlr v1.4.10 // indirect
31+
github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a // indirect
3132
github.com/beorn7/perks v1.0.1 // indirect
3233
github.com/blang/semver/v4 v4.0.0 // indirect
3334
github.com/cenkalti/backoff/v4 v4.1.3 // indirect
3435
github.com/coreos/go-semver v0.3.0 // indirect
35-
github.com/coreos/go-systemd/v22 v22.3.2 // indirect
36+
github.com/coreos/go-systemd/v22 v22.4.0 // indirect
3637
github.com/emicklei/go-restful/v3 v3.9.0 // indirect
3738
github.com/evanphx/json-patch v4.12.0+incompatible // indirect
3839
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
3940
github.com/felixge/httpsnoop v1.0.3 // indirect
4041
github.com/go-logr/stdr v1.2.2 // indirect
41-
github.com/go-openapi/jsonpointer v0.19.5 // indirect
42-
github.com/go-openapi/jsonreference v0.20.0 // indirect
43-
github.com/go-openapi/swag v0.19.14 // indirect
42+
github.com/go-openapi/jsonpointer v0.19.6 // indirect
43+
github.com/go-openapi/jsonreference v0.20.1 // indirect
44+
github.com/go-openapi/swag v0.22.3 // indirect
4445
github.com/gogo/protobuf v1.3.2 // indirect
4546
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
46-
github.com/golang/protobuf v1.5.2 // indirect
47-
github.com/google/cel-go v0.12.5 // indirect
47+
github.com/golang/protobuf v1.5.3 // indirect
48+
github.com/google/cel-go v0.12.6 // indirect
4849
github.com/google/gnostic v0.5.7-v3refs // indirect
4950
github.com/google/go-cmp v0.5.9 // indirect
5051
github.com/google/gofuzz v1.1.0 // indirect
51-
github.com/google/uuid v1.1.2 // indirect
52+
github.com/google/uuid v1.3.0 // indirect
5253
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect
5354
github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0 // indirect
5455
github.com/imdario/mergo v0.3.12 // indirect
5556
github.com/inconshreveable/mousetrap v1.0.1 // indirect
5657
github.com/josharian/intern v1.0.0 // indirect
5758
github.com/json-iterator/go v1.1.12 // indirect
58-
github.com/mailru/easyjson v0.7.6 // indirect
59+
github.com/mailru/easyjson v0.7.7 // indirect
5960
github.com/matttproud/golang_protobuf_extensions v1.0.2 // indirect
61+
github.com/mitchellh/mapstructure v1.4.1 // indirect
6062
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
6163
github.com/modern-go/reflect2 v1.0.2 // indirect
6264
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
@@ -68,12 +70,12 @@ require (
6870
github.com/spf13/cobra v1.6.0 // indirect
6971
github.com/spf13/pflag v1.0.5 // indirect
7072
github.com/stoewer/go-strcase v1.2.0 // indirect
71-
github.com/stretchr/objx v0.4.0 // indirect
72-
go.etcd.io/etcd/api/v3 v3.5.5 // indirect
73-
go.etcd.io/etcd/client/pkg/v3 v3.5.5 // indirect
74-
go.etcd.io/etcd/client/v3 v3.5.5 // indirect
73+
github.com/stretchr/objx v0.5.0 // indirect
74+
go.etcd.io/etcd/api/v3 v3.5.7 // indirect
75+
go.etcd.io/etcd/client/pkg/v3 v3.5.7 // indirect
76+
go.etcd.io/etcd/client/v3 v3.5.7 // indirect
7577
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.35.0 // indirect
76-
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.35.0 // indirect
78+
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.35.1 // indirect
7779
go.opentelemetry.io/otel v1.10.0 // indirect
7880
go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.10.0 // indirect
7981
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.10.0 // indirect
@@ -85,24 +87,25 @@ require (
8587
go.uber.org/atomic v1.7.0 // indirect
8688
go.uber.org/multierr v1.6.0 // indirect
8789
go.uber.org/zap v1.24.0 // indirect
88-
golang.org/x/mod v0.6.0 // indirect
89-
golang.org/x/net v0.3.1-0.20221206200815-1e63c2f08a10 // indirect
90+
golang.org/x/crypto v0.1.0 // indirect
91+
golang.org/x/mod v0.9.0 // indirect
92+
golang.org/x/net v0.8.0 // indirect
9093
golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b // indirect
91-
golang.org/x/sys v0.3.0 // indirect
92-
golang.org/x/term v0.3.0 // indirect
93-
golang.org/x/text v0.5.0 // indirect
94+
golang.org/x/sys v0.6.0 // indirect
95+
golang.org/x/term v0.6.0 // indirect
96+
golang.org/x/text v0.8.0 // indirect
9497
golang.org/x/time v0.3.0 // indirect
95-
golang.org/x/tools v0.2.0 // indirect
98+
golang.org/x/tools v0.7.0 // indirect
9699
google.golang.org/appengine v1.6.7 // indirect
97100
google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21 // indirect
98-
google.golang.org/grpc v1.49.0 // indirect
101+
google.golang.org/grpc v1.51.0 // indirect
99102
google.golang.org/protobuf v1.28.1 // indirect
100103
gopkg.in/inf.v0 v0.9.1 // indirect
101104
gopkg.in/yaml.v2 v2.4.0 // indirect
102105
gopkg.in/yaml.v3 v3.0.1 // indirect
103-
k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 // indirect
104-
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.33 // indirect
105-
sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect
106+
k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f // indirect
107+
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.1.2 // indirect
108+
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
106109
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
107110
sigs.k8s.io/yaml v1.3.0 // indirect
108111
)

0 commit comments

Comments
 (0)