Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump go version to 1.21 #331

Merged
merged 2 commits into from
Feb 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/apidiff.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
# Do not bump go version joelanford/go-apidiff is build with go 1.18
- uses: actions/setup-go@v5
with:
go-version: 1.19
go-version: 1.21.x
- uses: joelanford/go-apidiff@main
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.20.x
go-version: 1.21.x
- name: Build GKE operator binary
run: make operator
2 changes: 1 addition & 1 deletion .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.20.x
go-version: 1.21.x
- uses: engineerd/[email protected]
with:
version: "v0.16.0"
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.20.x
go-version: 1.21.x
- name: Analysis
uses: golangci/golangci-lint-action@v3
with:
args: -v
skip-pkg-cache: true
2 changes: 1 addition & 1 deletion .github/workflows/unit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.20.x
go-version: 1.21.x
- name: Run tests
run: |
make test
2 changes: 1 addition & 1 deletion .github/workflows/verify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.20.x
go-version: 1.21.x
- name: Run make verify
run: |
make verify
2 changes: 1 addition & 1 deletion Dockerfile.dapper
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ RUN zypper -n update && \

ENV GOLANG_ARCH_amd64=amd64 GOLANG_ARCH_arm=armv6l GOLANG_ARCH_arm64=arm64 GOLANG_ARCH=GOLANG_ARCH_${ARCH} \
GOPATH=/go PATH=/go/bin:/usr/local/go/bin:${PATH} SHELL=/bin/bash
RUN curl -sLf https://go.dev/dl/go1.20.7.linux-${ARCH}.tar.gz | tar -xzf - -C /usr/local/
RUN curl -sLf https://go.dev/dl/go1.21.7.linux-${ARCH}.tar.gz | tar -xzf - -C /usr/local/
# workaround for https://bugzilla.suse.com/show_bug.cgi?id=1183043
RUN if [ "${ARCH}" == "arm64" ]; then \
zypper -n install binutils-gold ; \
Expand Down
2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ module github.com/rancher/gke-operator

go 1.21

toolchain go1.21.6

replace (
k8s.io/client-go => k8s.io/client-go v0.28.6
k8s.io/kube-openapi => k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/Dockerfile.e2e
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM registry.suse.com/bci/golang:1.20 AS build
FROM registry.suse.com/bci/golang:1.21 AS build
RUN zypper -n install -l openssl-devel
WORKDIR /src
COPY go.mod go.sum /src/
Expand All @@ -21,4 +21,4 @@ RUN go build \
FROM scratch AS gke-operator
COPY --from=build /var/lib/ca-certificates/ca-bundle.pem /etc/ssl/certs/ca-certificates.crt
COPY --from=build-operator /usr/sbin/gke-operator /usr/sbin/gke-operator
ENTRYPOINT ["/usr/sbin/gke-operator"]
ENTRYPOINT ["/usr/sbin/gke-operator"]
4 changes: 2 additions & 2 deletions test/e2e/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,15 +129,15 @@ func ReadE2EConfig(configPath string) (*E2EConfig, error) { //nolint:gocyclo
}

func substituteVersions(config *E2EConfig) error {
certManagerURL, err := envsubst.Eval(config.CertManagerChartURL, func(s string) string {
certManagerURL, err := envsubst.Eval(config.CertManagerChartURL, func(_ string) string {
return config.CertManagerVersion
})
if err != nil {
return fmt.Errorf("failed to substitute cert manager chart url: %w", err)
}
config.CertManagerChartURL = certManagerURL

rancherURL, err := envsubst.Eval(config.RancherChartURL, func(s string) string {
rancherURL, err := envsubst.Eval(config.RancherChartURL, func(_ string) string {
return config.RancherVersion
})
if err != nil {
Expand Down