Skip to content

Commit a06d735

Browse files
authored
Merge pull request kubernetes#89152 from claudiubelu/image-promoter/reenable-windows
Image promoter: Reenable Windows test image building
2 parents db999c9 + 94ffe58 commit a06d735

File tree

12 files changed

+50
-23
lines changed

12 files changed

+50
-23
lines changed

test/images/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
REGISTRY ?= gcr.io/kubernetes-e2e-test-images
1616
GOARM ?= 7
17+
DOCKER_CERT_BASE_PATH ?=
1718
QEMUVERSION=v2.9.1
1819
GOLANG_VERSION=1.13.9
1920
export

test/images/agnhost/OWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
approvers:
2+
- claudiubelu

test/images/agnhost/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ For example, let's consider the following `pod.yaml` file:
4040
containers:
4141
- args:
4242
- dns-suffix
43-
image: us.gcr.io/k8s-artifacts-prod/e2e-test-images/agnhost:2.11
43+
image: us.gcr.io/k8s-artifacts-prod/e2e-test-images/agnhost:2.14
4444
name: agnhost
4545
dnsConfig:
4646
nameservers:
@@ -207,7 +207,7 @@ Usage:
207207

208208
```console
209209
guestbook="test/e2e/testing-manifests/guestbook"
210-
sed_expr="s|{{.AgnhostImage}}|us.gcr.io/k8s-artifacts-prod/e2e-test-images/agnhost:2.11|"
210+
sed_expr="s|{{.AgnhostImage}}|us.gcr.io/k8s-artifacts-prod/e2e-test-images/agnhost:2.14|"
211211

212212
# create the services.
213213
kubectl create -f ${guestbook}/frontend-service.yaml
@@ -290,14 +290,14 @@ Examples:
290290

291291
```console
292292
docker run -i \
293-
us.gcr.io/k8s-artifacts-prod/e2e-test-images/agnhost:2.11 \
293+
us.gcr.io/k8s-artifacts-prod/e2e-test-images/agnhost:2.14 \
294294
logs-generator --log-lines-total 10 --run-duration 1s
295295
```
296296

297297
```console
298298
kubectl run logs-generator \
299299
--generator=run-pod/v1 \
300-
--image=us.gcr.io/k8s-artifacts-prod/e2e-test-images/agnhost:2.11 \
300+
--image=us.gcr.io/k8s-artifacts-prod/e2e-test-images/agnhost:2.14 \
301301
--restart=Never \
302302
-- logs-generator -t 10 -d 1s
303303
```
@@ -464,7 +464,7 @@ Usage:
464464
```console
465465
kubectl run test-agnhost \
466466
--generator=run-pod/v1 \
467-
--image=us.gcr.io/k8s-artifacts-prod/e2e-test-images/agnhost:2.11 \
467+
--image=us.gcr.io/k8s-artifacts-prod/e2e-test-images/agnhost:2.14 \
468468
--restart=Never \
469469
--env "POD_IP=<POD_IP>" \
470470
--env "NODE_IP=<NODE_IP>" \
@@ -519,7 +519,7 @@ Usage:
519519
```console
520520
kubectl run test-agnhost \
521521
--generator=run-pod/v1 \
522-
--image=us.gcr.io/k8s-artifacts-prod/e2e-test-images/agnhost:2.11 \
522+
--image=us.gcr.io/k8s-artifacts-prod/e2e-test-images/agnhost:2.14 \
523523
--restart=Never \
524524
--env "BIND_ADDRESS=localhost" \
525525
--env "BIND_PORT=8080" \
@@ -647,6 +647,6 @@ The Windows `agnhost` image includes a `nc` binary that is 100% compliant with i
647647

648648
## Image
649649

650-
The image can be found at `us.gcr.io/k8s-artifacts-prod/e2e-test-images/agnhost:2.11` for both Linux and
650+
The image can be found at `us.gcr.io/k8s-artifacts-prod/e2e-test-images/agnhost:2.14` for both Linux and
651651
Windows containers (based on `mcr.microsoft.com/windows/servercore:ltsc2019`,
652652
`mcr.microsoft.com/windows/servercore:1903`, and `mcr.microsoft.com/windows/servercore:1909`).

test/images/agnhost/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.13
1+
2.14

test/images/agnhost/agnhost.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ import (
4949
)
5050

5151
func main() {
52-
rootCmd := &cobra.Command{Use: "app", Version: "2.13"}
52+
rootCmd := &cobra.Command{Use: "app", Version: "2.14"}
5353

5454
rootCmd.AddCommand(auditproxy.CmdAuditProxy)
5555
rootCmd.AddCommand(connect.CmdConnect)

test/images/busybox/OWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
approvers:
2+
- claudiubelu

test/images/cloudbuild.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ timeout: 5400s
77
# or any new substitutions added in the future.
88
options:
99
substitution_option: ALLOW_LOOSE
10+
machineType: 'N1_HIGHCPU_8'
1011
steps:
1112
- name: 'gcr.io/k8s-testimages/gcb-docker-gcloud:v20190906-745fed4'
1213
entrypoint: make
@@ -17,6 +18,10 @@ steps:
1718
- BASE_REF=$_PULL_BASE_REF
1819
- WHAT=$_WHAT
1920
- REGISTRY=gcr.io/k8s-staging-e2e-test-images
21+
- DOCKER_CERT_BASE_PATH=/root
22+
- REMOTE_DOCKER_URL_1809=tcp://img-promoter-1809.eastus.cloudapp.azure.com:2376
23+
- REMOTE_DOCKER_URL_1903=tcp://img-promoter-1903.eastus.cloudapp.azure.com:2376
24+
- REMOTE_DOCKER_URL_1909=tcp://img-promoter-1909.eastus.cloudapp.azure.com:2376
2025
# TODO(claudiub): Readd the REMOTE_DOCKER_URL_${os_version} to reenable the Windows test image building process.
2126
args:
2227
- all-build-and-push

test/images/image-util.sh

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ set -o pipefail
2121
TASK=$1
2222
WHAT=$2
2323

24+
# Connecting to a Remote Docker requires certificates for authentication, which can be found
25+
# at this path. By default, they can be found in the ${HOME} folder. We're expecting to find
26+
# here ".docker-${os_version}" folders which contains the necessary certificates.
27+
DOCKER_CERT_BASE_PATH="${DOCKER_CERT_BASE_PATH:-${HOME}}"
28+
2429
KUBE_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd -P)"
2530
source "${KUBE_ROOT}/hack/lib/logging.sh"
2631
source "${KUBE_ROOT}/hack/lib/util.sh"
@@ -150,8 +155,8 @@ build() {
150155
# The node requires TLS authentication, and thus it is expected that the
151156
# ca.pem, cert.pem, key.pem files can be found in the ${HOME}/.docker-${os_version} folder.
152157
# TODO(claudiub): add "build --isolation=hyperv" once GCE introduces Hyper-V support.
153-
docker --tlsverify --tlscacert "${HOME}/.docker-${os_version}/ca.pem" \
154-
--tlscert "${HOME}/.docker-${os_version}/cert.pem" --tlskey "${HOME}/.docker-${os_version}/key.pem" \
158+
docker --tlsverify --tlscacert "${DOCKER_CERT_BASE_PATH}/.docker-${os_version}/ca.pem" \
159+
--tlscert "${DOCKER_CERT_BASE_PATH}/.docker-${os_version}/cert.pem" --tlskey "${DOCKER_CERT_BASE_PATH}/.docker-${os_version}/key.pem" \
155160
-H "${REMOTE_DOCKER_URL}" build --pull -t "${REGISTRY}/${image}:${TAG}-${os_name}-${arch}-${os_version}" \
156161
--build-arg BASEIMAGE="${BASEIMAGE}" -f $dockerfile_name .
157162
fi
@@ -187,8 +192,8 @@ push() {
187192
docker push "${REGISTRY}/${image}:${TAG}-${os_name}-${arch}"
188193
elif [[ -n "${REMOTE_DOCKER_URL:-}" ]]; then
189194
# NOTE(claudiub): We're pushing the image we built on the remote Windows node.
190-
docker --tlsverify --tlscacert "${HOME}/.docker-${os_version}/ca.pem" \
191-
--tlscert "${HOME}/.docker-${os_version}/cert.pem" --tlskey "${HOME}/.docker-${os_version}/key.pem" \
195+
docker --tlsverify --tlscacert "${DOCKER_CERT_BASE_PATH}/.docker-${os_version}/ca.pem" \
196+
--tlscert "${DOCKER_CERT_BASE_PATH}/.docker-${os_version}/cert.pem" --tlskey "${DOCKER_CERT_BASE_PATH}/.docker-${os_version}/key.pem" \
192197
-H "${REMOTE_DOCKER_URL}" push "${REGISTRY}/${image}:${TAG}-${os_name}-${arch}-${os_version}"
193198
else
194199
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."

test/images/kitten/BASEIMAGE

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
linux/amd64=REGISTRY/agnhost:2.13-linux-amd64
2-
linux/arm=REGISTRY/agnhost:2.13-linux-arm
3-
linux/arm64=REGISTRY/agnhost:2.13-linux-arm64
4-
linux/ppc64le=REGISTRY/agnhost:2.13-linux-ppc64le
5-
linux/s390x=REGISTRY/agnhost:2.13-linux-s390x
1+
linux/amd64=REGISTRY/agnhost:2.14-linux-amd64
2+
linux/arm=REGISTRY/agnhost:2.14-linux-arm
3+
linux/arm64=REGISTRY/agnhost:2.14-linux-arm64
4+
linux/ppc64le=REGISTRY/agnhost:2.14-linux-ppc64le
5+
linux/s390x=REGISTRY/agnhost:2.14-linux-s390x
6+
windows/amd64/1809=REGISTRY/agnhost:2.14-windows-amd64-1809
7+
windows/amd64/1903=REGISTRY/agnhost:2.14-windows-amd64-1903
8+
windows/amd64/1909=REGISTRY/agnhost:2.14-windows-amd64-1909

test/images/kitten/OWNERS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
approvers:
2+
- claudiubelu
3+
- mkumatag

0 commit comments

Comments
 (0)