Commit Graph

557 Commits

Author SHA1 Message Date
Jason Simmons
d0f19815d2 Updates agnhost image VERSION and README 2020-04-21 09:43:58 -04:00
Jason Simmons
c56d8df5e3 Adds HTTPS logic to agnhost netexec
The agnhost image used for testing has a `netexec` path which supports
two new flags, `--tls-cert-file` and `--tls-private-key-file`. If the
former is provided, the HTTP server will be upgraded to HTTPS, using the
certificate (and private key) provided.

By default, there are keys already mounted into the container at
`/localhost.crt` and `/localhost.key`, which contain PEM-encoded TLS
certs with IP SANs for `127.0.0.1` and `[::1]`.
2020-04-16 11:42:37 -04:00
Kubernetes Prow Robot
5ccc6e0142
Merge pull request #90166 from claudiubelu/test-images/owner-files-part-2
test images: Adds OWNERS files for images (part 2)
2020-04-15 11:36:42 -07:00
Kubernetes Prow Robot
a06d735829
Merge pull request #89152 from claudiubelu/image-promoter/reenable-windows
Image promoter: Reenable Windows test image building
2020-04-15 11:35:46 -07:00
Claudiu Belu
2b5fb5366f test images: Adds OWNERS files for images (part 2)
Adds reviewers to the OWNERS files in the kubernetes/test/images folder.
The reviewers are added automatically, based on their contributions on
an image (>= 20% code churn).

Note that the code churn is taken into account for authors, and not committers.

Adds ONWERS files for: apparmor-loader, echoserver, jessie-dnsutils, metadata-concealment,
sample-apiserver.
2020-04-14 05:18:34 -07:00
Claudiu Belu
94ffe582e9 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.
2020-04-14 05:12:46 -07:00
Kubernetes Prow Robot
4bdb72ed11
Merge pull request #89113 from claudiubelu/test-images/fixes-and-cleanups
test images: Adds various fixes and cleanups to the image building process
2020-04-08 18:19:44 -07:00
Federico Paolinelli
e31f72e3a4 Bump agnhost version to 2.13, and bump up depending images.
Kitten / nautilus depend on agnhost.

Signed-off-by: Federico Paolinelli <fpaoline@redhat.com>
2020-04-03 13:00:23 -04:00
Kubernetes Prow Robot
2fd8debe9b
Merge pull request #87926 from fedepaol/agnostsctp
Preliminary SCTP connectivity tests
2020-04-02 02:12:24 -07:00
Stephen Augustus
b6179ac7b9 deps: Update to Golang 1.13.9
Signed-off-by: Stephen Augustus <saugustus@vmware.com>
Co-authored-by: Jeff Grafton <jgrafton@google.com>
2020-03-23 17:10:03 -04:00
Claudiu Belu
7389385a20 test images: Adds various fixes and cleanups to the image building process
Adds splitOsArch function to image-util.sh, which makes the script DRY-er.

When building a Windows test image, if REMOTE_DOCKER_URL is not set, skip the rest of the
building process for that image, which will save some time (no need to build binaries).

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.
2020-03-14 15:18:10 -07:00
Dan Winship
55d3408211 agnhost: add SCTP support to netexec 2020-03-04 23:34:15 +01:00
Claudiu Belu
06062b15e9 test images: ARG instructions should be first
A few other Dockerfiles had the ARG duplicated as well.
2020-02-28 01:31:05 -08:00
Claudiu Belu
ce30d2d5c8 test images: Skip building manifest list if no image was pushed
For Windows-only images, if there is no image built / pushed, you cannot create
a manifest list.
2020-02-27 19:05:47 -08:00
Claudiu Belu
acf84351e4 test images: Rebases nautilus and kitten images
The current agnhost version is 2.12, 2.11 was not previously built as the
VERSION bumps merged one after the other, and the Image Promoter did not get to
build the 2.11 image.
2020-02-27 06:04:01 -08:00
Claudiu Belu
117cbda487 Image Promoter: Allows images to be pushed immediately after being built
In the current version, due to how make works, when building all the conformance
images (make all-push WHAT=all-conformance), ALL the images are being built first
before being pushed.

