diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 160b2fd6..6556f63c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -6,6 +6,7 @@ on: branches: [ "main" ] env: + GO_VERSION: '1.20' DOCKER_BUILDX_PLATFORMS: linux/amd64,linux/arm64 jobs: @@ -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 @@ -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 @@ -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 diff --git a/Dockerfile b/Dockerfile index 7f35576d..4ff04297 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/README.md b/README.md index 55c4dea5..35ebc709 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/go.mod b/go.mod index 44af3bba..378b968c 100644 --- a/go.mod +++ b/go.mod @@ -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 diff --git a/scripts/preflight.sh b/scripts/preflight.sh index 1e2c862f..5e5b0416 100755 --- a/scripts/preflight.sh +++ b/scripts/preflight.sh @@ -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