mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 05:57:25 +00:00
Merge pull request #89152 from claudiubelu/image-promoter/reenable-windows
Image promoter: Reenable Windows test image building
This commit is contained in:
commit
a06d735829
@ -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"
|
||||||
@ -150,8 +155,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 .
|
||||||
fi
|
fi
|
||||||
@ -187,8 +192,8 @@ 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."
|
||||||
|
@ -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
|
||||||
|
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
|
||||||
|
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