mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 10:51:29 +00:00
Image promoter: Reenable Windows test image building
The build times are a bit high for the image builder (~50 minutes), and it will a bit more when Windows support will be added to the other test images. This commit changes the machineType to N1_HIGHCPU_8. Reenables Windows test image building. Added DOCKER_CERT_BASE_PATH (default value: $HOME), which will contain the path where the certificates needed for Remote Docker Connection can be found. If a REMOTE_DOCKER_URL was not set for a particular OS version, exclude that image from the manifest list. This fixes an issue where, if REMOTE_DOCKER_URL was not set for Windows Server 1909, the Windows were completely excluded from the manifest list, including for Windows Server 1809 and 1903 which could have been built and pushed. Sets "test-webserver" as the default CMD for kitten and nautilus. Since they are now based on agnhost, they should be set to run test-webserver to maintain previous behaviour. Bumps the agnhost version to 2.13, as 2.12 has already been promoted. 2.13 will contain Windows support. Adds Windows support for the kitten and nautilus images, so they can promoted together with agnhost (they were not previously promoted). Adds OWNERS files to: agnhost, busybox, kitten, nautilus.
This commit is contained in:
parent
c1f1b1bceb
commit
94ffe582e9
@ -14,6 +14,7 @@
|
|||||||
|
|
||||||
REGISTRY ?= gcr.io/kubernetes-e2e-test-images
|
REGISTRY ?= gcr.io/kubernetes-e2e-test-images
|
||||||
GOARM ?= 7
|
GOARM ?= 7
|
||||||
|
DOCKER_CERT_BASE_PATH ?=
|
||||||
QEMUVERSION=v2.9.1
|
QEMUVERSION=v2.9.1
|
||||||
GOLANG_VERSION=1.13.9
|
GOLANG_VERSION=1.13.9
|
||||||
export
|
export
|
||||||
|
2
test/images/agnhost/OWNERS
Normal file
2
test/images/agnhost/OWNERS
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
approvers:
|
||||||
|
- claudiubelu
|
@ -40,7 +40,7 @@ For example, let's consider the following `pod.yaml` file:
|
|||||||
containers:
|
containers:
|
||||||
- args:
|
- args:
|
||||||
- dns-suffix
|
- dns-suffix
|
||||||
image: us.gcr.io/k8s-artifacts-prod/e2e-test-images/agnhost:2.11
|
image: us.gcr.io/k8s-artifacts-prod/e2e-test-images/agnhost:2.14
|
||||||
name: agnhost
|
name: agnhost
|
||||||
dnsConfig:
|
dnsConfig:
|
||||||
nameservers:
|
nameservers:
|
||||||
@ -207,7 +207,7 @@ Usage:
|
|||||||
|
|
||||||
```console
|
```console
|
||||||
guestbook="test/e2e/testing-manifests/guestbook"
|
guestbook="test/e2e/testing-manifests/guestbook"
|
||||||
sed_expr="s|{{.AgnhostImage}}|us.gcr.io/k8s-artifacts-prod/e2e-test-images/agnhost:2.11|"
|
sed_expr="s|{{.AgnhostImage}}|us.gcr.io/k8s-artifacts-prod/e2e-test-images/agnhost:2.14|"
|
||||||
|
|
||||||
# create the services.
|
# create the services.
|
||||||
kubectl create -f ${guestbook}/frontend-service.yaml
|
kubectl create -f ${guestbook}/frontend-service.yaml
|
||||||
@ -290,14 +290,14 @@ Examples:
|
|||||||
|
|
||||||
```console
|
```console
|
||||||
docker run -i \
|
docker run -i \
|
||||||
us.gcr.io/k8s-artifacts-prod/e2e-test-images/agnhost:2.11 \
|
us.gcr.io/k8s-artifacts-prod/e2e-test-images/agnhost:2.14 \
|
||||||
logs-generator --log-lines-total 10 --run-duration 1s
|
logs-generator --log-lines-total 10 --run-duration 1s
|
||||||
```
|
```
|
||||||
|
|
||||||
```console
|
```console
|
||||||
kubectl run logs-generator \
|
kubectl run logs-generator \
|
||||||
--generator=run-pod/v1 \
|
--generator=run-pod/v1 \
|
||||||
--image=us.gcr.io/k8s-artifacts-prod/e2e-test-images/agnhost:2.11 \
|
--image=us.gcr.io/k8s-artifacts-prod/e2e-test-images/agnhost:2.14 \
|
||||||
--restart=Never \
|
--restart=Never \
|
||||||
-- logs-generator -t 10 -d 1s
|
-- logs-generator -t 10 -d 1s
|
||||||
```
|
```
|
||||||
@ -464,7 +464,7 @@ Usage:
|
|||||||
```console
|
```console
|
||||||
kubectl run test-agnhost \
|
kubectl run test-agnhost \
|
||||||
--generator=run-pod/v1 \
|
--generator=run-pod/v1 \
|
||||||
--image=us.gcr.io/k8s-artifacts-prod/e2e-test-images/agnhost:2.11 \
|
--image=us.gcr.io/k8s-artifacts-prod/e2e-test-images/agnhost:2.14 \
|
||||||
--restart=Never \
|
--restart=Never \
|
||||||
--env "POD_IP=<POD_IP>" \
|
--env "POD_IP=<POD_IP>" \
|
||||||
--env "NODE_IP=<NODE_IP>" \
|
--env "NODE_IP=<NODE_IP>" \
|
||||||
@ -519,7 +519,7 @@ Usage:
|
|||||||
```console
|
```console
|
||||||
kubectl run test-agnhost \
|
kubectl run test-agnhost \
|
||||||
--generator=run-pod/v1 \
|
--generator=run-pod/v1 \
|
||||||
--image=us.gcr.io/k8s-artifacts-prod/e2e-test-images/agnhost:2.11 \
|
--image=us.gcr.io/k8s-artifacts-prod/e2e-test-images/agnhost:2.14 \
|
||||||
--restart=Never \
|
--restart=Never \
|
||||||
--env "BIND_ADDRESS=localhost" \
|
--env "BIND_ADDRESS=localhost" \
|
||||||
--env "BIND_PORT=8080" \
|
--env "BIND_PORT=8080" \
|
||||||
@ -647,6 +647,6 @@ The Windows `agnhost` image includes a `nc` binary that is 100% compliant with i
|
|||||||
|
|
||||||
## Image
|
## Image
|
||||||
|
|
||||||
The image can be found at `us.gcr.io/k8s-artifacts-prod/e2e-test-images/agnhost:2.11` for both Linux and
|
The image can be found at `us.gcr.io/k8s-artifacts-prod/e2e-test-images/agnhost:2.14` for both Linux and
|
||||||
Windows containers (based on `mcr.microsoft.com/windows/servercore:ltsc2019`,
|
Windows containers (based on `mcr.microsoft.com/windows/servercore:ltsc2019`,
|
||||||
`mcr.microsoft.com/windows/servercore:1903`, and `mcr.microsoft.com/windows/servercore:1909`).
|
`mcr.microsoft.com/windows/servercore:1903`, and `mcr.microsoft.com/windows/servercore:1909`).
|
||||||
|
@ -1 +1 @@
|
|||||||
2.13
|
2.14
|
||||||
|
@ -49,7 +49,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
rootCmd := &cobra.Command{Use: "app", Version: "2.13"}
|
rootCmd := &cobra.Command{Use: "app", Version: "2.14"}
|
||||||
|
|
||||||
rootCmd.AddCommand(auditproxy.CmdAuditProxy)
|
rootCmd.AddCommand(auditproxy.CmdAuditProxy)
|
||||||
rootCmd.AddCommand(connect.CmdConnect)
|
rootCmd.AddCommand(connect.CmdConnect)
|
||||||
|
2
test/images/busybox/OWNERS
Normal file
2
test/images/busybox/OWNERS
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
approvers:
|
||||||
|
- claudiubelu
|
@ -7,6 +7,7 @@ timeout: 5400s
|
|||||||
# or any new substitutions added in the future.
|
# or any new substitutions added in the future.
|
||||||
options:
|
options:
|
||||||
substitution_option: ALLOW_LOOSE
|
substitution_option: ALLOW_LOOSE
|
||||||
|
machineType: 'N1_HIGHCPU_8'
|
||||||
steps:
|
steps:
|
||||||
- name: 'gcr.io/k8s-testimages/gcb-docker-gcloud:v20190906-745fed4'
|
- name: 'gcr.io/k8s-testimages/gcb-docker-gcloud:v20190906-745fed4'
|
||||||
entrypoint: make
|
entrypoint: make
|
||||||
@ -17,6 +18,10 @@ steps:
|
|||||||
- BASE_REF=$_PULL_BASE_REF
|
- BASE_REF=$_PULL_BASE_REF
|
||||||
- WHAT=$_WHAT
|
- WHAT=$_WHAT
|
||||||
- REGISTRY=gcr.io/k8s-staging-e2e-test-images
|
- REGISTRY=gcr.io/k8s-staging-e2e-test-images
|
||||||
|
- DOCKER_CERT_BASE_PATH=/root
|
||||||
|
- REMOTE_DOCKER_URL_1809=tcp://img-promoter-1809.eastus.cloudapp.azure.com:2376
|
||||||
|
- REMOTE_DOCKER_URL_1903=tcp://img-promoter-1903.eastus.cloudapp.azure.com:2376
|
||||||
|
- REMOTE_DOCKER_URL_1909=tcp://img-promoter-1909.eastus.cloudapp.azure.com:2376
|
||||||
# TODO(claudiub): Readd the REMOTE_DOCKER_URL_${os_version} to reenable the Windows test image building process.
|
# TODO(claudiub): Readd the REMOTE_DOCKER_URL_${os_version} to reenable the Windows test image building process.
|
||||||
args:
|
args:
|
||||||
- all-build-and-push
|
- all-build-and-push
|
||||||
|
@ -21,6 +21,11 @@ set -o pipefail
|
|||||||
TASK=$1
|
TASK=$1
|
||||||
WHAT=$2
|
WHAT=$2
|
||||||
|
|
||||||
|
# Connecting to a Remote Docker requires certificates for authentication, which can be found
|
||||||
|
# at this path. By default, they can be found in the ${HOME} folder. We're expecting to find
|
||||||
|
# here ".docker-${os_version}" folders which contains the necessary certificates.
|
||||||
|
DOCKER_CERT_BASE_PATH="${DOCKER_CERT_BASE_PATH:-${HOME}}"
|
||||||
|
|
||||||
KUBE_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd -P)"
|
KUBE_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd -P)"
|
||||||
source "${KUBE_ROOT}/hack/lib/logging.sh"
|
source "${KUBE_ROOT}/hack/lib/logging.sh"
|
||||||
source "${KUBE_ROOT}/hack/lib/util.sh"
|
source "${KUBE_ROOT}/hack/lib/util.sh"
|
||||||
@ -135,8 +140,8 @@ build() {
|
|||||||
# The node requires TLS authentication, and thus it is expected that the
|
# The node requires TLS authentication, and thus it is expected that the
|
||||||
# ca.pem, cert.pem, key.pem files can be found in the ${HOME}/.docker-${os_version} folder.
|
# ca.pem, cert.pem, key.pem files can be found in the ${HOME}/.docker-${os_version} folder.
|
||||||
# TODO(claudiub): add "build --isolation=hyperv" once GCE introduces Hyper-V support.
|
# TODO(claudiub): add "build --isolation=hyperv" once GCE introduces Hyper-V support.
|
||||||
docker --tlsverify --tlscacert "${HOME}/.docker-${os_version}/ca.pem" \
|
docker --tlsverify --tlscacert "${DOCKER_CERT_BASE_PATH}/.docker-${os_version}/ca.pem" \
|
||||||
--tlscert "${HOME}/.docker-${os_version}/cert.pem" --tlskey "${HOME}/.docker-${os_version}/key.pem" \
|
--tlscert "${DOCKER_CERT_BASE_PATH}/.docker-${os_version}/cert.pem" --tlskey "${DOCKER_CERT_BASE_PATH}/.docker-${os_version}/key.pem" \
|
||||||
-H "${REMOTE_DOCKER_URL}" build --pull -t "${REGISTRY}/${image}:${TAG}-${os_name}-${arch}-${os_version}" \
|
-H "${REMOTE_DOCKER_URL}" build --pull -t "${REGISTRY}/${image}:${TAG}-${os_name}-${arch}-${os_version}" \
|
||||||
--build-arg BASEIMAGE="${BASEIMAGE}" -f $dockerfile_name .
|
--build-arg BASEIMAGE="${BASEIMAGE}" -f $dockerfile_name .
|
||||||
else
|
else
|
||||||
@ -192,21 +197,16 @@ push() {
|
|||||||
docker push "${REGISTRY}/${image}:${TAG}-${os_name}-${arch}"
|
docker push "${REGISTRY}/${image}:${TAG}-${os_name}-${arch}"
|
||||||
elif [[ -n "${REMOTE_DOCKER_URL:-}" ]]; then
|
elif [[ -n "${REMOTE_DOCKER_URL:-}" ]]; then
|
||||||
# NOTE(claudiub): We're pushing the image we built on the remote Windows node.
|
# NOTE(claudiub): We're pushing the image we built on the remote Windows node.
|
||||||
docker --tlsverify --tlscacert "${HOME}/.docker-${os_version}/ca.pem" \
|
docker --tlsverify --tlscacert "${DOCKER_CERT_BASE_PATH}/.docker-${os_version}/ca.pem" \
|
||||||
--tlscert "${HOME}/.docker-${os_version}/cert.pem" --tlskey "${HOME}/.docker-${os_version}/key.pem" \
|
--tlscert "${DOCKER_CERT_BASE_PATH}/.docker-${os_version}/cert.pem" --tlskey "${DOCKER_CERT_BASE_PATH}/.docker-${os_version}/key.pem" \
|
||||||
-H "${REMOTE_DOCKER_URL}" push "${REGISTRY}/${image}:${TAG}-${os_name}-${arch}-${os_version}"
|
-H "${REMOTE_DOCKER_URL}" push "${REGISTRY}/${image}:${TAG}-${os_name}-${arch}-${os_version}"
|
||||||
else
|
else
|
||||||
echo "Cannot push the image '${image}' for ${os_arch}. REMOTE_DOCKER_URL_${os_version} should be set, containing the URL to a Windows docker daemon."
|
echo "Cannot push the image '${image}' for ${os_arch}. REMOTE_DOCKER_URL_${os_version} should be set, containing the URL to a Windows docker daemon."
|
||||||
|
# we should exclude this image from the manifest list as well, we couldn't build / push it.
|
||||||
|
os_archs=$(printf "%s\n" "$os_archs" | grep -v "$os_arch" || true)
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# NOTE(claudiub): if the REMOTE_DOCKER_URL var is not set, or it is an empty string, we mustn't include
|
|
||||||
# Windows images into the manifest list.
|
|
||||||
if test -z "${REMOTE_DOCKER_URL:-}" && printf "%s\n" "$os_archs" | grep -q '^windows'; then
|
|
||||||
echo "Skipping pushing the image '${image}' for Windows. REMOTE_DOCKER_URL_\${os_version} should be set, containing the URL to a Windows docker daemon."
|
|
||||||
os_archs=$(printf "%s\n" "$os_archs" | grep -v "^windows" || true)
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -z "${os_archs}"; then
|
if test -z "${os_archs}"; then
|
||||||
# this can happen for Windows-only images if they have been skipped entirely.
|
# this can happen for Windows-only images if they have been skipped entirely.
|
||||||
echo "No image for the manifest list. Skipping ${image}."
|
echo "No image for the manifest list. Skipping ${image}."
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
linux/amd64=REGISTRY/agnhost:2.13-linux-amd64
|
linux/amd64=REGISTRY/agnhost:2.14-linux-amd64
|
||||||
linux/arm=REGISTRY/agnhost:2.13-linux-arm
|
linux/arm=REGISTRY/agnhost:2.14-linux-arm
|
||||||
linux/arm64=REGISTRY/agnhost:2.13-linux-arm64
|
linux/arm64=REGISTRY/agnhost:2.14-linux-arm64
|
||||||
linux/ppc64le=REGISTRY/agnhost:2.13-linux-ppc64le
|
linux/ppc64le=REGISTRY/agnhost:2.14-linux-ppc64le
|
||||||
linux/s390x=REGISTRY/agnhost:2.13-linux-s390x
|
linux/s390x=REGISTRY/agnhost:2.14-linux-s390x
|
||||||
|
windows/amd64/1809=REGISTRY/agnhost:2.14-windows-amd64-1809
|
||||||
|
windows/amd64/1903=REGISTRY/agnhost:2.14-windows-amd64-1903
|
||||||
|
windows/amd64/1909=REGISTRY/agnhost:2.14-windows-amd64-1909
|
||||||
|
@ -16,3 +16,4 @@ ARG BASEIMAGE
|
|||||||
FROM $BASEIMAGE
|
FROM $BASEIMAGE
|
||||||
COPY html/kitten.jpg kitten.jpg
|
COPY html/kitten.jpg kitten.jpg
|
||||||
COPY html/data.json data.json
|
COPY html/data.json data.json
|
||||||
|
CMD ["test-webserver"]
|
||||||
|
3
test/images/kitten/OWNERS
Normal file
3
test/images/kitten/OWNERS
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
approvers:
|
||||||
|
- claudiubelu
|
||||||
|
- mkumatag
|
@ -1,5 +1,8 @@
|
|||||||
linux/amd64=REGISTRY/agnhost:2.13-linux-amd64
|
linux/amd64=REGISTRY/agnhost:2.14-linux-amd64
|
||||||
linux/arm=REGISTRY/agnhost:2.13-linux-arm
|
linux/arm=REGISTRY/agnhost:2.14-linux-arm
|
||||||
linux/arm64=REGISTRY/agnhost:2.13-linux-arm64
|
linux/arm64=REGISTRY/agnhost:2.14-linux-arm64
|
||||||
linux/ppc64le=REGISTRY/agnhost:2.13-linux-ppc64le
|
linux/ppc64le=REGISTRY/agnhost:2.14-linux-ppc64le
|
||||||
linux/s390x=REGISTRY/agnhost:2.13-linux-s390x
|
linux/s390x=REGISTRY/agnhost:2.14-linux-s390x
|
||||||
|
windows/amd64/1809=REGISTRY/agnhost:2.14-windows-amd64-1809
|
||||||
|
windows/amd64/1903=REGISTRY/agnhost:2.14-windows-amd64-1903
|
||||||
|
windows/amd64/1909=REGISTRY/agnhost:2.14-windows-amd64-1909
|
||||||
|
@ -16,3 +16,4 @@ ARG BASEIMAGE
|
|||||||
FROM $BASEIMAGE
|
FROM $BASEIMAGE
|
||||||
COPY html/nautilus.jpg nautilus.jpg
|
COPY html/nautilus.jpg nautilus.jpg
|
||||||
COPY html/data.json data.json
|
COPY html/data.json data.json
|
||||||
|
CMD ["test-webserver"]
|
||||||
|
3
test/images/nautilus/OWNERS
Normal file
3
test/images/nautilus/OWNERS
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
approvers:
|
||||||
|
- claudiubelu
|
||||||
|
- mkumatag
|
Loading…
Reference in New Issue
Block a user