Skip to content

Commit 3628098

Browse files
authored
Bump controller runtime (#1644)
* Bumping controller runtime Signed-off-by: Rohit Aggarwal <[email protected]> * Fixing generated files Signed-off-by: Rohit Aggarwal <[email protected]> --------- Signed-off-by: Rohit Aggarwal <[email protected]>
1 parent e8e5ce8 commit 3628098

File tree

1,859 files changed

+164739
-58465
lines changed

Some content is hidden

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

1,859 files changed

+164739
-58465
lines changed

.github/workflows/benchmark-action.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- uses: actions/[email protected]
2525
- uses: actions/setup-go@v5 # default version of go is 1.10
2626
with:
27-
go-version: 1.21.11
27+
go-version: 1.22.9
2828
- name: Install Carvel Tools
2929
run: ./hack/install-deps.sh
3030
# Run benchmark with `go test -bench` and stores the output to a file

.github/workflows/dependency-updater.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Set up Go 1.x
1717
uses: actions/setup-go@v5
1818
with:
19-
go-version: 1.21.11
19+
go-version: 1.22.9
2020
- name: Update Dependencies File
2121
run: go run ./hack/dependencies.go update
2222
- name: Create Pull Request

.github/workflows/golangci-lint.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ jobs:
2121
- name: Set up Go 1.x
2222
uses: actions/setup-go@v5
2323
with:
24-
go-version: 1.21.11
24+
go-version: 1.22.9
2525
- uses: actions/[email protected]
2626
with:
2727
fetch-depth: '0'
2828
- name: golangci-lint
2929
uses: golangci/[email protected]
3030
with:
31-
version: v1.52.2
31+
version: v1.58.1
3232
args: -v

.github/workflows/kind-action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
fetch-depth: 0
2828
- uses: actions/setup-go@v5 # default version of go is 1.10
2929
with:
30-
go-version: 1.21.11
30+
go-version: 1.22.9
3131
- name: Install Carvel Tools
3232
run: ./hack/install-deps.sh
3333
# Run benchmark with `go test -bench` and stores the output to a file

.github/workflows/release-process.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
- name: Set up Go 1.x
4040
uses: actions/setup-go@v5
4141
with:
42-
go-version: 1.21.11
42+
go-version: 1.22.9
4343

4444
- name: Set up Cosign
4545
uses: sigstore/[email protected]

.github/workflows/test-gh.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- name: Set up Go 1.x
2727
uses: actions/setup-go@v5
2828
with:
29-
go-version: 1.21.11
29+
go-version: 1.22.9
3030
- name: Check out code
3131
uses: actions/[email protected]
3232
with:

.github/workflows/test-kctrl-gh.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- name: Set up Go 1.x
2525
uses: actions/setup-go@v5
2626
with:
27-
go-version: 1.21.11
27+
go-version: 1.22.9
2828
- name: Check out code
2929
uses: actions/[email protected]
3030
with:

.github/workflows/trivy-scan.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ jobs:
7070
- name: Set up Go 1.x
7171
uses: actions/setup-go@v5
7272
with:
73-
go-version: 1.21.11
73+
go-version: 1.22.9
7474
- name: Build the kapp-controller artifacts
7575
run: |
7676
./hack/install-deps.sh

.github/workflows/upgrade-testing.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- name: Set up Go 1.x
2727
uses: actions/setup-go@v5
2828
with:
29-
go-version: 1.21.11
29+
go-version: 1.22.9
3030
- name: Check out code
3131
uses: actions/[email protected]
3232
- name: Install Carvel Tools

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM --platform=$BUILDPLATFORM golang:1.21.11 AS deps
1+
FROM --platform=$BUILDPLATFORM golang:1.22.9 AS deps
22

33
ARG TARGETOS TARGETARCH KCTRL_VER=development
44
WORKDIR /workspace

cmd/controller/run.go

+13-2
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ import (
3636
"sigs.k8s.io/controller-runtime/pkg/controller"
3737
"sigs.k8s.io/controller-runtime/pkg/manager"
3838
"sigs.k8s.io/controller-runtime/pkg/manager/signals"
39+
metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server"
3940
"sigs.k8s.io/controller-runtime/pkg/reconcile"
4041
)
4142

@@ -67,8 +68,18 @@ func Run(opts Options, runLog logr.Logger) error {
6768
restConfig.Timeout = opts.APIRequestTimeout
6869
}
6970

70-
mgr, err := manager.New(restConfig, manager.Options{Cache: cache.Options{Namespaces: []string{opts.Namespace}},
71-
Scheme: kcconfig.Scheme, MetricsBindAddress: opts.MetricsBindAddress})
71+
mgrOpts := manager.Options{
72+
Scheme: kcconfig.Scheme,
73+
Metrics: metricsserver.Options{BindAddress: opts.MetricsBindAddress},
74+
}
75+
76+
if opts.Namespace != "" {
77+
// Run in namespaced mode
78+
mgrOpts.Cache.DefaultNamespaces = make(map[string]cache.Config)
79+
mgrOpts.Cache.DefaultNamespaces[opts.Namespace] = cache.Config{}
80+
}
81+
82+
mgr, err := manager.New(restConfig, mgrOpts)
7283
if err != nil {
7384
return fmt.Errorf("Setting up overall controller manager: %s", err)
7485
}

config/config/rbac.yml

+1-4
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,7 @@ rules:
5555
resources: ["namespaces"]
5656
verbs: ["list", "watch", "get", "update"]
5757
- apiGroups: ["admissionregistration.k8s.io"]
58-
resources: ["mutatingwebhookconfigurations"]
59-
verbs: ["list", "watch"]
60-
- apiGroups: ["admissionregistration.k8s.io"]
61-
resources: ["validatingwebhookconfigurations"]
58+
resources: ["mutatingwebhookconfigurations", "validatingwebhookconfigurations", "validatingadmissionpolicies", "validatingadmissionpolicybindings"]
6259
verbs: ["list", "watch"]
6360
- apiGroups: ["authorization.k8s.io"]
6461
resources: ["subjectaccessreviews"]

go.mod

+63-65
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,77 @@
11
module carvel.dev/kapp-controller
22

3-
go 1.21
3+
go 1.22.9
44

55
require (
66
carvel.dev/vendir v0.40.0
77
github.com/fatih/color v1.15.0 // indirect
88
github.com/gogo/protobuf v1.3.2
9-
github.com/google/go-cmp v0.5.9 // indirect
10-
github.com/prometheus/client_golang v1.15.1
9+
github.com/google/go-cmp v0.6.0 // indirect
10+
github.com/prometheus/client_golang v1.18.0
1111
github.com/stretchr/testify v1.8.4
1212
golang.org/x/crypto v0.21.0
1313
golang.org/x/text v0.14.0 // indirect
14-
golang.org/x/tools v0.12.0
14+
golang.org/x/tools v0.18.0
1515
gopkg.in/yaml.v3 v3.0.1 // indirect
16-
k8s.io/api v0.27.7
17-
k8s.io/apimachinery v0.27.7
18-
k8s.io/apiserver v0.27.7
19-
k8s.io/client-go v0.27.7
20-
k8s.io/code-generator v0.27.7
16+
k8s.io/api v0.30.1
17+
k8s.io/apimachinery v0.30.1
18+
k8s.io/apiserver v0.30.1
19+
k8s.io/client-go v0.30.1
20+
k8s.io/code-generator v0.30.1
2121
k8s.io/kube-aggregator v0.22.17
22-
k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f
23-
sigs.k8s.io/controller-runtime v0.15.3
22+
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340
23+
sigs.k8s.io/controller-runtime v0.18.5
2424
sigs.k8s.io/controller-tools v0.7.0
2525
sigs.k8s.io/yaml v1.4.0
2626
)
2727

2828
require (
2929
github.com/blang/semver v3.5.1+incompatible
3030
github.com/cppforlife/go-cli-ui v0.0.0-20220425131040-94f26b16bc14
31-
github.com/go-logr/logr v1.2.4
31+
github.com/go-logr/logr v1.4.1
3232
github.com/k14s/semver/v4 v4.0.1-0.20210701191048-266d47ac6115
33-
github.com/prometheus/client_model v0.4.0
33+
github.com/prometheus/client_model v0.5.0
3434
github.com/spf13/cobra v1.7.0
35-
golang.org/x/sync v0.3.0
35+
golang.org/x/sync v0.6.0
3636
gopkg.in/yaml.v2 v2.4.0
37-
k8s.io/component-base v0.27.7
38-
k8s.io/klog/v2 v2.90.1
39-
k8s.io/utils v0.0.0-20230209194617-a36077c30491
37+
k8s.io/component-base v0.30.1
38+
k8s.io/klog/v2 v2.120.1
39+
k8s.io/utils v0.0.0-20230726121419-3b25d923346b
4040
)
4141

4242
require (
43-
cloud.google.com/go v0.110.4 // indirect
43+
cloud.google.com/go v0.110.6 // indirect
4444
github.com/NYTimes/gziphandler v1.1.1 // indirect
45-
github.com/antlr/antlr4/runtime/Go/antlr v1.4.10 // indirect
45+
github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df // indirect
4646
github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a // indirect
4747
github.com/beorn7/perks v1.0.1 // indirect
4848
github.com/blang/semver/v4 v4.0.0 // indirect
4949
github.com/carvel-dev/semver/v4 v4.0.1-0.20230221220520-8090ce423695 // indirect
50-
github.com/cenkalti/backoff/v4 v4.1.3 // indirect
50+
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
5151
github.com/cespare/xxhash/v2 v2.2.0 // indirect
52-
github.com/coreos/go-semver v0.3.0 // indirect
53-
github.com/coreos/go-systemd/v22 v22.4.0 // indirect
52+
github.com/coreos/go-semver v0.3.1 // indirect
53+
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
5454
github.com/cppforlife/color v1.9.1-0.20200716202919-6706ac40b835 // indirect
5555
github.com/davecgh/go-spew v1.1.1 // indirect
56-
github.com/emicklei/go-restful/v3 v3.10.1 // indirect
57-
github.com/evanphx/json-patch v4.12.0+incompatible // indirect
58-
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
56+
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
57+
github.com/evanphx/json-patch v5.6.0+incompatible // indirect
58+
github.com/evanphx/json-patch/v5 v5.9.0 // indirect
5959
github.com/felixge/httpsnoop v1.0.3 // indirect
60-
github.com/fsnotify/fsnotify v1.6.0 // indirect
60+
github.com/fsnotify/fsnotify v1.7.0 // indirect
6161
github.com/go-logr/stdr v1.2.2 // indirect
62-
github.com/go-logr/zapr v1.2.4 // indirect
62+
github.com/go-logr/zapr v1.3.0 // indirect
6363
github.com/go-openapi/jsonpointer v0.19.6 // indirect
64-
github.com/go-openapi/jsonreference v0.20.1 // indirect
64+
github.com/go-openapi/jsonreference v0.20.2 // indirect
6565
github.com/go-openapi/swag v0.22.3 // indirect
6666
github.com/gobuffalo/flect v0.2.3 // indirect
6767
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
68-
github.com/golang/protobuf v1.5.3 // indirect
69-
github.com/google/cel-go v0.12.7 // indirect
70-
github.com/google/gnostic v0.5.7-v3refs // indirect
71-
github.com/google/gofuzz v1.1.0 // indirect
68+
github.com/golang/protobuf v1.5.4 // indirect
69+
github.com/google/cel-go v0.17.8 // indirect
70+
github.com/google/gnostic-models v0.6.8 // indirect
71+
github.com/google/gofuzz v1.2.0 // indirect
7272
github.com/google/uuid v1.3.0 // indirect
7373
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect
74-
github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0 // indirect
74+
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect
7575
github.com/hashicorp/go-version v1.2.1 // indirect
7676
github.com/imdario/mergo v0.3.12 // indirect
7777
github.com/inconshreveable/mousetrap v1.1.0 // indirect
@@ -80,55 +80,53 @@ require (
8080
github.com/mailru/easyjson v0.7.7 // indirect
8181
github.com/mattn/go-colorable v0.1.13 // indirect
8282
github.com/mattn/go-isatty v0.0.20 // indirect
83-
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
84-
github.com/mitchellh/mapstructure v1.4.1 // indirect
83+
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect
8584
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
8685
github.com/modern-go/reflect2 v1.0.2 // indirect
8786
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
8887
github.com/pkg/errors v0.9.1 // indirect
8988
github.com/pmezard/go-difflib v1.0.0 // indirect
90-
github.com/prometheus/common v0.42.0 // indirect
91-
github.com/prometheus/procfs v0.9.0 // indirect
89+
github.com/prometheus/common v0.45.0 // indirect
90+
github.com/prometheus/procfs v0.12.0 // indirect
9291
github.com/spf13/pflag v1.0.5 // indirect
9392
github.com/stoewer/go-strcase v1.2.0 // indirect
9493
github.com/vito/go-interact v1.0.1 // indirect
95-
go.etcd.io/etcd/api/v3 v3.5.9 // indirect
96-
go.etcd.io/etcd/client/pkg/v3 v3.5.9 // indirect
97-
go.etcd.io/etcd/client/v3 v3.5.9 // indirect
98-
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.35.0 // indirect
99-
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.35.1 // indirect
100-
go.opentelemetry.io/otel v1.10.0 // indirect
101-
go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.10.0 // indirect
102-
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.10.0 // indirect
103-
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.10.0 // indirect
104-
go.opentelemetry.io/otel/metric v0.31.0 // indirect
105-
go.opentelemetry.io/otel/sdk v1.10.0 // indirect
106-
go.opentelemetry.io/otel/trace v1.10.0 // indirect
107-
go.opentelemetry.io/proto/otlp v0.19.0 // indirect
108-
go.uber.org/atomic v1.7.0 // indirect
109-
go.uber.org/multierr v1.6.0 // indirect
110-
go.uber.org/zap v1.24.0 // indirect
111-
golang.org/x/mod v0.12.0 // indirect
94+
go.etcd.io/etcd/api/v3 v3.5.10 // indirect
95+
go.etcd.io/etcd/client/pkg/v3 v3.5.10 // indirect
96+
go.etcd.io/etcd/client/v3 v3.5.10 // indirect
97+
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.42.0 // indirect
98+
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.44.0 // indirect
99+
go.opentelemetry.io/otel v1.19.0 // indirect
100+
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0 // indirect
101+
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.19.0 // indirect
102+
go.opentelemetry.io/otel/metric v1.19.0 // indirect
103+
go.opentelemetry.io/otel/sdk v1.19.0 // indirect
104+
go.opentelemetry.io/otel/trace v1.19.0 // indirect
105+
go.opentelemetry.io/proto/otlp v1.0.0 // indirect
106+
go.uber.org/multierr v1.11.0 // indirect
107+
go.uber.org/zap v1.26.0 // indirect
108+
golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect
109+
golang.org/x/mod v0.15.0 // indirect
112110
golang.org/x/net v0.23.0 // indirect
113-
golang.org/x/oauth2 v0.10.0 // indirect
111+
golang.org/x/oauth2 v0.12.0 // indirect
114112
golang.org/x/sys v0.18.0 // indirect
115113
golang.org/x/term v0.18.0 // indirect
116114
golang.org/x/time v0.3.0 // indirect
117-
gomodules.xyz/jsonpatch/v2 v2.3.0 // indirect
115+
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
118116
google.golang.org/appengine v1.6.7 // indirect
119-
google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98 // indirect
120-
google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98 // indirect
121-
google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect
117+
google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5 // indirect
118+
google.golang.org/genproto/googleapis/api v0.0.0-20230726155614-23370e0ffb3e // indirect
119+
google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect
122120
google.golang.org/grpc v1.58.3 // indirect
123121
google.golang.org/protobuf v1.33.0 // indirect
124122
gopkg.in/inf.v0 v0.9.1 // indirect
125-
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
126-
k8s.io/apiextensions-apiserver v0.27.7 // indirect
127-
k8s.io/gengo v0.0.0-20220902162205-c0856e24416d // indirect
128-
k8s.io/kms v0.27.7 // indirect
129-
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.1.2 // indirect
123+
gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
124+
k8s.io/apiextensions-apiserver v0.30.1 // indirect
125+
k8s.io/gengo/v2 v2.0.0-20240228010128-51d4e06bde70 // indirect
126+
k8s.io/kms v0.30.1 // indirect
127+
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.29.0 // indirect
130128
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
131-
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
129+
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
132130
)
133131

134132
replace cloud.google.com/go => cloud.google.com/go v0.60.0

0 commit comments

Comments
 (0)