Skip to content

Commit 7143d16

Browse files
Merge pull request #743 from sameerforge/dep/secretgen-v0.36-bump
Upgrade Kubernetes library stack to v0.36.0 and go runtime to 1.26
2 parents 8af1ddf + bc81d66 commit 7143d16

3,834 files changed

Lines changed: 430205 additions & 275858 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/golangci-lint.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ jobs:
2222
with:
2323
fetch-depth: 0
2424
- name: Install + Setup Go
25-
uses: actions/setup-go@v5
25+
uses: actions/setup-go@v6
2626
with:
2727
go-version-file: go.mod
2828
- name: golangci-lint
29-
uses: golangci/golangci-lint-action@v7
29+
uses: golangci/golangci-lint-action@v9
3030
with:
31-
version: v2.4
31+
version: v2.12.2
3232
args: -v

.github/workflows/release.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ jobs:
2828
with:
2929
token: ${{ secrets.GITHUB_TOKEN }}
3030
only: ytt, kapp, kbld, imgpkg, kctrl, vendir
31-
ytt: v0.53.0
32-
kapp: v0.65.1
33-
kbld: v0.47.1
34-
imgpkg: v0.47.1
35-
kctrl: v0.59.2
36-
vendir: v0.45.1
31+
ytt: v0.55.0
32+
kapp: v0.65.3
33+
kbld: v0.48.0
34+
imgpkg: v0.48.0
35+
kctrl: v0.59.8
36+
vendir: v0.45.3
3737
- name: Login to GitHub Container Registry
3838
uses: docker/login-action@v2
3939
with:

.github/workflows/test-gh.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
with:
2828
fetch-depth: 0
2929
- name: Set up Go
30-
uses: actions/setup-go@v5
30+
uses: actions/setup-go@v6
3131
with:
3232
go-version-file: go.mod
3333
- name: Resolve Kubernetes version
@@ -57,9 +57,9 @@ jobs:
5757
with:
5858
token: ${{ secrets.GITHUB_TOKEN }}
5959
only: ytt, kapp, kbld
60-
ytt: v0.53.0
61-
kapp: v0.65.1
62-
kbld: v0.47.1
60+
ytt: v0.55.0
61+
kapp: v0.65.3
62+
kbld: v0.48.0
6363
- name: Run Tests
6464
run: |
6565
set -e -x

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM --platform=$BUILDPLATFORM golang:1.25.7 AS deps
1+
FROM --platform=$BUILDPLATFORM golang:1.26 AS deps
22

33
ARG TARGETOS TARGETARCH SGCTRL_VER=development
44
WORKDIR /workspace

cmd/controller/main.go

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,14 @@ import (
2323
"k8s.io/client-go/kubernetes/scheme"
2424
_ "k8s.io/client-go/plugin/pkg/client/auth/gcp"
2525
"k8s.io/client-go/util/workqueue"
26+
"sigs.k8s.io/controller-runtime/pkg/cache"
2627
"sigs.k8s.io/controller-runtime/pkg/client/config"
2728
"sigs.k8s.io/controller-runtime/pkg/controller"
2829
logf "sigs.k8s.io/controller-runtime/pkg/log"
2930
"sigs.k8s.io/controller-runtime/pkg/log/zap"
3031
"sigs.k8s.io/controller-runtime/pkg/manager"
3132
"sigs.k8s.io/controller-runtime/pkg/manager/signals"
32-
"sigs.k8s.io/controller-runtime/pkg/ratelimiter"
33+
metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server"
3334
"sigs.k8s.io/controller-runtime/pkg/reconcile"
3435
)
3536

