Skip to content

Commit 507a756

Browse files
authored
Update deps for 0.19 (#283)
Update Go version to 1.25.6 golint fix: golangci-lint v2 requires the version: "2" field in the config — without it, it refuses to run. gcr.io/kubebuilder/kube-rbac-proxy image was moved to a different registry based on: https://github.com/kubernetes-sigs/kubebuilder/blob/master/designs/discontinue_usage_of_kube_rbac_proxy.md#summary Use `ObjectTracker` as a workaround with the new `controller-runtime` update in controllers/shipwrightbuild_controller_test.go Signed-off-by: Hasan Awad <hasan.m.awad94@gmail.com>
1 parent fabf485 commit 507a756

File tree

1,019 files changed

+82159
-95316
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,019 files changed

+82159
-95316
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,9 @@ jobs:
4949
- name: Verify OLM bundle
5050
run: make verify-bundle
5151
- name: Run golangci-lint
52-
uses: golangci/golangci-lint-action@v5
52+
uses: golangci/golangci-lint-action@v7
5353
with:
54+
version: v2.11.2
5455
args: --timeout=10m
5556
e2e:
5657
strategy:

.golangci.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
linters:
2-
enable:
3-
- gosec
1+
version: "2"
2+
3+
run:
4+
timeout: 10m

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ endif
7070
# Image URL to use all building/pushing image targets
7171
IMG ?= $(IMAGE_TAG_BASE):$(TAG)
7272
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
73-
ENVTEST_K8S_VERSION = 1.30
73+
ENVTEST_K8S_VERSION = 1.34
7474

7575
# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
7676
ifeq (,$(shell go env GOBIN))
@@ -213,7 +213,7 @@ kustomize: ## Download kustomize locally if necessary.
213213
$(call go-get-tool,$(KUSTOMIZE),sigs.k8s.io/kustomize/kustomize/v5@v5.5.0)
214214

215215
# Starting in 0.18, setup-envtest requires a golang that aligns with the associated k8s version
216-
# For k8s 1.33.z, the golang version is v1.25
216+
# For k8s 1.34.z, the golang version is v1.25
217217
ENVTEST = $(shell pwd)/bin/setup-envtest
218218
.PHONY: envtest
219219
envtest: ## Download envtest-setup locally if necessary.

bundle/manifests/shipwright-operator.clusterserviceversion.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@ spec:
565565
- --upstream=http://127.0.0.1:8080/
566566
- --logtostderr=true
567567
- --v=0
568-
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.8.0
568+
image: quay.io/brancz/kube-rbac-proxy:v0.18.1
569569
name: kube-rbac-proxy
570570
ports:
571571
- containerPort: 8443

config/default/manager_auth_proxy_patch.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ spec:
1010
spec:
1111
containers:
1212
- name: kube-rbac-proxy
13-
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.8.0
13+
image: quay.io/brancz/kube-rbac-proxy:v0.18.1
1414
args:
1515
- "--secure-listen-address=0.0.0.0:8443"
1616
- "--upstream=http://127.0.0.1:8080/"

controllers/shipwrightbuild_controller_test.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ import (
2121
"k8s.io/apimachinery/pkg/api/errors"
2222
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2323
"k8s.io/apimachinery/pkg/runtime"
24+
"k8s.io/apimachinery/pkg/runtime/serializer"
2425
"k8s.io/apimachinery/pkg/types"
26+
k8stesting "k8s.io/client-go/testing"
2527
"knative.dev/pkg/apis"
2628
duckv1 "knative.dev/pkg/apis/duck/v1"
2729
"sigs.k8s.io/controller-runtime/pkg/client"
@@ -51,9 +53,9 @@ func bootstrapShipwrightBuildReconciler(
5153
s.AddKnownTypes(buildv1alpha1.SchemeGroupVersion, &buildv1alpha1.ClusterBuildStrategy{})
5254

5355
logger := zap.New()
54-
clientBuilder := fake.NewClientBuilder().WithScheme(s).WithObjects(b)
56+
tracker := k8stesting.NewObjectTracker(s, serializer.NewCodecFactory(s).UniversalDecoder())
57+
clientBuilder := fake.NewClientBuilder().WithScheme(s).WithObjects(b).WithObjectTracker(tracker)
5558
if len(statusObjects) > 0 {
56-
// the fake client does not support the status subresource by default.
5759
clientBuilder = clientBuilder.WithStatusSubresource(statusObjects...)
5860
}
5961
c := clientBuilder.Build()

go.mod

Lines changed: 63 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,106 +1,113 @@
11
module github.com/shipwright-io/operator
22

3-
go 1.24.4
3+
go 1.25.6
44

55
require (
66
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2
77
github.com/go-logr/logr v1.4.3
88
github.com/manifestival/controller-runtime-client v0.4.0
99
github.com/manifestival/manifestival v0.7.2
10-
github.com/onsi/ginkgo/v2 v2.27.2
11-
github.com/onsi/gomega v1.38.2
12-
github.com/shipwright-io/build v0.18.0
10+
github.com/onsi/ginkgo/v2 v2.28.1
11+
github.com/onsi/gomega v1.39.1
12+
github.com/shipwright-io/build v0.19.0
1313
github.com/tektoncd/operator v0.77.0
1414
go.yaml.in/yaml/v3 v3.0.4
15-
k8s.io/api v0.33.6
16-
k8s.io/apiextensions-apiserver v0.33.6
17-
k8s.io/apimachinery v0.33.6
15+
k8s.io/api v0.35.1
16+
k8s.io/apiextensions-apiserver v0.34.4
17+
k8s.io/apimachinery v0.35.1
1818
// go mod tidy forces this to v1.5.2
1919
k8s.io/client-go v1.5.2
2020
knative.dev/pkg v0.0.0-20250424013628-d5e74d29daa3
21-
sigs.k8s.io/controller-runtime v0.21.0
21+
sigs.k8s.io/controller-runtime v0.22.5
2222
)
2323

2424
require (
2525
contrib.go.opencensus.io/exporter/ocagent v0.7.1-0.20230502190836-7399e0f8ee5e // indirect
2626
contrib.go.opencensus.io/exporter/prometheus v0.4.2 // indirect
2727
github.com/Masterminds/semver/v3 v3.4.0 // indirect
2828
github.com/beorn7/perks v1.0.1 // indirect
29-
github.com/blang/semver/v4 v4.0.0 // indirect
3029
github.com/blendle/zapdriver v1.3.1 // indirect
3130
github.com/census-instrumentation/opencensus-proto v0.4.1 // indirect
3231
github.com/cespare/xxhash/v2 v2.3.0 // indirect
3332
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
3433
github.com/emicklei/go-restful/v3 v3.12.2 // indirect
3534
github.com/evanphx/json-patch/v5 v5.9.11 // indirect
3635
github.com/fsnotify/fsnotify v1.9.0 // indirect
37-
github.com/fxamacker/cbor/v2 v2.8.0 // indirect
36+
github.com/fxamacker/cbor/v2 v2.9.0 // indirect
3837
github.com/go-logr/zapr v1.3.0 // indirect
39-
github.com/go-openapi/jsonpointer v0.21.1 // indirect
40-
github.com/go-openapi/jsonreference v0.21.0 // indirect
41-
github.com/go-openapi/swag v0.23.1 // indirect
38+
github.com/go-openapi/jsonpointer v0.22.4 // indirect
39+
github.com/go-openapi/jsonreference v0.21.4 // indirect
40+
github.com/go-openapi/swag v0.25.4 // indirect
41+
github.com/go-openapi/swag/cmdutils v0.25.4 // indirect
42+
github.com/go-openapi/swag/conv v0.25.4 // indirect
43+
github.com/go-openapi/swag/fileutils v0.25.4 // indirect
44+
github.com/go-openapi/swag/jsonname v0.25.4 // indirect
45+
github.com/go-openapi/swag/jsonutils v0.25.4 // indirect
46+
github.com/go-openapi/swag/loading v0.25.4 // indirect
47+
github.com/go-openapi/swag/mangling v0.25.4 // indirect
48+
github.com/go-openapi/swag/netutils v0.25.4 // indirect
49+
github.com/go-openapi/swag/stringutils v0.25.4 // indirect
50+
github.com/go-openapi/swag/typeutils v0.25.4 // indirect
51+
github.com/go-openapi/swag/yamlutils v0.25.4 // indirect
4252
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
4353
github.com/gogo/protobuf v1.3.2 // indirect
4454
github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 // indirect
4555
github.com/golang/protobuf v1.5.4 // indirect
4656
github.com/google/btree v1.1.3 // indirect
47-
github.com/google/gnostic-models v0.6.9 // indirect
57+
github.com/google/gnostic-models v0.7.0 // indirect
4858
github.com/google/go-cmp v0.7.0 // indirect
49-
github.com/google/pprof v0.0.0-20250820193118-f64d9cf942d6 // indirect
59+
github.com/google/pprof v0.0.0-20260115054156-294ebfa9ad83 // indirect
5060
github.com/google/uuid v1.6.0 // indirect
5161
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.1 // indirect
5262
github.com/hashicorp/golang-lru v1.0.2 // indirect
53-
github.com/josharian/intern v1.0.0 // indirect
5463
github.com/json-iterator/go v1.1.12 // indirect
5564
github.com/kelseyhightower/envconfig v1.4.0 // indirect
56-
github.com/mailru/easyjson v0.9.0 // indirect
5765
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
58-
github.com/modern-go/reflect2 v1.0.2 // indirect
66+
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect
5967
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
6068
github.com/openshift-pipelines/pipelines-as-code v0.36.0 // indirect
6169
github.com/openshift-pipelines/tektoncd-pruner v0.0.0-20250711075231-9c8624123820 // indirect
62-
github.com/openshift/api v0.0.0-20240521185306-0314f31e7774 // indirect
70+
github.com/openshift/api v0.0.0-20260302174620-dcac36b908db // indirect
6371
github.com/openshift/apiserver-library-go v0.0.0-20230816171015-6bfafa975bfb // indirect
64-
github.com/openshift/client-go v0.0.0-20240523113335-452272e0496d // indirect
65-
github.com/pkg/errors v0.9.1 // indirect
72+
github.com/openshift/client-go v0.0.0-20251015124057-db0dee36e235 // indirect
73+
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
6674
github.com/prometheus/client_golang v1.23.2 // indirect
6775
github.com/prometheus/client_model v0.6.2 // indirect
6876
github.com/prometheus/common v0.66.1 // indirect
6977
github.com/prometheus/procfs v0.16.1 // indirect
7078
github.com/prometheus/statsd_exporter v0.28.0 // indirect
7179
github.com/spf13/pflag v1.0.10 // indirect
72-
github.com/tektoncd/pipeline v1.6.0 // indirect
80+
github.com/tektoncd/pipeline v1.9.1 // indirect
7381
github.com/tektoncd/triggers v0.32.0 // indirect
7482
github.com/x448/float16 v0.8.4 // indirect
7583
go.opencensus.io v0.24.0 // indirect
7684
go.uber.org/multierr v1.11.0 // indirect
7785
go.uber.org/zap v1.27.1 // indirect
78-
go.yaml.in/yaml/v2 v2.4.2 // indirect
79-
golang.org/x/mod v0.29.0 // indirect
80-
golang.org/x/net v0.47.0 // indirect
81-
golang.org/x/oauth2 v0.30.0 // indirect
82-
golang.org/x/sync v0.18.0 // indirect
83-
golang.org/x/sys v0.38.0 // indirect
84-
golang.org/x/term v0.37.0 // indirect
85-
golang.org/x/text v0.31.0 // indirect
86-
golang.org/x/time v0.12.0 // indirect
87-
golang.org/x/tools v0.38.0 // indirect
86+
go.yaml.in/yaml/v2 v2.4.3 // indirect
87+
golang.org/x/mod v0.33.0 // indirect
88+
golang.org/x/net v0.51.0 // indirect
89+
golang.org/x/oauth2 v0.35.0 // indirect
90+
golang.org/x/sync v0.19.0 // indirect
91+
golang.org/x/sys v0.41.0 // indirect
92+
golang.org/x/term v0.40.0 // indirect
93+
golang.org/x/text v0.34.0 // indirect
94+
golang.org/x/time v0.14.0 // indirect
95+
golang.org/x/tools v0.42.0 // indirect
8896
gomodules.xyz/jsonpatch/v2 v2.5.0 // indirect
8997
google.golang.org/api v0.237.0 // indirect
90-
google.golang.org/genproto/googleapis/api v0.0.0-20250707201910-8d1bb00bc6a7 // indirect
91-
google.golang.org/genproto/googleapis/rpc v0.0.0-20250707201910-8d1bb00bc6a7 // indirect
92-
google.golang.org/grpc v1.75.0 // indirect
93-
google.golang.org/protobuf v1.36.10 // indirect
94-
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
98+
google.golang.org/genproto/googleapis/api v0.0.0-20251022142026-3a174f9686a8 // indirect
99+
google.golang.org/genproto/googleapis/rpc v0.0.0-20251022142026-3a174f9686a8 // indirect
100+
google.golang.org/grpc v1.77.0 // indirect
101+
google.golang.org/protobuf v1.36.11 // indirect
102+
gopkg.in/evanphx/json-patch.v4 v4.13.0 // indirect
95103
gopkg.in/inf.v0 v0.9.1 // indirect
96104
gopkg.in/yaml.v2 v2.4.0 // indirect
97-
gopkg.in/yaml.v3 v3.0.1 // indirect
98105
k8s.io/klog/v2 v2.130.1 // indirect
99-
k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff // indirect
100-
k8s.io/utils v0.0.0-20250502105355-0f33e8f1c979 // indirect
101-
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect
106+
k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912 // indirect
107+
k8s.io/utils v0.0.0-20251002143259-bc988d571ff4 // indirect
108+
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect
102109
sigs.k8s.io/randfill v1.0.0 // indirect
103-
sigs.k8s.io/structured-merge-diff/v4 v4.7.0 // indirect
110+
sigs.k8s.io/structured-merge-diff/v6 v6.3.0 // indirect
104111
sigs.k8s.io/yaml v1.6.0 // indirect
105112
)
106113

@@ -115,4 +122,17 @@ require (
115122
// go module version standardization (v0.y.z, with y and z representing the k8s 1.y.z minor/patch
116123
// versions). `go mod tidy` will often overwrite the desired client-go version to v1.5.2, so we
117124
// pin the version here.
118-
replace k8s.io/client-go => k8s.io/client-go v0.33.6
125+
replace k8s.io/client-go => k8s.io/client-go v0.34.4
126+
127+
// openshift packages pulled in by tektoncd/operator use structured-merge-diff/v4, which is
128+
// incompatible with k8s 1.34+ (structured-merge-diff/v6). Pin to newer versions that use v6.
129+
// The openshift @latest targets k8s 1.35, so we also pin k8s.io/api and k8s.io/apimachinery
130+
// to prevent MVS from upgrading them beyond 1.34.
131+
replace (
132+
github.com/openshift/api => github.com/openshift/api v0.0.0-20260302174620-dcac36b908db
133+
github.com/openshift/apiserver-library-go => github.com/openshift/apiserver-library-go v0.0.0-20260123124658-a67c1b7813a4
134+
github.com/openshift/client-go => github.com/openshift/client-go v0.0.0-20260302182750-20813ce71ca6
135+
k8s.io/api => k8s.io/api v0.34.4
136+
k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.34.4
137+
k8s.io/apimachinery => k8s.io/apimachinery v0.34.4
138+
)

0 commit comments

Comments
 (0)