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.20 #167

Merged
merged 1 commit into from
Mar 3, 2023
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
7 changes: 4 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
branches: [ "main" ]

env:
GO_VERSION: '1.20'
DOCKER_BUILDX_PLATFORMS: linux/amd64,linux/arm64

jobs:
Expand Down Expand Up @@ -54,7 +55,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19 # Use the latest
go-version: ${{ env.GO_VERSION }}
- name: Generate manifests
run: make manifests
- name: Fail if there are uncommited manifest changes
Expand Down Expand Up @@ -99,7 +100,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19
go-version: ${{ env.GO_VERSION }}
- run: go mod tidy
- run: git diff --exit-code go.mod
- run: git diff --exit-code go.sum
Expand Down Expand Up @@ -127,7 +128,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19 # Use the latest
go-version: ${{ env.GO_VERSION }}

- name: Build
run: make build
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the manager binary
FROM --platform=$BUILDPLATFORM golang:1.19 as builder
FROM --platform=$BUILDPLATFORM golang:1.20 as builder

WORKDIR /workspace
# Copy the Go Modules manifests
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ See [Helm Chart](./helm/ingress-controller/README.md#install-the-controller-with

Ensure you have the following prerequisites installed:

* [Go 1.19](https://go.dev/dl/)
* [Go 1.20](https://go.dev/dl/)
* [Helm](https://helm.sh/docs/intro/install/)
* A k8s cluster is available via your kubectl client. This can be a remote cluster or a local cluster like [minikube](https://minikube.sigs.k8s.io/docs/start/)
* NOTE: Depending on your cluster, you may have to take additional steps to make the image available. For example with minikube, you may need to run `eval $(minikube docker-env)` to make the image available to the cluster.
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/ngrok/kubernetes-ingress-controller

go 1.19
go 1.20

require (
github.com/go-logr/logr v1.2.3
Expand Down
4 changes: 2 additions & 2 deletions scripts/preflight.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -eu -o pipefail

GOVERSION="$(go env GOVERSION || echo "not installed")"

if ! [[ "$GOVERSION" == "go1.19" || "$GOVERSION" = "go1.19."* ]]; then
echo "Detected go version $GOVERSION, but 1.19 is required"
if ! [[ "$GOVERSION" == "go1.20" || "$GOVERSION" = "go1.20."* ]]; then
echo "Detected go version $GOVERSION, but 1.20 is required"
exit 1
fi