upgrade to golang 1.19.2 (#9124)
* upgrade to golang 1.19.2 Signed-off-by: James Strong <strong.james.e@gmail.com> * update e2e testing to 1.25 kind Signed-off-by: James Strong <strong.james.e@gmail.com> Signed-off-by: James Strong <strong.james.e@gmail.com>
This commit is contained in:
parent
ea254fbcb1
commit
93df796767
10 changed files with 31 additions and 52 deletions
10
.github/workflows/ci.yaml
vendored
10
.github/workflows/ci.yaml
vendored
|
@ -70,11 +70,11 @@ jobs:
|
|||
- name: Checkout
|
||||
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.0.2
|
||||
|
||||
- name: Set up Go 1.19.1
|
||||
- name: Set up Go 1.19.2
|
||||
id: go
|
||||
uses: actions/setup-go@268d8c0ca0432bb2cf416faae41297df9d262d7f # v3.2.0
|
||||
with:
|
||||
go-version: '1.19.1'
|
||||
go-version: '1.19.2'
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@8b122486cedac8393e77aa9734c3528886e4a1a8 #v2.0.0
|
||||
|
@ -140,7 +140,7 @@ jobs:
|
|||
- name: Setup Go
|
||||
uses: actions/setup-go@268d8c0ca0432bb2cf416faae41297df9d262d7f # v3.2.0
|
||||
with:
|
||||
go-version: '1.19.1'
|
||||
go-version: '1.19.2'
|
||||
|
||||
- name: cache
|
||||
uses: actions/download-artifact@fb598a63ae348fa914e94cd0ff38f362e927b741 # v3
|
||||
|
@ -411,12 +411,12 @@ jobs:
|
|||
version: v0.15.0
|
||||
image: kindest/node:v1.25.2
|
||||
|
||||
- name: Set up Go 1.19.1
|
||||
- name: Set up Go 1.19.2
|
||||
id: go
|
||||
if: ${{ steps.filter-images.outputs.kube-webhook-certgen == 'true' }}
|
||||
uses: actions/setup-go@268d8c0ca0432bb2cf416faae41297df9d262d7f # v3.2.0
|
||||
with:
|
||||
go-version: '1.19.1'
|
||||
go-version: '1.19.2'
|
||||
|
||||
- name: kube-webhook-certgen image build
|
||||
if: ${{ steps.filter-images.outputs.kube-webhook-certgen == 'true' }}
|
||||
|
|
2
.github/workflows/plugin.yaml
vendored
2
.github/workflows/plugin.yaml
vendored
|
@ -24,7 +24,7 @@ jobs:
|
|||
- name: Set up Go
|
||||
uses: actions/setup-go@268d8c0ca0432bb2cf416faae41297df9d262d7f # v3.2.0
|
||||
with:
|
||||
go-version: 1.19.1
|
||||
go-version: 1.19.2
|
||||
|
||||
- name: Run GoReleaser
|
||||
uses: goreleaser/goreleaser-action@ff11ca24a9b39f2d36796d1fbd7a4e39c182630a # v3.0.0
|
||||
|
|
10
Makefile
10
Makefile
|
@ -53,14 +53,6 @@ ifneq ($(PLATFORM),)
|
|||
PLATFORM_FLAG="--platform"
|
||||
endif
|
||||
|
||||
MAC_OS = $(shell uname -s)
|
||||
|
||||
ifeq ($(MAC_OS), Darwin)
|
||||
MAC_DOCKER_FLAGS="--load"
|
||||
else
|
||||
MAC_DOCKER_FLAGS=
|
||||
endif
|
||||
|
||||
REGISTRY ?= gcr.io/k8s-staging-ingress-nginx
|
||||
|
||||
BASE_IMAGE ?= $(shell cat NGINX_BASE)
|
||||
|
@ -76,7 +68,6 @@ image: clean-image ## Build image for a particular arch.
|
|||
docker build \
|
||||
${PLATFORM_FLAG} ${PLATFORM} \
|
||||
--no-cache \
|
||||
$(MAC_DOCKER_FLAGS) \
|
||||
--pull \
|
||||
--build-arg BASE_IMAGE="$(BASE_IMAGE)" \
|
||||
--build-arg VERSION="$(TAG)" \
|
||||
|
@ -94,7 +85,6 @@ image-chroot: clean-chroot-image ## Build image for a particular arch.
|
|||
echo "Building docker image ($(ARCH))..."
|
||||
docker build \
|
||||
--no-cache \
|
||||
$(MAC_DOCKER_FLAGS) \
|
||||
--pull \
|
||||
--build-arg BASE_IMAGE="$(BASE_IMAGE)" \
|
||||
--build-arg VERSION="$(TAG)" \
|
||||
|
|
|
@ -62,32 +62,13 @@ echo "[dev-env] building image"
|
|||
make build image
|
||||
docker tag "${REGISTRY}/controller:${TAG}" "${DEV_IMAGE}"
|
||||
|
||||
export K8S_VERSION=${K8S_VERSION:-v1.24.2@sha256:1f0cee2282f43150b52dc7933183ed96abdcfc8d293f30ec07082495874876f1}
|
||||
export K8S_VERSION=${K8S_VERSION:-v1.25.2@sha256:9be91e9e9cdf116809841fc77ebdb8845443c4c72fe5218f3ae9eb57fdb4bace}
|
||||
|
||||
KIND_CLUSTER_NAME="ingress-nginx-dev"
|
||||
|
||||
if ! kind get clusters -q | grep -q ${KIND_CLUSTER_NAME}; then
|
||||
echo "[dev-env] creating Kubernetes cluster with kind"
|
||||
cat <<EOF | kind create cluster --name ${KIND_CLUSTER_NAME} --image "kindest/node:${K8S_VERSION}" --config=-
|
||||
kind: Cluster
|
||||
apiVersion: kind.x-k8s.io/v1alpha4
|
||||
nodes:
|
||||
- role: control-plane
|
||||
kubeadmConfigPatches:
|
||||
- |
|
||||
kind: InitConfiguration
|
||||
nodeRegistration:
|
||||
kubeletExtraArgs:
|
||||
node-labels: "ingress-ready=true"
|
||||
authorization-mode: "AlwaysAllow"
|
||||
extraPortMappings:
|
||||
- containerPort: 80
|
||||
hostPort: 80
|
||||
protocol: TCP
|
||||
- containerPort: 443
|
||||
hostPort: 443
|
||||
protocol: TCP
|
||||
EOF
|
||||
kind create cluster --name ${KIND_CLUSTER_NAME} --image "kindest/node:${K8S_VERSION}" --config ${DIR}/kind.yaml
|
||||
else
|
||||
echo "[dev-env] using existing Kubernetes kind cluster"
|
||||
fi
|
||||
|
|
18
build/kind.yaml
Normal file
18
build/kind.yaml
Normal file
|
@ -0,0 +1,18 @@
|
|||
kind: Cluster
|
||||
apiVersion: kind.x-k8s.io/v1alpha4
|
||||
nodes:
|
||||
- role: control-plane
|
||||
kubeadmConfigPatches:
|
||||
- |
|
||||
kind: InitConfiguration
|
||||
nodeRegistration:
|
||||
kubeletExtraArgs:
|
||||
node-labels: "ingress-ready=true"
|
||||
authorization-mode: "AlwaysAllow"
|
||||
extraPortMappings:
|
||||
- containerPort: 80
|
||||
hostPort: 80
|
||||
protocol: TCP
|
||||
- containerPort: 443
|
||||
hostPort: 443
|
||||
protocol: TCP
|
|
@ -65,15 +65,6 @@ fi
|
|||
|
||||
USER=${USER:-nobody}
|
||||
|
||||
MAC_OS="`uname -s`"
|
||||
MAC_OS="${MAC_OS:-}"
|
||||
if [[ ${MAC_OS} == "Darwin" ]]; then
|
||||
MAC_DOCKER_FLAGS=""
|
||||
else
|
||||
MAC_DOCKER_FLAGS="-u $(id -u ${USER}):$(id -g ${USER})" #idk why mac/git fails on the gobuild if these are presented to dockerrun.sh script
|
||||
fi
|
||||
echo "MAC_OS = ${MAC_OS}, MAC_OS_FLAGS = ${MAC_DOCKER_FLAGS}"
|
||||
|
||||
echo "..printing env & other vars to stdout"
|
||||
echo "HOSTNAME=`hostname`"
|
||||
uname -a
|
||||
|
@ -108,6 +99,5 @@ else
|
|||
-v "/var/run/docker.sock:/var/run/docker.sock" \
|
||||
-v "${INGRESS_VOLUME}:/etc/ingress-controller/" \
|
||||
-w "/go/src/${PKG}" \
|
||||
${MAC_DOCKER_FLAGS} \
|
||||
${E2E_IMAGE} /bin/bash -c "${FLAGS}"
|
||||
fi
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
FROM golang:1.19.1-alpine3.16 as builder
|
||||
FROM golang:1.19.2-alpine3.16 as builder
|
||||
RUN mkdir /authsvc
|
||||
WORKDIR /authsvc
|
||||
COPY . ./
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
FROM --platform=$BUILDPLATFORM golang:1.19.1 as builder
|
||||
FROM --platform=$BUILDPLATFORM golang:1.19.2 as builder
|
||||
ARG BUILDPLATFORM
|
||||
ARG TARGETARCH
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ build: ensure-buildx
|
|||
--progress=$(PROGRESS) \
|
||||
--pull \
|
||||
--build-arg BASE_IMAGE=$(NGINX_BASE_IMAGE) \
|
||||
--build-arg GOLANG_VERSION=1.19.1 \
|
||||
--build-arg GOLANG_VERSION=1.19.2 \
|
||||
--build-arg ETCD_VERSION=3.4.3-0 \
|
||||
--build-arg K8S_RELEASE=v1.24.2 \
|
||||
--build-arg RESTY_CLI_VERSION=0.27 \
|
||||
|
|
|
@ -64,7 +64,7 @@ export KUBECONFIG="${KUBECONFIG:-$HOME/.kube/kind-config-$KIND_CLUSTER_NAME}"
|
|||
if [ "${SKIP_CLUSTER_CREATION:-false}" = "false" ]; then
|
||||
echo "[dev-env] creating Kubernetes cluster with kind"
|
||||
|
||||
export K8S_VERSION=${K8S_VERSION:-v1.21.10@sha256:84709f09756ba4f863769bdcabe5edafc2ada72d3c8c44d6515fc581b66b029c}
|
||||
export K8S_VERSION=${K8S_VERSION:-v1.25.2@sha256:9be91e9e9cdf116809841fc77ebdb8845443c4c72fe5218f3ae9eb57fdb4bace}
|
||||
|
||||
kind create cluster \
|
||||
--verbosity=${KIND_LOG_LEVEL} \
|
||||
|
|
Loading…
Reference in a new issue