From 7a0e7dc3f909b40e725c01a5d0cfcd2301e37402 Mon Sep 17 00:00:00 2001 From: Ricardo Katz Date: Fri, 1 Apr 2022 18:42:09 -0300 Subject: [PATCH] Update base image for legacy release (#8418) * Update base image for legacy release * New tag to release a new image * Fix boilerplate file * Remove wrong gosec assert --- .github/workflows/ci.yaml | 4 ++-- Makefile | 2 +- TAG | 2 +- hack/boilerplate/boilerplate.generated.go.txt | 16 ++++++++++++++++ hack/update-codegen.sh | 2 +- images/echo/Makefile | 2 +- images/nginx/README.md | 2 +- images/nginx/rc.yaml | 2 +- images/test-runner/Makefile | 2 +- test/e2e/framework/deployment.go | 2 +- 10 files changed, 26 insertions(+), 10 deletions(-) create mode 100644 hack/boilerplate/boilerplate.generated.go.txt diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 580f4da7bd..d660265dc7 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -46,12 +46,12 @@ jobs: uses: actions/checkout@v2 - name: Run Gosec Security Scanner - uses: securego/gosec@master + uses: securego/gosec@b99b5f7838e43a4104354ad92a6a1774302ee1f9 with: # G601 for zz_generated.deepcopy.go # G306 TODO: Expect WriteFile permissions to be 0600 or less # G307 TODO: Deferring unsafe method "Close" - args: -exclude=G601,G104,G204,G304,G306,G307 -tests=false -exclude-dir=test -exclude-dir=images/ -exclude-dir=docs/ ./... + args: -exclude=G109,G601,G104,G204,G304,G306,G307 -tests=false -exclude-dir=test -exclude-dir=images/ -exclude-dir=docs/ ./... build: name: Build diff --git a/Makefile b/Makefile index ad2c8340d3..cf95495b9b 100644 --- a/Makefile +++ b/Makefile @@ -51,7 +51,7 @@ endif REGISTRY ?= gcr.io/k8s-staging-ingress-nginx -BASE_IMAGE ?= k8s.gcr.io/ingress-nginx/nginx:v20210926-g5662db450@sha256:1ef404b5e8741fe49605a1f40c3fdd8ef657aecdb9526ea979d1672eeabd0cd9 +BASE_IMAGE ?= k8s.gcr.io/ingress-nginx/nginx:5402d35663917ccbbf77ff48a22b8c6f77097f48@sha256:ec8a104df307f5c6d68157b7ac8e5e1e2c2f0ea07ddf25bb1c6c43c67e351180 GOARCH=$(ARCH) diff --git a/TAG b/TAG index f6460f6bbb..5c63c289ac 100644 --- a/TAG +++ b/TAG @@ -1 +1 @@ -v0.50.0 +v0.51.0 diff --git a/hack/boilerplate/boilerplate.generated.go.txt b/hack/boilerplate/boilerplate.generated.go.txt new file mode 100644 index 0000000000..daba3a171a --- /dev/null +++ b/hack/boilerplate/boilerplate.generated.go.txt @@ -0,0 +1,16 @@ +/* +Copyright 2021 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + diff --git a/hack/update-codegen.sh b/hack/update-codegen.sh index a80a03b3a5..9023a3a1ae 100755 --- a/hack/update-codegen.sh +++ b/hack/update-codegen.sh @@ -41,4 +41,4 @@ ${CODEGEN_PKG}/generate-groups.sh "deepcopy" \ k8s.io/ingress-nginx/internal k8s.io/ingress-nginx/internal \ .:ingress \ --output-base "$(dirname ${BASH_SOURCE})/../../.." \ - --go-header-file ${SCRIPT_ROOT}/hack/boilerplate/boilerplate.go.txt + --go-header-file ${SCRIPT_ROOT}/hack/boilerplate/boilerplate.generated.go.txt diff --git a/images/echo/Makefile b/images/echo/Makefile index 7a93aec25a..8fbbdce4dd 100644 --- a/images/echo/Makefile +++ b/images/echo/Makefile @@ -36,7 +36,7 @@ build: ensure-buildx --platform=${PLATFORMS} $(OUTPUT) \ --progress=$(PROGRESS) \ --pull \ - --build-arg BASE_IMAGE=k8s.gcr.io/ingress-nginx/nginx:v20210926-g5662db450@sha256:1ef404b5e8741fe49605a1f40c3fdd8ef657aecdb9526ea979d1672eeabd0cd9 \ + --build-arg BASE_IMAGE=k8s.gcr.io/ingress-nginx/nginx:5402d35663917ccbbf77ff48a22b8c6f77097f48@sha256:ec8a104df307f5c6d68157b7ac8e5e1e2c2f0ea07ddf25bb1c6c43c67e351180 \ --build-arg LUAROCKS_VERSION=3.3.1 \ --build-arg LUAROCKS_SHA=837481e408f7c06b59befe7ec194537c657687d624894bca7f79034302141a34 \ -t $(IMAGE):$(TAG) rootfs diff --git a/images/nginx/README.md b/images/nginx/README.md index d018776f5b..a100156a90 100644 --- a/images/nginx/README.md +++ b/images/nginx/README.md @@ -18,7 +18,7 @@ This image provides a default configuration file with no backend servers. _Using docker_ ```console -docker run -v /some/nginx.conf:/etc/nginx/nginx.conf:ro k8s.gcr.io/ingress-nginx/nginx:v20210926-g5662db450@sha256:1ef404b5e8741fe49605a1f40c3fdd8ef657aecdb9526ea979d1672eeabd0cd9 +docker run -v /some/nginx.conf:/etc/nginx/nginx.conf:ro k8s.gcr.io/ingress-nginx/nginx:5402d35663917ccbbf77ff48a22b8c6f77097f48@sha256:ec8a104df307f5c6d68157b7ac8e5e1e2c2f0ea07ddf25bb1c6c43c67e351180 ``` _Creating a replication controller_ diff --git a/images/nginx/rc.yaml b/images/nginx/rc.yaml index 043d7bfe47..cf9c59d15a 100644 --- a/images/nginx/rc.yaml +++ b/images/nginx/rc.yaml @@ -38,7 +38,7 @@ spec: spec: containers: - name: nginx - image: k8s.gcr.io/ingress-nginx/nginx:v20210926-g5662db450@sha256:1ef404b5e8741fe49605a1f40c3fdd8ef657aecdb9526ea979d1672eeabd0cd9 + image: k8s.gcr.io/ingress-nginx/nginx:5402d35663917ccbbf77ff48a22b8c6f77097f48@sha256:ec8a104df307f5c6d68157b7ac8e5e1e2c2f0ea07ddf25bb1c6c43c67e351180 ports: - containerPort: 80 - containerPort: 443 diff --git a/images/test-runner/Makefile b/images/test-runner/Makefile index d19089d835..1a13e51617 100644 --- a/images/test-runner/Makefile +++ b/images/test-runner/Makefile @@ -23,7 +23,7 @@ REGISTRY ?= local IMAGE = $(REGISTRY)/e2e-test-runner -NGINX_BASE_IMAGE ?= k8s.gcr.io/ingress-nginx/nginx:v20210926-g5662db450@sha256:1ef404b5e8741fe49605a1f40c3fdd8ef657aecdb9526ea979d1672eeabd0cd9 +NGINX_BASE_IMAGE ?= k8s.gcr.io/ingress-nginx/nginx:5402d35663917ccbbf77ff48a22b8c6f77097f48@sha256:ec8a104df307f5c6d68157b7ac8e5e1e2c2f0ea07ddf25bb1c6c43c67e351180 # required to enable buildx export DOCKER_CLI_EXPERIMENTAL=enabled diff --git a/test/e2e/framework/deployment.go b/test/e2e/framework/deployment.go index 4440450362..c635c7fcee 100644 --- a/test/e2e/framework/deployment.go +++ b/test/e2e/framework/deployment.go @@ -38,7 +38,7 @@ const SlowEchoService = "slow-echo" const HTTPBinService = "httpbin" // NginxBaseImage use for testing -const NginxBaseImage = "k8s.gcr.io/ingress-nginx/nginx:v20210926-g5662db450@sha256:1ef404b5e8741fe49605a1f40c3fdd8ef657aecdb9526ea979d1672eeabd0cd9" +const NginxBaseImage = "k8s.gcr.io/ingress-nginx/nginx:5402d35663917ccbbf77ff48a22b8c6f77097f48@sha256:ec8a104df307f5c6d68157b7ac8e5e1e2c2f0ea07ddf25bb1c6c43c67e351180" // NewEchoDeployment creates a new single replica deployment of the echoserver image in a particular namespace func (f *Framework) NewEchoDeployment() {