@@ -58,7 +59,17 @@ func main() {
5859
sgv1alpha1.AddToScheme(scheme.Scheme)
5960
sg2v1alpha1.AddToScheme(scheme.Scheme)
6061

61-
mgr, err := manager.New(restConfig, manager.Options{Namespace: ctrlNamespace, MetricsBindAddress: metricsBindAddress})
62+
mgrOpts := manager.Options{
63+
Metrics: metricsserver.Options{
64+
BindAddress: metricsBindAddress,
65+
},
66+
}
67+
if ctrlNamespace != "" {
68+
mgrOpts.Cache = cache.Options{
69+
DefaultNamespaces: map[string]cache.Config{ctrlNamespace: {}},
70+
}
71+
}
72+
mgr, err := manager.New(restConfig, mgrOpts)
6273
exitIfErr(entryLog, "unable to set up controller manager", err)
6374

6475
entryLog.Info("setting up controllers")
@@ -84,7 +95,7 @@ func main() {
8495
saLoader := generator.NewServiceAccountLoader(satoken.NewManager(coreClient, log.WithName("template")))
8596

8697
// Set SecretTemplate's maximum exponential to reduce reconcile time for inputresource errors
87-
rateLimiter := workqueue.NewItemExponentialFailureRateLimiter(100*time.Millisecond, 120*time.Second)
98+
rateLimiter := workqueue.NewTypedItemExponentialFailureRateLimiter[reconcile.Request](100*time.Millisecond, 120*time.Second)
8899
secretTemplateReconciler := generator.NewSecretTemplateReconciler(mgr.GetClient(), saLoader, tracker.NewTracker(), log.WithName("template"))
89100
exitIfErr(entryLog, "registering", registerCtrlWithRateLimiter("template", mgr, secretTemplateReconciler, rateLimiter))
90101

@@ -114,30 +125,30 @@ func main() {
114125

115126
type reconcilerWithWatches interface {
116127
reconcile.Reconciler
117-
AttachWatches(controller.Controller) error
128+
AttachWatches(controller.Controller, manager.Manager) error
118129
}
119130

120131
func registerCtrl(desc string, mgr manager.Manager, reconciler reconcilerWithWatches) error {
121-
return registerCtrlWithRateLimiter(desc, mgr, reconciler, workqueue.DefaultControllerRateLimiter())
132+
return registerCtrlWithRateLimiter(desc, mgr, reconciler, workqueue.DefaultTypedControllerRateLimiter[reconcile.Request]())
122133
}
123134

124-
func registerCtrlWithRateLimiter(desc string, mgr manager.Manager, reconciler reconcilerWithWatches, ratelimiter ratelimiter.RateLimiter) error {
135+
func registerCtrlWithRateLimiter(desc string, mgr manager.Manager, reconciler reconcilerWithWatches, rl workqueue.TypedRateLimiter[reconcile.Request]) error {
125136
ctrlName := "sg-" + desc
126137

127138
ctrlOpts := controller.Options{
128139
Reconciler: reconciler,
129140
// Default MaxConcurrentReconciles is 1. Keeping at that
130141
// since we are not doing anything that we need to parallelize for.
131142

132-
RateLimiter: ratelimiter,
143+
RateLimiter: rl,
133144
}
134145

135146
ctrl, err := controller.New(ctrlName, mgr, ctrlOpts)
136147
if err != nil {
137148
return fmt.Errorf("%s: unable to set up: %s", ctrlName, err)
138149
}
139150

140-
err = reconciler.AttachWatches(ctrl)
151+
err = reconciler.AttachWatches(ctrl, mgr)
141152
if err != nil {
142153
return fmt.Errorf("%s: unable to attaches watches: %s", ctrlName, err)
143154
}

go.mod

Lines changed: 61 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,88 +1,85 @@
11
module carvel.dev/secretgen-controller
22

3-
go 1.25.7
3+
go 1.26.0
44

55
require (
66
github.com/cloudfoundry/bosh-utils v0.0.563 // indirect
77
github.com/cloudfoundry/config-server v0.1.261
88
github.com/ghodss/yaml v1.0.0
99
github.com/go-logr/logr v1.4.3
1010
github.com/stretchr/testify v1.11.1
11-
golang.org/x/tools v0.38.0 // indirect
12-
k8s.io/api v0.26.2
13-
k8s.io/apimachinery v0.27.1
14-
k8s.io/client-go v0.26.2
15-
k8s.io/code-generator v0.27.1
16-
k8s.io/utils v0.0.0-20230209194617-a36077c30491
17-
sigs.k8s.io/controller-runtime v0.14.6
18-
sigs.k8s.io/controller-tools v0.11.3
11+
golang.org/x/tools v0.42.0 // indirect
12+
k8s.io/api v0.36.0
13+
k8s.io/apimachinery v0.36.0
14+
k8s.io/client-go v0.36.0
15+
k8s.io/code-generator v0.36.0
16+
k8s.io/utils v0.0.0-20260210185600-b8788abfbbc2
17+
sigs.k8s.io/controller-runtime v0.24.1
18+
sigs.k8s.io/controller-tools v0.20.1
1919
)
2020

2121
require (
2222
github.com/beorn7/perks v1.0.1 // indirect
23-
github.com/cespare/xxhash/v2 v2.1.2 // indirect
24-
github.com/davecgh/go-spew v1.1.1 // indirect
25-
github.com/emicklei/go-restful/v3 v3.10.1 // indirect
23+
github.com/cespare/xxhash/v2 v2.3.0 // indirect
24+
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
25+
github.com/emicklei/go-restful/v3 v3.13.0 // indirect
2626
github.com/evanphx/json-patch v5.6.0+incompatible // indirect
27-
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
28-
github.com/fatih/color v1.13.0 // indirect
29-
github.com/fsnotify/fsnotify v1.6.0 // indirect
30-
github.com/go-logr/zapr v1.2.3 // indirect
31-
github.com/go-openapi/jsonpointer v0.19.6 // indirect
32-
github.com/go-openapi/jsonreference v0.20.1 // indirect
33-
github.com/go-openapi/swag v0.22.3 // indirect
34-
github.com/gobuffalo/flect v0.3.0 // indirect
35-
github.com/gogo/protobuf v1.3.2 // indirect
36-
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
37-
github.com/golang/protobuf v1.5.3 // indirect
38-
github.com/google/gnostic v0.6.9 // indirect
39-
github.com/google/go-cmp v0.7.0 // indirect
40-
github.com/google/gofuzz v1.2.0 // indirect
41-
github.com/google/uuid v1.3.0 // indirect
42-
github.com/imdario/mergo v0.3.13 // indirect
43-
github.com/inconshreveable/mousetrap v1.0.1 // indirect
27+
github.com/evanphx/json-patch/v5 v5.9.11 // indirect
28+
github.com/fatih/color v1.18.0 // indirect
29+
github.com/fsnotify/fsnotify v1.9.0 // indirect
30+
github.com/fxamacker/cbor/v2 v2.9.0 // indirect
31+
github.com/go-logr/zapr v1.3.0 // indirect
32+
github.com/go-openapi/jsonpointer v0.21.0 // indirect
33+
github.com/go-openapi/jsonreference v0.20.2 // indirect
34+
github.com/go-openapi/swag v0.23.0 // indirect
35+
github.com/gobuffalo/flect v1.0.3 // indirect
36+
github.com/google/gnostic-models v0.7.0 // indirect
37+
github.com/google/uuid v1.6.0 // indirect
38+
github.com/inconshreveable/mousetrap v1.1.0 // indirect
4439
github.com/josharian/intern v1.0.0 // indirect
4540
github.com/json-iterator/go v1.1.12 // indirect
4641
github.com/mailru/easyjson v0.7.7 // indirect
4742
github.com/mattn/go-colorable v0.1.13 // indirect
48-
github.com/mattn/go-isatty v0.0.16 // indirect
49-
github.com/matttproud/golang_protobuf_extensions v1.0.2 // indirect
43+
github.com/mattn/go-isatty v0.0.20 // indirect
5044
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
51-
github.com/modern-go/reflect2 v1.0.2 // indirect
45+
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect
5246
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
53-
github.com/pkg/errors v0.9.1 // indirect
54-
github.com/pmezard/go-difflib v1.0.0 // indirect
55-
github.com/prometheus/client_golang v1.14.0 // indirect
56-
github.com/prometheus/client_model v0.3.0 // indirect
57-
github.com/prometheus/common v0.37.0 // indirect
58-
github.com/prometheus/procfs v0.8.0 // indirect
59-
github.com/rogpeppe/go-internal v1.14.1 // indirect
60-
github.com/spf13/cobra v1.6.1 // indirect
61-
github.com/spf13/pflag v1.0.5 // indirect
62-
go.uber.org/atomic v1.10.0 // indirect
63-
go.uber.org/multierr v1.8.0 // indirect
64-
go.uber.org/zap v1.24.0 // indirect
65-
golang.org/x/crypto v0.45.0 // indirect
66-
golang.org/x/mod v0.29.0 // indirect
67-
golang.org/x/net v0.47.0 // indirect
68-
golang.org/x/oauth2 v0.27.0 // indirect
69-
golang.org/x/sync v0.18.0 // indirect
70-
golang.org/x/sys v0.38.0 // indirect
71-
golang.org/x/term v0.37.0 // indirect
72-
golang.org/x/text v0.31.0 // indirect
73-
golang.org/x/time v0.3.0 // indirect
74-
golang.org/x/tools/go/packages/packagestest v0.1.1-deprecated // indirect
75-
gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect
76-
google.golang.org/protobuf v1.36.7 // indirect
47+
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
48+
github.com/prometheus/client_golang v1.23.2 // indirect
49+
github.com/prometheus/client_model v0.6.2 // indirect
50+
github.com/prometheus/common v0.67.5 // indirect
51+
github.com/prometheus/procfs v0.19.2 // indirect
52+
github.com/spf13/cobra v1.10.2 // indirect
53+
github.com/spf13/pflag v1.0.10 // indirect
54+
github.com/x448/float16 v0.8.4 // indirect
55+
go.uber.org/multierr v1.11.0 // indirect
56+
go.uber.org/zap v1.27.1 // indirect
57+
go.yaml.in/yaml/v2 v2.4.3 // indirect
58+
go.yaml.in/yaml/v3 v3.0.4 // indirect
59+
golang.org/x/crypto v0.49.0 // indirect
60+
golang.org/x/mod v0.33.0 // indirect
61+
golang.org/x/net v0.52.0 // indirect
62+
golang.org/x/oauth2 v0.34.0 // indirect
63+
golang.org/x/sync v0.20.0 // indirect
64+
golang.org/x/sys v0.42.0 // indirect
65+
golang.org/x/term v0.41.0 // indirect
66+
golang.org/x/text v0.35.0 // indirect
67+
golang.org/x/time v0.14.0 // indirect
68+
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
69+
google.golang.org/genproto/googleapis/api v0.0.0-20260504160031-60b97b32f348 // indirect
70+
google.golang.org/genproto/googleapis/rpc v0.0.0-20260504160031-60b97b32f348 // indirect
71+
google.golang.org/grpc v1.80.0 // indirect
72+
google.golang.org/protobuf v1.36.12-0.20260120151049-f2248ac996af // indirect
73+
gopkg.in/evanphx/json-patch.v4 v4.13.0 // indirect
7774
gopkg.in/inf.v0 v0.9.1 // indirect
7875
gopkg.in/yaml.v2 v2.4.0 // indirect
7976
gopkg.in/yaml.v3 v3.0.1 // indirect
80-
k8s.io/apiextensions-apiserver v0.26.1 // indirect
81-
k8s.io/component-base v0.26.1 // indirect
82-
k8s.io/gengo v0.0.0-20220902162205-c0856e24416d // indirect
83-
k8s.io/klog/v2 v2.90.1 // indirect
84-
k8s.io/kube-openapi v0.0.0-20230308215209-15aac26d736a // indirect
85-
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
86-
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
87-
sigs.k8s.io/yaml v1.3.0 // indirect
77+
k8s.io/apiextensions-apiserver v0.36.0 // indirect
78+
k8s.io/gengo/v2 v2.0.0-20250922181213-ec3ebc5fd46b // indirect
79+
k8s.io/klog/v2 v2.140.0 // indirect
80+
k8s.io/kube-openapi v0.0.0-20260317180543-43fb72c5454a // indirect
81+
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect
82+
sigs.k8s.io/randfill v1.0.0 // indirect
83+
sigs.k8s.io/structured-merge-diff/v6 v6.3.2 // indirect
84+
sigs.k8s.io/yaml v1.6.0 // indirect
8885
)

0 commit comments

Comments
 (0)