Skip to content

Commit ef41a75

Browse files
authored
Chore: Update gardener and dependencies (gardener#254)
* Update gardener go.mod * Upgrade golanci-lint to v2 * Lint: ginkgo * Lint: staticcheck * Lint: unparam * Lint: whitespace * Update gophercloud sdk * Update golang to 1.24 * Make tidy * Wrong assertions * Update ginkgo
1 parent afb286f commit ef41a75

14 files changed

Lines changed: 290 additions & 294 deletions

File tree

.ci/hack/component_descriptor

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -77,27 +77,4 @@ if [[ ! -z "$image_vector_path" ]]; then
7777
component-cli image-vector add ${COMPONENT_CLI_ARGS}
7878
fi
7979

80-
if [[ -d "$repo_root_dir/charts/" ]]; then
81-
for image_tpl_path in "$repo_root_dir/charts/"*"/templates/_images.tpl"; do
82-
if [[ ! -f "$image_tpl_path" ]]; then
83-
continue
84-
fi
85-
86-
outputFile=$(sed 's/{{-//' $image_tpl_path | sed 's/}}//' | sed 's/define//' | sed 's/-//' | sed 's/end//' | sed 's/"//' | sed 's/"//' |sed 's/image.//' | sed -e 's/^[ \t]*//' | awk -v RS= '{for (i=1; i<=NF; i++) printf "%s%s", $i, (i==NF?"\n":" ")}')
87-
echo "enriching component descriptor from ${image_tpl_path}"
88-
89-
while read p; do
90-
line="$(echo -e "$p")"
91-
IFS=' ' read -r -a array <<< "$line"
92-
IFS=': ' read -r -a imageAndTag <<< ${array[1]}
93-
94-
NAME=${array[0]}
95-
REPOSITORY=${imageAndTag[0]}
96-
TAG=${imageAndTag[1]}
97-
98-
${ADD_DEPENDENCIES_CMD} --container-image-dependencies "{\"name\": \"${NAME}\", \"image_reference\": \"${REPOSITORY}:${TAG}\", \"version\": \"$TAG\"}"
99-
done < <(echo "$outputFile")
100-
done
101-
fi
102-
10380
cp "${BASE_DEFINITION_PATH}" "${descriptor_out_file}"

.ci/pipeline_definitions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ machine-controller-manager-provider-openstack:
3030
ocm_repository: europe-docker.pkg.dev/gardener-project/releases
3131
update_component_deps:
3232
set_dependency_version_script_container_image:
33-
image_reference: 'golang:1.23'
33+
image_reference: 'golang:1.24'
3434
head-update:
3535
traits:
3636
component_descriptor:

.github/ISSUE_TEMPLATE/support.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ STOP -- PLEASE READ!
99
1010
GitHub is not the right place for support requests.
1111
12-
If you're looking for help, please post your question on the [Kubernetes Slack](http://slack.k8s.io/) ([#gardener](https://kubernetes.slack.com/messages/gardener) channel) or join our [bi-weekly meetings](https://gardener.cloud/docs/contribute/#bi-weekly-meetings).
12+
If you're looking for help, please post your question on the [Gardener Slack](https://gardener-cloud.slack.com/) (join the workspace [here](https://gardener.cloud/community/community-bio/)) or join our [bi-weekly meetings](https://gardener.cloud/community/).
1313
-->

.golangci.yaml

Lines changed: 88 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,93 @@
1-
# SPDX-FileCopyrightText: 2021 SAP SE or an SAP affiliate company and Gardener contributors
2-
#
3-
# SPDX-License-Identifier: Apache-2.0
4-
1+
version: "2"
52
run:
63
concurrency: 4
7-
deadline: 10m
8-
94
linters:
10-
disable:
11-
- unused
125
enable:
13-
- revive
14-
15-
skip-files:
16-
- "zz_generated\\..*\\.go$"
17-
6+
- ginkgolinter
7+
- importas
8+
- misspell
9+
- nilerr
10+
- revive
11+
- unconvert
12+
- unparam
13+
- whitespace
14+
settings:
15+
importas:
16+
alias:
17+
# External imported packages
18+
- pkg: k8s.io/api/(\w+)/(v[\w\d]+)
19+
alias: $1$2
20+
- pkg: k8s.io/apimachinery/pkg/apis/(\w+)/(v[\w\d]+)
21+
alias: $1$2
22+
- pkg: k8s.io/apimachinery/pkg/api/([^m]\w+)
23+
alias: api${1}
24+
- pkg: k8s.io/apimachinery/pkg/util/(\w+)
25+
alias: util${1}
26+
- pkg: go.uber.org/mock/gomock
27+
alias: gmock
28+
loggercheck:
29+
require-string-key: true
30+
no-printf-like: true
31+
misspell:
32+
mode: restricted # only check comments
33+
revive:
34+
rules:
35+
- name: duplicated-imports
36+
- name: unused-parameter
37+
- name: unreachable-code
38+
- name: context-as-argument
39+
- name: early-return
40+
- name: exported
41+
exclusions:
42+
generated: lax
43+
rules:
44+
- linters:
45+
- staticcheck
46+
text: 'SA1019:' # Excludes messages where deprecated variables are used
47+
- linters:
48+
- staticcheck
49+
text: 'ST1001:' # should not use dot imports
50+
# errcheck: Almost all programs ignore errors on these functions and in most cases it's ok
51+
- path: (.+)\.go$
52+
text: Error return value of .((os\.)?std(out|err)\..*|.*Close|.*Flush|os\.Remove(All)?|.*print(f|ln)?|os\.(Un)?Setenv). is not checked
53+
# revive:
54+
- path: (.+)\.go$
55+
text: var-naming # ((var|const|struct field|func) .* should be .*
56+
- path: (.+)\.go$
57+
text: dot-imports # should not use dot imports
58+
- path: (.+)\.go$
59+
text: package-comments # package comment should be of the form
60+
- path: (.+)\.go$
61+
text: unexported-return # exported func .* returns unexported type .*, which can be annoying to use
62+
- path: (.+)\.go$
63+
text: indent-error-flow # if block ends with a return statement, so drop this else and outdent its block
64+
- path: (.+)\.go$
65+
text: 'exported: (type|func) name will be used as .* by other packages, and that stutters;'
66+
- path: (.+)\.go$
67+
text: exported function Convert_.* should have comment or be unexported
68+
- path: (.+)\.go$
69+
text: redundant-import-alias
70+
# typecheck:
71+
- path: (.+)\.go$
72+
text: 'undeclared name: `.*`'
73+
- path: (.+)\.go$
74+
text: '".*" imported but not used'
75+
# allow non-capitalized messages if they start with technical terms
76+
- path: (.+)\.go$
77+
text: 'structured logging message should be capitalized: "garden(er-apiserver|er-controller-manager|er-admission-controller|er-operator|er-resource-manager|let)'
78+
paths:
79+
- zz_generated\..*\.go$
80+
- examples$
81+
formatters: # how code formatting is handled
82+
settings:
83+
gofmt:
84+
rewrite-rules:
85+
- pattern: interface{}
86+
replacement: any
87+
exclusions:
88+
generated: lax
89+
paths:
90+
- examples$
1891
issues:
19-
exclude-use-default: false
20-
exclude:
21-
# revive
22-
- var-naming # ((var|const|struct field|func) .* should be .*
23-
- dot-imports # should not use dot imports
24-
- package-comments # package comment should be of the form
25-
- indent-error-flow # if block ends with a return statement, so drop this else and outdent its block
26-
- unexported-return # exported func .* returns unexported type .*, which can be annoying to use
27-
- "exported: (type|func) name will be used as .* by other packages, and that stutters;"
28-
# typecheck:
29-
- "undeclared name: `.*`"
30-
- "\".*\" imported but not used"
31-
exclude-rules:
32-
- linters:
33-
- staticcheck
34-
text: "SA1019:" # Excludes messages where deprecated variables are used
92+
max-issues-per-linter: 0 # A value of 0 means no limit
93+
max-same-issues: 0 # A value of 0 means no limit

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# SPDX-License-Identifier: Apache-2.0
44

55
############# builder #############
6-
FROM golang:1.23.1 AS builder
6+
FROM golang:1.24.1 AS builder
77

88
WORKDIR /go/src/github.com/gardener/machine-controller-manager-provider-openstack
99
COPY . .

go.mod

Lines changed: 49 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,28 @@
11
module github.com/gardener/machine-controller-manager-provider-openstack
22

3-
go 1.23.1
3+
go 1.24.0
4+
5+
toolchain go1.24.1
46

57
require (
68
github.com/ahmetb/gen-crd-api-reference-docs v0.3.0
7-
github.com/gardener/gardener v1.110.1
8-
github.com/gardener/machine-controller-manager v0.55.1
9-
github.com/gophercloud/gophercloud v1.11.0
9+
github.com/gardener/gardener v1.117.0
10+
github.com/gardener/machine-controller-manager v0.57.2
11+
github.com/gophercloud/gophercloud v1.14.1
1012
github.com/gophercloud/utils v0.0.0-20230523080330-de873b9cf00d
11-
github.com/onsi/ginkgo v1.16.5
12-
github.com/onsi/ginkgo/v2 v2.22.0
13-
github.com/onsi/gomega v1.36.0
14-
github.com/prometheus/client_golang v1.20.5
15-
github.com/spf13/pflag v1.0.5
16-
go.uber.org/mock v0.5.0
13+
github.com/onsi/ginkgo/v2 v2.23.4
14+
github.com/onsi/gomega v1.37.0
15+
github.com/prometheus/client_golang v1.22.0
16+
github.com/spf13/pflag v1.0.6
17+
go.uber.org/mock v0.5.1
1718
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616
18-
k8s.io/api v0.31.3
19-
k8s.io/apimachinery v0.31.3
20-
k8s.io/code-generator v0.31.3
21-
k8s.io/component-base v0.31.3
19+
k8s.io/api v0.32.3
20+
k8s.io/apimachinery v0.32.3
21+
k8s.io/code-generator v0.32.3
22+
k8s.io/component-base v0.32.3
2223
k8s.io/klog/v2 v2.130.1
23-
k8s.io/utils v0.0.0-20241210054802-24370beab758
24-
sigs.k8s.io/controller-runtime v0.19.3
24+
k8s.io/utils v0.0.0-20250321185631-1f6e0b77f77e
25+
sigs.k8s.io/controller-runtime v0.20.4
2526
)
2627

2728
require (
@@ -31,32 +32,30 @@ require (
3132
github.com/cespare/xxhash/v2 v2.3.0 // indirect
3233
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
3334
github.com/emicklei/go-restful/v3 v3.12.1 // indirect
34-
github.com/evanphx/json-patch/v5 v5.9.0 // indirect
35+
github.com/evanphx/json-patch/v5 v5.9.11 // indirect
3536
github.com/fatih/color v1.18.0 // indirect
37+
github.com/fsnotify/fsnotify v1.8.0 // indirect
3638
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
3739
github.com/go-logr/logr v1.4.2 // indirect
38-
github.com/go-logr/zapr v1.3.0 // indirect
3940
github.com/go-openapi/jsonpointer v0.21.0 // indirect
4041
github.com/go-openapi/jsonreference v0.21.0 // indirect
4142
github.com/go-openapi/swag v0.23.0 // indirect
4243
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
4344
github.com/gobuffalo/flect v1.0.3 // indirect
4445
github.com/gogo/protobuf v1.3.2 // indirect
45-
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
4646
github.com/golang/protobuf v1.5.4 // indirect
47-
github.com/google/gnostic-models v0.6.8 // indirect
48-
github.com/google/go-cmp v0.6.0 // indirect
47+
github.com/google/btree v1.1.3 // indirect
48+
github.com/google/gnostic-models v0.6.9 // indirect
49+
github.com/google/go-cmp v0.7.0 // indirect
4950
github.com/google/gofuzz v1.2.0 // indirect
50-
github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db // indirect
51+
github.com/google/pprof v0.0.0-20250403155104-27863c87afa6 // indirect
5152
github.com/google/uuid v1.6.0 // indirect
5253
github.com/hashicorp/go-uuid v1.0.3 // indirect
53-
github.com/imdario/mergo v0.3.16 // indirect
5454
github.com/inconshreveable/mousetrap v1.1.0 // indirect
5555
github.com/ironcore-dev/vgopath v0.1.5 // indirect
5656
github.com/josharian/intern v1.0.0 // indirect
5757
github.com/json-iterator/go v1.1.12 // indirect
58-
github.com/klauspost/compress v1.17.9 // indirect
59-
github.com/mailru/easyjson v0.7.7 // indirect
58+
github.com/mailru/easyjson v0.9.0 // indirect
6059
github.com/mattn/go-colorable v0.1.13 // indirect
6160
github.com/mattn/go-isatty v0.0.20 // indirect
6261
github.com/mitchellh/go-homedir v1.1.0 // indirect
@@ -65,42 +64,40 @@ require (
6564
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
6665
github.com/pkg/errors v0.9.1 // indirect
6766
github.com/prometheus/client_model v0.6.1 // indirect
68-
github.com/prometheus/common v0.61.0 // indirect
67+
github.com/prometheus/common v0.63.0 // indirect
6968
github.com/prometheus/procfs v0.15.1 // indirect
7069
github.com/russross/blackfriday/v2 v2.1.0 // indirect
71-
github.com/spf13/afero v1.11.0 // indirect
72-
github.com/spf13/cobra v1.8.1 // indirect
70+
github.com/spf13/cobra v1.9.1 // indirect
7371
github.com/x448/float16 v0.8.4 // indirect
74-
go.uber.org/multierr v1.11.0 // indirect
75-
go.uber.org/zap v1.27.0 // indirect
76-
golang.org/x/exp v0.0.0-20241204233417-43b7b7cde48d // indirect
77-
golang.org/x/mod v0.22.0 // indirect
78-
golang.org/x/net v0.32.0 // indirect
79-
golang.org/x/oauth2 v0.24.0 // indirect
80-
golang.org/x/sync v0.10.0 // indirect
81-
golang.org/x/sys v0.28.0 // indirect
82-
golang.org/x/term v0.27.0 // indirect
83-
golang.org/x/text v0.21.0 // indirect
84-
golang.org/x/time v0.8.0 // indirect
85-
golang.org/x/tools v0.28.0 // indirect
86-
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
87-
google.golang.org/protobuf v1.35.2 // indirect
72+
go.opentelemetry.io/otel v1.32.0 // indirect
73+
go.opentelemetry.io/otel/trace v1.32.0 // indirect
74+
go.uber.org/automaxprocs v1.6.0 // indirect
75+
golang.org/x/mod v0.24.0 // indirect
76+
golang.org/x/net v0.39.0 // indirect
77+
golang.org/x/oauth2 v0.28.0 // indirect
78+
golang.org/x/sync v0.13.0 // indirect
79+
golang.org/x/sys v0.32.0 // indirect
80+
golang.org/x/term v0.31.0 // indirect
81+
golang.org/x/text v0.24.0 // indirect
82+
golang.org/x/time v0.11.0 // indirect
83+
golang.org/x/tools v0.32.0 // indirect
84+
gomodules.xyz/jsonpatch/v2 v2.5.0 // indirect
85+
google.golang.org/protobuf v1.36.5 // indirect
8886
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
8987
gopkg.in/inf.v0 v0.9.1 // indirect
9088
gopkg.in/yaml.v2 v2.4.0 // indirect
9189
gopkg.in/yaml.v3 v3.0.1 // indirect
92-
k8s.io/apiextensions-apiserver v0.31.3 // indirect
93-
k8s.io/apiserver v0.31.3 // indirect
94-
k8s.io/client-go v0.31.3 // indirect
95-
k8s.io/cluster-bootstrap v0.31.3 // indirect
90+
k8s.io/apiextensions-apiserver v0.32.3 // indirect
91+
k8s.io/apiserver v0.32.3 // indirect
92+
k8s.io/client-go v0.32.3 // indirect
93+
k8s.io/cluster-bootstrap v0.32.3 // indirect
9694
k8s.io/gengo v0.0.0-20230829151522-9cce18d56c01 // indirect
97-
k8s.io/gengo/v2 v2.0.0-20240826214909-a7b603a56eb7 // indirect
95+
k8s.io/gengo/v2 v2.0.0-20240911193312-2b36238f13e9 // indirect
9896
k8s.io/klog v1.0.0 // indirect
99-
k8s.io/kube-openapi v0.0.0-20240903163716-9e1beecbcb38 // indirect
100-
sigs.k8s.io/controller-runtime/tools/setup-envtest v0.0.0-20231015215740-bf15e44028f9 // indirect
101-
sigs.k8s.io/controller-tools v0.16.5 // indirect
102-
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
103-
sigs.k8s.io/structured-merge-diff/v4 v4.4.3 // indirect
97+
k8s.io/kube-openapi v0.0.0-20241212222426-2c72e554b1e7 // indirect
98+
sigs.k8s.io/controller-tools v0.17.3 // indirect
99+
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect
100+
sigs.k8s.io/structured-merge-diff/v4 v4.5.0 // indirect
104101
sigs.k8s.io/yaml v1.4.0 // indirect
105102
)
106103

0 commit comments

Comments
 (0)