Skip to content

Commit 7efd291

Browse files
authored
ACM-27507: Upgrade Hive to fe9c66be8e113d4268ab744ca708860d0b4cc6e1 (#795)
* ACM-27507: Upgrade API go.mod versions In preparation to upgrade hive in the base repo's go.mod * ACM-27507: Upgrade Hive version Upgrade Hive API version to fe9c66be8e113d4268ab744ca708860d0b4cc6e1 Prevents mismatch in hive version deployed in the hub cluster. * ACM-27507: Upgrade assisted-service API and model to 33a19884b7a7 Prevents deprecated webhook error during code-gen * ACM-27507: Upgrade controller-gen version to 0.19.0 * ACM-27507: Upgrade golangci-lint to v2.6.2 * ACM-27507: Fix linter errors after golanci-lint upgrade * ACM-27507: Update dockerfiles Use the go 1.24 image as a builder and update the ARG to match the MCE version. * ACM-27507: Name controllers to prevent validation error New validation requires controllers to have unique names, otherwise the application will go into crashloopbackoff. Explicitly name controllers since starting multiple controllers without names will auto-name them all the same thing, causing this error. * ACM-27507: Update .ci-operator.yaml file Ensures that the golang version for the CI build jobs match the target version in the repo. * ACM-27507: Generate manifests after upgrade
1 parent 47af286 commit 7efd291

File tree

6,799 files changed

+554369
-710420
lines changed

Some content is hidden

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

6,799 files changed

+554369
-710420
lines changed

.ci-operator.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
build_root_image:
22
name: release
33
namespace: openshift
4-
tag: golang-1.20
4+
tag: rhel-9-release-golang-1.24-openshift-4.21

.golangci.yml

Lines changed: 48 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,63 @@
1-
# This file contains all available configuration options
2-
# with their default values.
3-
4-
# options for analysis running
5-
run:
6-
# default concurrency is a available CPU number
7-
concurrency: 4
8-
9-
# timeout for analysis, e.g. 30s, 5m, default is 1m
1+
version: 2
2+
run:
3+
go: "1.24"
104
timeout: 10m
5+
allow-parallel-runners: true
6+
concurrency: 4
117

12-
# exit code when at least one issue was found, default is 1
13-
issues-exit-code: 1
14-
15-
# include test files or not, default is true
16-
tests: true
8+
linters:
9+
default: none
10+
enable:
11+
- errcheck
12+
- govet
13+
- gocyclo
14+
- gosec
15+
- unconvert
16+
- ineffassign
17+
- misspell
18+
- unused
19+
settings:
20+
govet:
21+
enable:
22+
- shadow
23+
settings:
24+
printf:
25+
funcs:
26+
- Infof
27+
- Warnf
28+
- Errorf
29+
- Fatalf
1730

1831
# which dirs to skip: issues from them won't be reported;
1932
# can use regexp here: generated.*, regexp is applied on full path;
2033
# default value is empty list, but default dirs are skipped independently
2134
# from this option's value (see skip-dirs-use-default).
22-
skip-dirs:
23-
- build
24-
- client
25-
- docs
26-
- models
27-
- restapi
28-
- api
29-
30-
# output configuration options
31-
output:
32-
# colored-line-number|line-number|json|tab|checkstyle|code-climate, default is "colored-line-number"
33-
format: colored-line-number
34-
35-
# print lines of code with issue, default is true
36-
print-issued-lines: true
37-
38-
# print linter name in the end of issue text, default is true
39-
print-linter-name: true
40-
41-
# make issues output unique by line, default is true
42-
uniq-by-line: true
35+
exclusions:
36+
paths:
37+
- build
38+
- client
39+
- docs
40+
- models
41+
- restapi
42+
- api
4343

4444
issues:
45-
# List of regexps of issue texts to exclude, empty list by default.
46-
# But independently from this option we use default exclude patterns,
47-
# it can be disabled by `exclude-use-default: false`. To list all
48-
# excluded by default patterns execute `golangci-lint run --help`
49-
exclude:
50-
- G107
51-
- G402 # support object store DisableSSL
52-
- G108
45+
uniq-by-line: true
5346

54-
linters:
47+
formatters:
5548
enable:
56-
- megacheck
57-
- govet
58-
- gocyclo
5949
- gofmt
60-
- gosec
61-
- megacheck
62-
- unconvert
6350
- gci
6451
- goimports
65-
- exportloopref
52+
settings:
53+
gofmt:
54+
simplify: false
6655

67-
linters-settings:
68-
govet:
69-
check-shadowing: true
70-
71-
settings:
72-
printf:
73-
funcs:
74-
- Infof
75-
- Warnf
76-
- Errorf
77-
- Fatalf
56+
# output configuration options
57+
output:
58+
formats:
59+
text:
60+
path: stdout
61+
print-linter-name: true
62+
print-issued-lines: true
63+
colors: true

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Build the manager binary
2-
FROM registry.access.redhat.com/ubi9/go-toolset:1.21 as builder
2+
FROM registry.access.redhat.com/ubi9/go-toolset:1.24 AS builder
33

44
USER 0
55

Dockerfile.rhtap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Build the manager binary
2-
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_9_1.23 as builder
2+
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_9_1.24 as builder
33

44
WORKDIR /workspace
55
COPY . .
@@ -8,7 +8,7 @@ RUN CGO_ENABLED=1 go build -a -o manager main.go
88

99
FROM registry.redhat.io/rhel9-2-els/rhel:9.2
1010

11-
ARG version=2.11
11+
ARG version=2.7
1212

1313
LABEL \
1414
name="cluster-api-provider-agent" \

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ undeploy: ## Undeploy controller from the K8s cluster specified in ~/.kube/confi
147147

148148
CONTROLLER_GEN = $(shell pwd)/bin/controller-gen
149149
controller-gen: ## Download controller-gen locally if necessary.
150-
$(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.14.0)
150+
$(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.19.0)
151151

152152
KUSTOMIZE = $(shell pwd)/bin/kustomize
153153
kustomize: ## Download kustomize locally if necessary.
@@ -163,7 +163,7 @@ mockgen: ## Download mockgen locally if necessary.
163163

164164
GOLINT = $(shell pwd)/bin/golangci-lint
165165
golint: ## Download golangci-lint locally if necessary.
166-
$(call go-get-tool,$(GOLINT),github.com/golangci/golangci-lint/cmd/golangci-lint@v1.54.0)
166+
$(call go-get-tool,$(GOLINT),github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.6.2)
167167

168168
# go-get-tool will 'go get' any package $2 and install it to $1.
169169
PROJECT_DIR := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST))))

