Skip to content

Commit 6be026b

Browse files
committed
✨ Update to Go 1.23.
Signed-off-by: Thomas Guettler <[email protected]>
1 parent 3dc37fb commit 6be026b

File tree

15 files changed

+94
-71
lines changed

15 files changed

+94
-71
lines changed

.builder-image-version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.1.19
1+
1.1.20

.github/renovate/golang.json5

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
},
55
// https://docs.renovatebot.com/configuration-options/#constraints
66
"constraints": {
7-
"go": "1.21"
7+
"go": "1.22"
88
},
99
packageRules: [
1010
{

.github/workflows/pr-lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
if: github.event_name != 'pull_request' || !github.event.pull_request.draft
2222
runs-on: ubuntu-latest
2323
container:
24-
image: ghcr.io/sovereigncloudstack/cso-builder:1.1.19
24+
image: ghcr.io/sovereigncloudstack/cso-builder:1.1.20
2525
credentials:
2626
username: ${{ github.actor }}
2727
password: ${{ secrets.github_token }}

.github/workflows/schedule-scan-image.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
name: Trivy
1010
runs-on: ubuntu-latest
1111
container:
12-
image: ghcr.io/sovereigncloudstack/cso-builder:1.1.19
12+
image: ghcr.io/sovereigncloudstack/cso-builder:1.1.20
1313
credentials:
1414
username: ${{ github.actor }}
1515
password: ${{ secrets.github_token }}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,6 @@ main
8282
*.tgz.yaml
8383
*.build.yaml
8484
.release
85+
86+
# .config/go/telemetry/local/
87+
.config

.golangci.yaml

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ linters:
1212
- errname
1313
- errorlint
1414
- exhaustive
15-
- exportloopref
15+
- copyloopvar
1616
- forcetypeassert
1717
- gci
1818
- goconst
@@ -86,10 +86,7 @@ linters-settings:
8686
allow-unused: false
8787
allow-leading-space: false
8888
require-specific: true
89-
staticcheck:
90-
go: "1.21"
9189
stylecheck:
92-
go: "1.21"
9390
checks: ["all", "-ST1006"]
9491
dot-import-whitelist:
9592
- "github.com/onsi/gomega"
@@ -223,8 +220,6 @@ linters-settings:
223220
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#struct-tag
224221
- name: struct-tag
225222
disabled: true
226-
unused:
227-
go: "1.21"
228223
usestdlibvars:
229224
# Suggest the use of http.MethodXX.
230225
# Default: true
@@ -247,9 +242,6 @@ linters-settings:
247242
# Suggest the use of rpc.DefaultXXPath.
248243
# Default: false
249244
default-rpc-path: true
250-
# Suggest the use of os.DevNull.
251-
# Default: false
252-
os-dev-null: true
253245
# Suggest the use of sql.LevelXX.String().
254246
# Default: false
255247
sql-isolation-level: true
@@ -259,9 +251,6 @@ linters-settings:
259251
# Suggest the use of constant.Kind.String().
260252
# Default: false
261253
constant-kind: true
262-
# Suggest the use of syslog.Priority.
263-
# Default: false
264-
syslog-priority: true
265254
wrapcheck:
266255
ignoreSigs:
267256
- status.Error(
@@ -285,11 +274,11 @@ issues:
285274
- linters:
286275
- wrapcheck
287276
path: _test\.go
277+
exclude-dirs:
278+
- vendor$
279+
- test/vendor$
288280
run:
289281
timeout: 10m
290-
go: "1.21"
282+
go: "1.22"
291283
allow-parallel-runners: true
292284
modules-download-mode: vendor
293-
skip-dirs:
294-
- vendor$
295-
- test/vendor$

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ MGT_CLUSTER_KUBECONFIG ?= ".mgt-cluster-kubeconfig.yaml"
8181

8282
# Kubebuilder.
8383
export KUBEBUILDER_ENVTEST_KUBERNETES_VERSION ?= 1.29.3
84-
# versions
84+
# versions
8585
CTLPTL_VERSION := 0.8.25
8686

8787
##@ Binaries
@@ -445,7 +445,7 @@ ifeq ($(BUILD_IN_CONTAINER),true)
445445
else
446446
go version
447447
golangci-lint version
448-
GO111MODULE=on golangci-lint run -v --out-format=github-actions
448+
GO111MODULE=on golangci-lint run -v --out-format=colored-line-number
449449
endif
450450

451451
.PHONY: lint-yaml

api/v1alpha1/conditions_const.go

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const (
3939

4040
const (
4141
// HelmChartFoundCondition reports when mentioned helm chart is present in the cluster addon tar archive.
42-
HelmChartFoundCondition = "HelmChartFound"
42+
HelmChartFoundCondition clusterv1.ConditionType = "HelmChartFound"
4343

4444
// HelmChartMissingReason is used when mentioned helm chart is missing in the cluster addon tar archive.
4545
HelmChartMissingReason = "HelmChartMissing"
@@ -62,6 +62,14 @@ const (
6262
TemplateNewClusterStackFailedReason = "TemplateNewClusterStackFailed"
6363
)
6464

65+
const (
66+
// ClusterAddonConfigValidatedCondition reports when there is a error parsing clusteraddon.yaml.
67+
ClusterAddonConfigValidatedCondition clusterv1.ConditionType = "ClusterAddonConfigValidated"
68+
69+
// ParsingClusterAddonConfigFailedReason is used when there's some error happen while parsing clusteraddon.yaml.
70+
ParsingClusterAddonConfigFailedReason = "ParsingClusterAddonConfigFailed"
71+
)
72+
6573
const (
6674
// HelmChartAppliedCondition reports on whether the relevant helm chart has been applied.
6775
HelmChartAppliedCondition clusterv1.ConditionType = "HelmChartApplied"
@@ -91,7 +99,7 @@ const (
9199

92100
const (
93101
// ProviderClusterStackReleasesSyncedCondition reports on whether the ProviderClusterStackReleases are ready.
94-
ProviderClusterStackReleasesSyncedCondition = "ProviderClusterStackReleasesSynced"
102+
ProviderClusterStackReleasesSyncedCondition clusterv1.ConditionType = "ProviderClusterStackReleasesSynced"
95103

96104
// ProviderTemplateNotFoundReason is used when providerTemplate is not found.
97105
ProviderTemplateNotFoundReason = "ProviderTemplateNotFound"
@@ -102,7 +110,7 @@ const (
102110

103111
const (
104112
// ClusterStackReleasesSyncedCondition reports on whether the ClusterStackReleases are ready.
105-
ClusterStackReleasesSyncedCondition = "ClusterStackReleasesSynced" //#nosec
113+
ClusterStackReleasesSyncedCondition clusterv1.ConditionType = "ClusterStackReleasesSynced" //#nosec
106114
)
107115

108116
const (

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/SovereignCloudStack/cluster-stack-operator
22

3-
go 1.21
3+
go 1.22
44

55
require (
66
github.com/go-logr/logr v1.4.2

images/builder/Dockerfile

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
# If you make changes to this Dockerfile run `make builder-image-push`.
1818

1919
# Install Lychee
20-
FROM docker.io/library/alpine:3.20.0@sha256:216266c86fc4dcef5619930bd394245824c2af52fd21ba7c6fa0e618657d4c3b as lychee
20+
FROM docker.io/library/alpine:3.20.2 AS lychee
2121
# update: datasource=github-tags depName=lycheeverse/lychee versioning=semver
2222
ENV LYCHEE_VERSION="v0.15.1"
2323
# hadolint ignore=DL3018
@@ -29,22 +29,22 @@ RUN apk add --no-cache curl && \
2929
mv /tmp/lychee /usr/bin/lychee && \
3030
rm -rf /tmp/linux-amd64 /tmp/lychee-${LYCHEE_VERSION}.tgz
3131

32-
FROM cgr.dev/chainguard/wolfi-base:latest as wolfi
32+
FROM cgr.dev/chainguard/wolfi-base:latest AS wolfi
3333

3434
# update: datasource=github-tags depName=kubernetes-sigs/cluster-api
35-
ARG CLUSTERCTL_VERSION="v1.6.2"
35+
ARG CLUSTERCTL_VERSION="v1.8.1"
3636
# update: datasource=github-tags depName=helm/helm
3737
ENV HELM_VERSION="v3.14.1"
3838
# update: datasource=github-tags depName=kubernetes-sigs/kind
39-
ARG KIND_VERSION="v0.20.0"
39+
ARG KIND_VERSION="v0.24.0"
4040
# update: datasource=github-tags depName=kubernetes/kubernetes
41-
ARG KUBECTL_VERSION="v1.27.3"
41+
ARG KUBECTL_VERSION="v1.30.4"
4242
# update: datasource=github-tags depName=kubernetes-sigs/kustomize extractVersion=^kustomize\/v(?<version>.+)$
43-
ARG KUSTOMIZE_VERSION="v5.3.0"
43+
ARG KUSTOMIZE_VERSION="v5.4.3"
4444
# update: datasource=github-tags depName=aquasecurity/trivy
45-
ARG TRIVY_VERSION="v0.48.3"
45+
ARG TRIVY_VERSION="v0.54.1"
4646
# update: datasource=github-tags depName=kubernetes-sigs/controller-tools
47-
ARG CONTROLLER_GEN_VERSION="v0.14.0"
47+
ARG CONTROLLER_GEN_VERSION="v0.16.1"
4848

4949
# hadolint ignore=DL3018
5050
RUN apk add -U --no-cache \
@@ -55,27 +55,27 @@ RUN apk add -U --no-cache \
5555
kind=~${KIND_VERSION#v} \
5656
kubectl=~${KUBECTL_VERSION#v} \
5757
kustomize=~${KUSTOMIZE_VERSION#v} \
58-
trivy=~${TRIVY_VERSION#v}
58+
trivy=~${TRIVY_VERSION#v}
5959

6060
# Install Golang CI Lint
61-
FROM docker.io/library/alpine:3.20.0@sha256:216266c86fc4dcef5619930bd394245824c2af52fd21ba7c6fa0e618657d4c3b as golangci
61+
FROM docker.io/library/alpine:3.20.2 AS golangci
6262
# update: datasource=github-tags depName=golangci/golangci-lint versioning=semver
63-
ENV GOLANGCI_VERSION="v1.59.0"
63+
ENV GOLANGCI_VERSION="v1.60.3"
6464
WORKDIR /
6565
# hadolint ignore=DL3018,DL4006
6666
RUN apk add --no-cache curl && \
6767
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s ${GOLANGCI_VERSION}
6868

6969
# Install Hadolint
70-
FROM docker.io/hadolint/hadolint:v2.12.0-alpine@sha256:7dba9a9f1a0350f6d021fb2f6f88900998a4fb0aaf8e4330aa8c38544f04db42 as hadolint
70+
FROM docker.io/hadolint/hadolint:v2.12.0-alpine@sha256:7dba9a9f1a0350f6d021fb2f6f88900998a4fb0aaf8e4330aa8c38544f04db42 AS hadolint
7171

7272
# Install Trivy
73-
FROM docker.io/aquasec/trivy:0.51.4@sha256:20a7c9cd02841a3d8d2a2506b93502a944adc57a3db9adf75b59266023b2af1e as trivy
73+
FROM docker.io/aquasec/trivy:0.54.1 AS trivy
7474

7575
############################
7676
# CSO Build Image Base #
7777
############################
78-
FROM docker.io/library/golang:1.21.6-bullseye
78+
FROM docker.io/library/golang:1.23.0-bullseye
7979

8080
# update: datasource=github-tags depName=adrienverge/yamllint versioning=semver
8181
ENV YAMLLINT_VERSION="v1.35.1"

0 commit comments

Comments
 (0)