From e27337df206a27cd81d31b79f431488588b3afa1 Mon Sep 17 00:00:00 2001 From: Martin Hrabovcin Date: Mon, 14 Oct 2024 20:25:47 +0200 Subject: [PATCH] fix: bump go version (#9) * fix: bump go version * chore: bump operator version * fix: use go.mod for go version setup * fix: use released version --- .github/workflows/ci.yaml | 30 +++++++------------ .github/workflows/d2iq-relesae-images.yaml | 14 ++++----- Dockerfile | 6 ++-- charts/zookeeper/values.yaml | 2 +- config/manager/manager.yaml | 2 +- ...zookeeper_v1beta1_zookeepercluster_cr.yaml | 2 +- ...zookeeper_v1beta1_zookeepercluster_cr.yaml | 2 +- go.mod | 14 +++++---- go.sum | 10 +++++++ 9 files changed, 41 insertions(+), 41 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 0e4506c4..9629b983 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -19,24 +19,20 @@ jobs: runs-on: - ubuntu-latest steps: - - name: Set up Go 1.21 - uses: actions/setup-go@v2 + - name: Check out code into the Go module directory + uses: actions/checkout@v4 + - name: Set up Go + uses: actions/setup-go@v5 with: - go-version: "1.21" + go-version-file: 'go.mod' id: go - - name: Set up Go for root - run: | - sudo ln -sf `which go` `sudo which go` || true - sudo go version - - name: Check out code into the Go module directory - uses: actions/checkout@v2 - name: get go version run: go version - name: Gofmt and License checks run: make check - name: unit tests run: make test - # This fails + # This fails # - name: Codecov # uses: codecov/codecov-action@v1.0.12 - name: Set env @@ -77,19 +73,15 @@ jobs: needs: build if: github.event_name == 'release' && github.event.action == 'created' steps: - - name: Set up Go 1.21 - uses: actions/setup-go@v2 - with: - go-version: "1.21" - id: go - - name: Set up Go for root - run: | - sudo ln -sf `which go` `sudo which go` || true - sudo go version - name: Check out code into the Go module directory uses: actions/checkout@v4 with: fetch-tags: true + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version-file: 'go.mod' + id: go - name: get go version run: go version - name: Login to GHCR diff --git a/.github/workflows/d2iq-relesae-images.yaml b/.github/workflows/d2iq-relesae-images.yaml index b52f9ddc..30b6972c 100644 --- a/.github/workflows/d2iq-relesae-images.yaml +++ b/.github/workflows/d2iq-relesae-images.yaml @@ -21,15 +21,6 @@ jobs: contents: read packages: write steps: - - name: Set up Go 1.21 - uses: actions/setup-go@v2 - with: - go-version: "1.21" - id: go - - name: Set up Go for root - run: | - sudo ln -sf `which go` `sudo which go` || true - sudo go version - name: get go version run: go version - name: Check out release tag @@ -37,6 +28,11 @@ jobs: with: ref: ${{ inputs.releaseTag }} fetch-tags: true + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version-file: 'go.mod' + id: go - name: Login to GHCR uses: docker/login-action@v3 with: diff --git a/Dockerfile b/Dockerfile index e1b4302d..e2710629 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ ARG DOCKER_REGISTRY ARG DISTROLESS_DOCKER_REGISTRY -ARG ALPINE_VERSION=3.18 -FROM ${DOCKER_REGISTRY:+$DOCKER_REGISTRY/}golang:1.21-alpine${ALPINE_VERSION} as go-builder +ARG ALPINE_VERSION=3.20 +FROM ${DOCKER_REGISTRY:+$DOCKER_REGISTRY/}golang:1.22-alpine${ALPINE_VERSION} as go-builder ARG PROJECT_NAME=zookeeper-operator ARG REPO_PATH=github.com/mesosphere/$PROJECT_NAME @@ -27,7 +27,7 @@ COPY controllers/ controllers/ # Build RUN GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o /src/${PROJECT_NAME} \ - -ldflags "-X ${REPO_PATH}/pkg/version.Version=${VERSION} -X ${REPO_PATH}/pkg/version.GitSHA=${GIT_SHA}" main.go + -ldflags "-X ${REPO_PATH}/pkg/version.Version=${VERSION} -X ${REPO_PATH}/pkg/version.GitSHA=${GIT_SHA}" main.go FROM ${DISTROLESS_DOCKER_REGISTRY:-gcr.io/}distroless/static-debian11:nonroot AS final diff --git a/charts/zookeeper/values.yaml b/charts/zookeeper/values.yaml index 437485f6..a83f8ab4 100644 --- a/charts/zookeeper/values.yaml +++ b/charts/zookeeper/values.yaml @@ -3,7 +3,7 @@ maxUnavailableReplicas: image: repository: ghcr.io/mesosphere/zookeeper - tag: 0.2.15-d2iq + tag: 0.2.15-d2iq.1 pullPolicy: IfNotPresent triggerRollingRestart: false diff --git a/config/manager/manager.yaml b/config/manager/manager.yaml index 23e5fe4e..cb8df750 100644 --- a/config/manager/manager.yaml +++ b/config/manager/manager.yaml @@ -16,7 +16,7 @@ spec: containers: - name: zookeeper-operator # Replace this with the built image name - image: ghcr.io/mesosphere/zookeeper-operator:0.2.15-d2iq + image: ghcr.io/mesosphere/zookeeper-operator:0.2.15-d2iq.1 ports: - containerPort: 60000 name: metrics diff --git a/config/samples/ECS/zookeeper_v1beta1_zookeepercluster_cr.yaml b/config/samples/ECS/zookeeper_v1beta1_zookeepercluster_cr.yaml index 679f9a1f..79702f9d 100644 --- a/config/samples/ECS/zookeeper_v1beta1_zookeepercluster_cr.yaml +++ b/config/samples/ECS/zookeeper_v1beta1_zookeepercluster_cr.yaml @@ -6,7 +6,7 @@ spec: replicas: 3 image: repository: ghcr.io/mesosphere/zookeeper - tag: 0.2.15-d2iq + tag: 0.2.15-d2iq.1 storageType: persistence persistence: reclaimPolicy: Retain diff --git a/config/samples/pravega/zookeeper_v1beta1_zookeepercluster_cr.yaml b/config/samples/pravega/zookeeper_v1beta1_zookeepercluster_cr.yaml index cbf2eba7..4eb7bb5a 100644 --- a/config/samples/pravega/zookeeper_v1beta1_zookeepercluster_cr.yaml +++ b/config/samples/pravega/zookeeper_v1beta1_zookeepercluster_cr.yaml @@ -6,7 +6,7 @@ spec: replicas: 3 image: repository: ghcr.io/mesosphere/zookeeper - tag: 0.2.15-d2iq + tag: 0.2.15-d2iq.1 storageType: persistence persistence: reclaimPolicy: Delete diff --git a/go.mod b/go.mod index bee9572e..235d8897 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,8 @@ module github.com/pravega/zookeeper-operator -go 1.21 +go 1.22 + +toolchain go1.22.8 require ( github.com/ghodss/yaml v1.0.0 @@ -11,7 +13,7 @@ require ( github.com/pkg/errors v0.9.1 github.com/samuel/go-zookeeper v0.0.0-20201211165307-7117e9ea2414 github.com/sirupsen/logrus v1.9.0 - golang.org/x/net v0.17.0 + golang.org/x/net v0.30.0 k8s.io/api v0.27.5 k8s.io/apimachinery v0.27.5 k8s.io/client-go v0.27.5 @@ -55,13 +57,13 @@ require ( go.uber.org/multierr v1.8.0 // indirect go.uber.org/zap v1.24.0 // indirect golang.org/x/oauth2 v0.5.0 // indirect - golang.org/x/sys v0.13.0 // indirect - golang.org/x/term v0.13.0 // indirect - golang.org/x/text v0.13.0 // indirect + golang.org/x/sys v0.26.0 // indirect + golang.org/x/term v0.25.0 // indirect + golang.org/x/text v0.19.0 // indirect golang.org/x/time v0.3.0 // indirect gomodules.xyz/jsonpatch/v2 v2.3.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/protobuf v1.30.0 // indirect + google.golang.org/protobuf v1.35.1 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect diff --git a/go.sum b/go.sum index 4f4a37b5..68808100 100644 --- a/go.sum +++ b/go.sum @@ -221,6 +221,8 @@ golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96b golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/net v0.30.0 h1:AcW1SDZMkb8IpzCdQUaIq2sP4sZ4zw+55h6ynffypl4= +golang.org/x/net v0.30.0/go.mod h1:2wGyMJ5iFasEhkwi13ChkO/t1ECNC4X4eBKkVFyYFlU= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.5.0 h1:HuArIo48skDwlrvM3sEdHXElYslAMsf3KwRkkW4MC4s= @@ -250,9 +252,13 @@ golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= +golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= +golang.org/x/term v0.25.0 h1:WtHI/ltw4NvSUig5KARz9h521QvRC8RmF/cuYqifU24= +golang.org/x/term v0.25.0/go.mod h1:RPyXicDX+6vLxogjjRxjgD2TKtmAO6NZBsBRfrOLu7M= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -260,6 +266,8 @@ golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM= +golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -310,6 +318,8 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA= +google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=