This PR will allow images to be built and pushed immediately afterwards, so the first
images that have been succesfully built are already pushed and promotable, even if
the the task failed on the last image, or it timed out.
2020-02-27 06:00:03 -08:00
Claudiu Belu
b6b60f7fa5 test images: Temporarely exclude Windows test images
A previous PR (#76838) introduced the ability to build and publish
Windows Test Images to kubernetes/test/images/image-util.sh.

Additionally, that PR also configured the Image Promoter to use a
few Windows Remote Docker build nodes to build the Windows Test Images,
however, there is a minor issue: the build container has a different $HOME
folder than expected (is: /builder/home, expected: /root - since it's the
root user), and the Remote Docker credentials are mounted in /root.

Because of that, image-build.sh cannot find the credentials it needs.
This will have to be properly fixed, but for now, we can just skip
the Windows image building part.
2020-02-26 22:51:26 -08:00
Kubernetes Prow Robot
f692f5cfcd
Merge pull request #88049 from mtaufen/provider-info-agnhost
Update agnhost to test OIDC validation of JWT tokens
2020-03-04 03:43:47 -08:00
Charles Eckman
5ceecd3ba3 Update agnhost to test OIDC validation of JWT tokens
Extends agnhost with the capability to validate a mounted token against
the API server's OIDC endpoints.

Co-authored-by: Michael Taufen <mtaufen@google.com>
2020-03-03 15:27:47 -08:00
Kubernetes Prow Robot
a5048219ee
Merge pull request #76838 from claudiubelu/test-images/windows-support
test images: Adds Windows Container images support (part 1)
2020-03-02 16:15:38 -08:00
ialidzhikov
e26fff5cbc Update to golang@1.13.8
Signed-off-by: ialidzhikov <i.alidjikov@gmail.com>
2020-02-27 09:27:48 +02:00
Stephen Augustus
e64169d6b5 build: Enable kube-cross push/pull from K8s Infra GCR
- Search/replace Google Infra kube-cross locations for K8s Infra
- Update kube-cross make targets
  - Don't attempt to pre-pull image (docker build --pull)
    This prevents CI failures when the image under test doesn't exist
    yet in the registry.
  - 'make all' now builds and pushes the kube-cross image
  - Allow 'TAG' to be specified via env var
  - Use 'KUBE_CROSS_VERSION' to represent the kube-cross version
  - Tag kube-cross images with both a kubernetes version
    ('git describe') and a kube-cross version
- Add a GCB (Google Cloud Build) config file (cloudbuild.yaml)

Signed-off-by: Stephen Augustus <saugustus@vmware.com>
2020-02-26 16:51:01 -05:00
Claudiu Belu
8cb84feef3 test images: Updates agnhost guestbook
A previous PR replaced the usage of Redis in the guestbook app test
with Agnhost. The replacement went well for Linux setups and Containers,
which is why the tests are green, but there is a network particularity on
Windows setups which won't allow the test to pass.

The issue was observed with another test hitting the same issue:
https://github.com/kubernetes/kubernetes/issues/83072

Here's exactly what happens during the test:

- frontend containers are created, having the /guestbook endpoint. Its main
  purpose is to forward the call to either agnhost-master (cmd=set), or
  agnhost-slave (cmd=get).
- agnhost-master container is created, having the /set endpoint, and the
  /register endpoint, through which the agnhost-slave containers would
  register to it. Its purpose is to propagate all data received through /set
  to its clients.
- agnhost-slave containers are created, having the /set and /get endpoints.
  They would register to agnhost-master, and then receive any and all updates
  from it, which was then served through the /get endpoint.

For simplicity, all 3 types have the same agnhost subcommand (agnhost guestbook), being
able to satisfy its given purpose. For this, HTTP servers were being used, including
for the /register endpoints. agnhost-master would send its /set updates as /set HTTP
requests. However, because of the issue listed above, agnhost-master did not receive
the client's IP, but rather the container host's IP, resulting in the request being
sent to the wrong destination.

This PR updates the agnhost guestbook subcommand. Now, the agnhost subscriber nodes will
send their own IP to the /register endpoint (/endpoint?host=myip).
2020-02-25 09:45:43 -08:00
Kubernetes Prow Robot
2e0760c659
Merge pull request #87611 from claudiubelu/test-images/updates-readme
test images: Adds Image Promoter details in the README
2020-02-21 18:30:48 -08:00
Claudiu Belu
91dc590cde test images: Adds building README
Adds a README explaining the image building process, including the
Windows Container image building process.
2020-02-21 02:11:26 -08:00
Claudiu Belu
b71fbdb364 Image Promoter: Adds Windows build nodes for Windows test images
We have added and enabled the Image Promoter on the k/k test images, which
will build the conformance images after a PR that affects kubernetes/test/images
merges.

We have added support for image-util.sh to handle external Windows Docker connections
in order to build Windows images.

This PR enables the Image Promoter to use some Windows nodes to build the necessary
Windows images.
2020-02-21 02:09:49 -08:00
Claudiu Belu
fe15a46939 test images: Use multiple Windows nodes to build images
In order to build Windows container images for multiple OS versions,
--isolation=hyperv is required. However, not all clouds / nodes supports
or have it enabled by default, which is why we're going to rely on
having multiple nodes to build the Windows images, until this issue
is addressed.
2020-02-21 02:09:49 -08:00
Claudiu Belu
3cdb7a89cb test images: Adds multiple Windows channels support
This commit adds support for building test images for multiple
Windows versions, as we have to support both LTS and SAC channels.

With this, the format for Windows images in the BASEIMAGE files is:

OS/ARCH/OS_VERSION

Also adds --isolation-hyperv to the Windows docker build command, making sure
that container images for multiple OS versions can be built using the same
Windows node.
2020-02-21 02:09:49 -08:00
Claudiu Belu
296464d968 test images: Adds Windows support (part 1)
Adds Windows support to the test/images/image-util.sh script.

A Windows node with Docker installed is required to build Windows images.
The connection URL to it must be set in the REMOTE_DOCKER_URL env variable.
Additionally, the authentication to the remote docker node is done through
certificates, which must be found in ~/.docker.

By default, the REMOTE_DOCKER_URL env variable is set to "" in the Makefile,
and because of it, the image-util.sh script will skip building and pushing
Windows images.

Added GOOS argument to the go build process in order to be able to build
Windows binaries. Additionally, the OS env variable was added to the images
Makefiles (default value is "linux") in order to maintain default behaviour.

Some images require a different Dockerfile for Windows images, since they
have different ways of installing dependencies. Because of this, if a image
needs to be built for Windows, it will first check for a Dockerfile_windows
file instead of the default one. If there isn't one, it means that the
same Dockerfile can be used for both Windows and Linux.

All Windows images will be based on the image
"mcr.microsoft.com/windows/servercore:ltsc2019". There are a couple of features
that are needed from this image, especially powershell.

Added busybox image for Windows. Most Windows images will be based on it, which
will help reduce the command line differences between Linux and Windows, but
not entirely.

Added Windows support for agnhost image.
2020-02-21 02:09:49 -08:00
Claudiu Belu
a4ceb143dd images: Changes the image naming template
Changes the image naming template from:

$REGISTRY/$image-$arch:$TAG

to

$REGISTRY/$image:$TAG-$os_name-$arch

The previous naming template would generate a plethora of images (Ai * N images,
where Ai is the number of OS/architectures for the image i and N is the number
of images), while the new naming template will reduce the number of images to N.

The new template also includes the OS name, as we plan to integrate Windows
images into the manifest lists as well.
2020-02-21 02:09:49 -08:00
Claudiu Belu
25b7a13864 images: Configurable BASEIMAGE hierarchy
When building images, their REGISTRY can be set to a custom
one, instead of the default "gcr.io/kubernetes-e2e-test-images" or
"us.gcr.io/k8s-artifacts-prod/e2e-test-images".
Some images are based on other images we're already building
(e.g.: kitten, nautilus), but their base images
are set in the default registry name, which can be undesirable.

This commit addresses this issue.
2020-02-21 02:09:49 -08:00
Claudiu Belu
efcdb929de images: Adds linux/ prefix to BASEIMAGE entries
Windows images will require other base images, and thus, we will need
to explicitly specify the OS type a base image is for in order to
avoid confusion or errors.
2020-02-21 02:09:49 -08:00
Claudiu Belu
22a5fbcfa9 test images: Bumps image versions
The way the images are built is going to be changed, and in order to avoid
overwritting and breaking the current images, the image versions are bumped.
2020-02-21 02:09:49 -08:00
Kubernetes Prow Robot
937008e3ac
Merge pull request #81226 from claudiubelu/tests/reduce-to-agnhost-part-4
tests: Replaces images used with agnhost (part 4)
2020-02-20 01:13:03 -08:00
Claudiu Belu
f7942290af tests: Replaces images used with agnhost (part 4)
Quite a few images are only used a few times in a few tests. Thus,
the images are being centralized into the agnhost image, reducing
the number of images that have to be pulled and used.

This PR replaces the usage of the following images with agnhost:

- resource-consumer-controller
- test-webserver
2020-02-18 16:29:49 -08:00
Benjamin Elder
becc4b7d57 remove unused manifest-tool rules 2020-02-13 14:58:26 -08:00
Mike Danese
3aa59f7f30 generated: run refactor 2020-02-07 18:16:47 -08:00
Kubernetes Prow Robot
9c1e124b15
Merge pull request #87823 from tallclair/test-tokens
Ensure testing credentials are labeled as such
2020-02-06 17:47:29 -08:00
Tim Allclair
9d3670f358 Ensure testing credentials are labeled as such 2020-02-04 10:36:05 -08:00
Chao Xu
6acc75b418 Only set admission review reponse patch type if the patch is not empty 2020-02-03 10:55:31 -08:00
Claudiu Belu
00cd8c8d92 test images: Adds Image Promoter details in the README
We have enabled the Image Promoter on the k/k test E2E images. This updates the
kubernetes/test/images/README.md file to include information about the images
it runs for, and how to promote the new image from the staging registry to the
regular one.

Cleans up some TODO items, since the Image Centralization Part 4 merged.
2020-02-03 00:13:06 -08:00
Kubernetes Prow Robot
11aa07e150
Merge pull request #87385 from krzysied/agnhost_webhook_sidecar
Agnhost webhook sidecar
2020-01-30 16:59:02 -08:00
Kubernetes Prow Robot
4ee00204ae
Merge pull request #87647 from claudiubelu/image-promoter/cleanup-manifest-list
Image Promoter: Cleans manifest list
2020-01-29 22:11:36 -08:00
Mike Danese
d55d6175f8 refactor 2020-01-29 08:50:45 -08:00
Krzysztof Siedlecki
3593fc69ab bumping agnhost version to 2.10 2020-01-27 11:59:03 +01:00
Krzysztof Siedlecki
dc5791b47a adding sidecar injecting webhook 2020-01-27 11:59:03 +01:00
Kubernetes Prow Robot
ca16ebfa49
Merge pull request #87106 from ialidzhikov/enh/golang@1.13.6
Update to golang@1.13.6
2020-01-15 21:21:15 -08:00
Kubernetes Prow Robot
b2c61fa8d3
Merge pull request #87162 from BenTheElder/image-push-dir
set test image cloudbuild directory
2020-01-14 17:22:47 -08:00
Kubernetes Prow Robot
2b9d0fd902
Merge pull request #87153 from mkumatag/multi-arch-nonroot
Multi arch for nonroot image
2020-01-14 17:22:36 -08:00
Benjamin Elder
e6234519e1 set test image cloudbuild directory 2020-01-13 11:38:19 -08:00