api/go.mod

Lines changed: 30 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,47 @@
11
module github.com/openshift/cluster-api-provider-agent/api
22

3-
go 1.21
3+
go 1.24.0
4+
5+
toolchain go1.24.2
46

57
require (
6-
github.com/openshift/api v0.0.0-20230915112357-693d4b64813c
7-
k8s.io/apimachinery v0.28.2
8-
k8s.io/client-go v0.23.0
9-
sigs.k8s.io/cluster-api v1.0.0
10-
sigs.k8s.io/controller-runtime v0.11.1
8+
github.com/openshift/api v0.0.0-20240830023148-b7d0481c9094
9+
k8s.io/apimachinery v0.34.2
10+
k8s.io/client-go v0.34.2
11+
sigs.k8s.io/cluster-api v1.10.0
12+
sigs.k8s.io/controller-runtime v0.22.4
1113
)
1214

1315
require (
14-
github.com/beorn7/perks v1.0.1 // indirect
15-
github.com/blang/semver v3.5.1+incompatible // indirect
16-
github.com/cespare/xxhash/v2 v2.1.1 // indirect
17-
github.com/davecgh/go-spew v1.1.1 // indirect
18-
github.com/evanphx/json-patch v4.12.0+incompatible // indirect
19-
github.com/fsnotify/fsnotify v1.5.1 // indirect
20-
github.com/go-logr/logr v1.2.4 // indirect
21-
github.com/go-openapi/jsonpointer v0.19.6 // indirect
16+
github.com/emicklei/go-restful/v3 v3.12.2 // indirect
17+
github.com/fxamacker/cbor/v2 v2.9.0 // indirect
18+
github.com/go-logr/logr v1.4.2 // indirect
19+
github.com/go-openapi/jsonpointer v0.21.0 // indirect
2220
github.com/go-openapi/jsonreference v0.20.2 // indirect
23-
github.com/go-openapi/swag v0.22.3 // indirect
21+
github.com/go-openapi/swag v0.23.0 // indirect
2422
github.com/gogo/protobuf v1.3.2 // indirect
25-
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
26-
github.com/golang/protobuf v1.5.3 // indirect
27-
github.com/google/gnostic-models v0.6.8 // indirect
28-
github.com/google/go-cmp v0.5.9 // indirect
29-
github.com/google/gofuzz v1.2.0 // indirect
30-
github.com/google/uuid v1.3.0 // indirect
31-
github.com/googleapis/gnostic v0.5.5 // indirect
32-
github.com/imdario/mergo v0.3.12 // indirect
23+
github.com/google/gnostic-models v0.7.0 // indirect
3324
github.com/josharian/intern v1.0.0 // indirect
3425
github.com/json-iterator/go v1.1.12 // indirect
3526
github.com/mailru/easyjson v0.7.7 // indirect
36-
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
3727
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
38-
github.com/modern-go/reflect2 v1.0.2 // indirect
28+
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect
3929
github.com/pkg/errors v0.9.1 // indirect
40-
github.com/prometheus/client_golang v1.11.0 // indirect
41-
github.com/prometheus/client_model v0.2.0 // indirect
42-
github.com/prometheus/common v0.28.0 // indirect
43-
github.com/prometheus/procfs v0.6.0 // indirect
44-
github.com/spf13/pflag v1.0.5 // indirect
45-
golang.org/x/net v0.13.0 // indirect
46-
golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f // indirect
47-
golang.org/x/sys v0.10.0 // indirect
48-
golang.org/x/term v0.10.0 // indirect
49-
golang.org/x/text v0.11.0 // indirect
50-
golang.org/x/time v0.3.0 // indirect
51-
gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect
52-
google.golang.org/appengine v1.6.7 // indirect
53-
google.golang.org/protobuf v1.30.0 // indirect
30+
github.com/x448/float16 v0.8.4 // indirect
31+
go.yaml.in/yaml/v2 v2.4.2 // indirect
32+
go.yaml.in/yaml/v3 v3.0.4 // indirect
33+
golang.org/x/net v0.38.0 // indirect
34+
golang.org/x/text v0.23.0 // indirect
35+
google.golang.org/protobuf v1.36.5 // indirect
5436
gopkg.in/inf.v0 v0.9.1 // indirect
55-
gopkg.in/yaml.v2 v2.4.0 // indirect
5637
gopkg.in/yaml.v3 v3.0.1 // indirect
57-
k8s.io/api v0.28.2 // indirect
58-
k8s.io/apiextensions-apiserver v0.23.0 // indirect
59-
k8s.io/component-base v0.23.0 // indirect
60-
k8s.io/klog/v2 v2.100.1 // indirect
61-
k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect
62-
k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 // indirect
63-
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
64-
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
65-
sigs.k8s.io/yaml v1.3.0 // indirect
38+
k8s.io/api v0.34.2 // indirect
39+
k8s.io/apiextensions-apiserver v0.34.1 // indirect
40+
k8s.io/klog/v2 v2.130.1 // indirect
41+
k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b // indirect
42+
k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 // indirect
43+
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect
44+
sigs.k8s.io/randfill v1.0.0 // indirect
45+
sigs.k8s.io/structured-merge-diff/v6 v6.3.0 // indirect
46+
sigs.k8s.io/yaml v1.6.0 // indirect
6647
)

0 commit comments

Comments
 (0)