Coder Social home page Coder Social logo

kubernetes-sigs / windows-testing Goto Github PK

View Code? Open in Web Editor NEW
40.0 14.0 54.0 15.9 MB

Containers, scripts and documentation for running Kubernetes tests with Windows nodes

License: Apache License 2.0

PowerShell 21.46% Dockerfile 4.49% Go 15.42% Shell 57.62% Makefile 1.01%
k8s-sig-windows

windows-testing's Introduction

Testing Kubernetes for Windows Clusters

This repo is a collection of scripts, containers, and documentation needed to run Kubernetes end to end tests on clusters with Windows worker nodes.

  • It is maintained by sig-windows.

  • It leverages the existing upstream e2e tests, which live in Kubernetes.

  • If you're looking for the latest test results, look at TestGrid for the SIG-Windows results. These are the periodic test passes scheduled by Prow (see: config).

  • If you have questions interpreting the results, please join us on Slack in #SIG-Windows.

If you're new to building and testing Kubernetes, it's probably best to read the official End-to-End Testing in Kubernetes page first.

The rest of this page has a summary of those steps tailored for testing clusters that have Windows nodes.

Running Windows E2E tests against your kubernetes/kubernetes PR

To manually trigger Windows E2E tests to run against your PR add the following as comments on your PR:

/test pull-kubernetes-e2e-aks-engine-windows-dockershim
/test pull-kubernetes-e2e-aks-engine-windows-containerd

A full list of Windows PR jobs can be found at https://github.com/kubernetes/test-infra/blob/master/config/jobs/kubernetes-sigs/sig-windows/sig-windows-config.yaml

Building the tests

Testing windows is not different from regular testing of k8s clusters. If you have never used a tool such as e2e.test or sonobuoy to run the Conformance (or other ginkgo based) test suites, then you should familiarize your self with that, first.

Some resources introducing the e2e test framework:

Now, assuming you are able to build an e2e.test binary, we'll proceed with how windows the tests work.

See the Questions section at the bottom of this doc for pointers on how to build the e2e tests.

Running the e2e.test binary on a windows enabled cluster

If you already have a cluster, you will likely just need to build e2e.test, and run it with windows options.

Method 1: Using an existing cluster

  • FIRST you need to taint/label all linux and master nodes with node-role.kubernetes.io/master=NoSchedule... this way, any windows specific tests are guaranteed to run on Windows nodes.

All of the tests are built into the e2e.test binary, which you can as a standalone binary to test an existing cluster. If you don't know how to build e2e.test, instructions for this are at the bottom of this doc.

Note that, when running these You need to set the KUBE_TEST_REPO_LIST environment variable when running the windows end to end tests, otherwise, windows images will not be pullable and all your tests will fail! You will need to download the appropriate image-repo-list depending on which Kubernetes version/Windows OS version you are using. See the image repository list table on which image-repo-list to use

  • There are a few important parameters that you need to use, including:

  • --provider=skeleton - this will avoid using a cloud provider to provision new resources such as storage volumes or load balancers

  • --ginkgo.focus="..." - this regex chooses what Ginkgo tests to run.

  • --node-os-distro="windows" - some test cases have different behavior on Linux & Windows. This tells them to test Windows.

  • --ginkgo.skip="..." - this regex chooses what tests to skip

  • If you're not sure what test cases will run, add --gingkgo.dryRun=true and it will give a list of test cases selected without actually running them.

Running the full suite of tests:

You can thus run all of the [SIG-Windows] tests like so:

export KUBECONFIG=path/to/kubeconfig
curl https://raw.githubusercontent.com/kubernetes-sigs/windows-testing/master/images/image-repo-list -o repo_list
export KUBE_TEST_REPO_LIST=$(pwd)/repo_list
./e2e.test --provider=skeleton --ginkgo.noColor --ginkgo.focus="\[sig-windows\]" --node-os-distro="windows"

NOTE: e2e.test also needs a few environment variables set to connect to the cluster, and choose the right test container images. Here's an example:

Running the test-grid tests exactly as run in CI

The full list of what is run for TestGrid is in the sig-windows-config.yaml after --test-args. You can copy the parameters there for a full test to pass.

You can run these similarly to the above tests, just modifying the ginkgo.focus flag like so, and adding the --ginkgo-skip flag so as to skip a few tests which are known to fail. This is thus suitable for CI deployments.

This is an example:

--ginkgo.focus=\\[Conformance\\]|\\[NodeConformance\\]|\\[sig-windows\\]|\\[sig-apps\\].CronJob --ginkgo.skip=\\[LinuxOnly\\]|\\[k8s.io\\].Pods.*should.cap.back-off.at.MaxContainerBackOff.\\[Slow\\]\\[NodeConformance\\]|\\[k8s.io\\].Pods.*should.have.their.auto-restart.back-off.timer.reset.on.image.update.\\[Slow\\]\\[NodeConformance\\]"

Method 2: Creating infrastructure and running e2e tests

If you don't yet have a cluster up, you can use kubetest to

  • deploy a cluster
  • test it (using e2e.test)
  • gather logs
  • upload the results to a Google Storage account. It has built-in cloud provider scripts to build Linux+Windows clusters using Azure and GCP.

This is useful, for example, for contributing CI results upstream.

Build kubetest

Refer to the kubetest documentation for full details.

git clone https://github.com/kubernetes/test-infra.git
cd test-infra
GO111MODULE=on go install ./kubetest

Azure

Pre-requisites

Configuration

Create a toml file with Azure Authorization information:

[Creds]
  ClientID = "<Service Principal Client ID>"
  ClientSecret = "<Service Principal Client Secret>"
  SubscriptionID = "<Azure Subscription ID>"
  TenantID = "<Azure Tenant ID>"
  StorageAccountName = "<Azue Storage Account Name>"
  StorageAccountKey = "<Azure Storage Account Key>"

Set the following environment variables:

# used for ssh to machines
export K8S_SSH_PUBLIC_KEY_PATH="/home/user/.ssh/id_rsa.pub"

# used during log collection
export K8S_SSH_PRIVATE_KEY_PATH="/home/user/.ssh/id_rsa"

# file path to the toml with the auth values
export AZURE_CREDENTIALS="/home/user/azure/azure.toml"

# location logs will be dumped
export ARTIFACTS="/home/user/out/kubetest"

# docker registry used
export REGISTRY="yourregistry.azurecr.io"

# azure storage container name
export AZ_STORAGE_CONTAINER_NAME="azstoragecontainername"

# files required for Windows test pass
export WIN_BUILD="https://raw.githubusercontent.com/kubernetes-sigs/windows-testing/master/build/build-windows-k8s.sh"
export KUBE_TEST_REPO_LIST_DOWNLOAD_LOCATION="https://raw.githubusercontent.com/kubernetes-sigs/windows-testing/master/images/image-repo-list"

kubetest must be run from the kubernetes/kubernetes project. The full set of tests will take several hours.

cd $GOPATH/src/k8s.io/kubernetes
kubetest
    --test \
    --up \
    --dump=$ARTIFACTS \
    --deployment=aksengine \
    --provider=skeleton \
    --aksengine-admin-username=azureuser \
    --aksengine-admin-password=AdminPassw0rd \
    --aksengine-creds=$AZURE_CREDENTIALS \
    --aksengine-download-url=https://github.com/Azure/aks-engine/releases/download/v0.52.0/aks-engine-v0.52.0-linux-amd64.tar.gz \
    --aksengine-public-key=$K8S_SSH_PUBLIC_KEY_PATH \
    --aksengine-private-key=$K8S_SSH_PRIVATE_KEY_PATH \
    --aksengine-orchestratorRelease=1.18 \
    --aksengine-template-url=https://raw.githubusercontent.com/kubernetes-sigs/windows-testing/master/job-templates/kubernetes_release_1_18.json \
    --aksengine-agentpoolcount=2 \
    --test_args="--ginkgo.flakeAttempts=2 --node-os-distro=windows --ginkgo.focus=\[Conformance\]|\[NodeConformance\]|\[sig-windows\]|\[sig-apps\].CronJob|\[sig-api-machinery\].ResourceQuota|\[sig-scheduling\].SchedulerPreemption|\[sig-autoscaling\].\[Feature:HPA\]  --ginkgo.skip=\[LinuxOnly\]|\[Serial\]|GMSA|Guestbook.application.should.create.and.stop.a.working.application" \
    --ginkgo-parallel=6

A few other parameters you should be aware of:

# will tear down the cluster (when doing development it is sometime better to leave the cluster up for analysis)
--down

# will build kubernetes locally instead of using --aksengine-orchestratorRelease=1.18
--build=quick

# deploy Kubernetes images built from ${GOPATH}/src/k8s.io/kubernetes for the control plane and Linux nodes
--aksengine-deploy-custom-k8s

# enable and build Windows Kubernetes ZIP (contains kube-proxy, kubelet, kubectl, etc) and deploy it to Windows nodes
--aksengine-win-binaries
--aksengine-winZipBuildScript=$WIN_BUILD

Running unit tests

Unit tests for files that have a // +build windows at the first line should be running on windows environment. Running in Linux with command

GOOS=windows GOARCH=amd64 go test

will usually have a exec format error.

Steps for running unit tests on windows environment

Install golang on Windows machine

Pick the Go version that is compatible with the Kubernetes version you intend to build. Download the MSI file to the Windows machine for development.

Invoke-Webrequest https://dl.google.com/go/go-<version>.windows-amd64.msi -Outfile go<version>.windows-amd64.msi

Start the MSI installer, e.g. Start-Process .\go<version.windows-amd64.msi and finish the installation.

Add go path to the PATH environment variable:

$env:PATH=$env:PATH+";C:\go\bin"

Set the GOPATH environment variable:

$env:GOPATH="C:\go\pkg"

Install git using chocolatey

Follow the instruction here to install chocolatey on Windows node. Then run

choco install git.install
$env:PATH=$env:PATH+";C:\Program Files\Git\bin"

to install git.

Run the tests

Set up the Kubernetes repository on the node by following the instructions in Github workflow.

go get  # Install the required packages
go test  # Run the tests

Google Compute Platform

TODO: This section is still under construction

Test Images

See images/ for details regarding selecting the correct test images based on the Kubernetes/Windows versions.

Questions

Is there an equivalent to a Conformance test suite for windows ?

There is not yet a formal equivalent. The purpose of this repo is to store existing tests which sig-windows currently runs, and to provide CI signal for windows to upstream Kubernetes. If you run the e2e.test suite with the sig-windows ginkgo filter and the --ginkgo.dryRun option, you'll see the list of tests which are currently in upstream. these are listed below. In order to implement Conformance tests for windows - we would need to, on a large scale, implement windows specific logic for certain things. There has been made some progress on this (for example, with the agnhost container), but by in large the ability to run most tests on windows/linux interchangeably doesn't yet exist.

Can I run sonobuoy as a way to test windows Conformance ?

Sonobuoy can be used as a way to test windows Conformance. Checkout for Running E2E Tests On Windows Clusters reference.

How many tests run ?

As of Kubernetes 1.19, there are currently ~15 tests in upstream Kubernetes (1.19) which specifically target the windows feature.

• [sig-windows] [Feature:Windows] SecurityContext should not be able to create pods with unknown usernames"

• [sig-windows] [Feature:Windows] SecurityContext should override SecurityContext username if set"

• [sig-windows] Windows volume mounts check volume mount permissions container should have readOnly permissions on emptyDir"

• [sig-windows] [Feature:Windows] Density [Serial] [Slow] create a batch of pods latency/resource should be within limit when create 10 pods with 0s interval"

• [sig-windows] [Feature:Windows] SecurityContext should be able create pods and run containers with a given username"

• [sig-windows] [Feature:Windows] Cpu Resources [Serial] Container limits should not be exceeded after waiting 2 minutes"

• [sig-windows] Services should be able to create a functioning NodePort service for Windows",

• [sig-windows] [Feature:Windows] SecurityContext should ignore Linux Specific SecurityContext if

• [sig-windows] [Feature:Windows] GMSA Full [Serial] [Slow] GMSA support works end to end"

• [sig-windows] [Feature:Windows] GMSA Kubelet [Slow] kubelet GMSA support when creating a pod with correct GMSA credential

• [sig-windows] [Feature:Windows] Kubelet-Stats [Serial] Kubelet stats collection for Windows nodes when running 10 pods should return within 10 seconds"

• [sig-windows] Hybrid cluster network for all supported CNIs should have stable networking for Linux and Windows pods"

• [sig-windows] [Feature:Windows] Memory Limits [Serial] [Slow] Allocatable node memory should be equal to a calculated allocatable memory value"

• [sig-windows] [Feature:Windows] Memory Limits [Serial] [Slow] attempt to deploy past allocatable memory limits should fail deployments of pods once there isn't enough memory"

• [sig-windows] Windows volume mounts check volume mount permissions container should have readOnly permissions

How do i build the e2e.test binary?

Build the Kubernetes generic e2e.test binary

This is just a short summary

Make sure you have a working Kubernetes development environment on a Mac or Linux machine. If you're using Windows, you can use WSL, but it will be slower than a Linux VM. The tests can be run from the same VM, as long as you have a working KUBECONFIG.

go get -d k8s.io/kubernetes
cd $GOPATH/src/k8s.io/kubernetes
./build/run.sh make WHAT=test/e2e/e2e.test

Once complete, the binary will be available at: ~/go/src/k8s.io/kubernetes/_output/dockerized/bin/linux/amd64/e2e.test

Cross-building for Mac or Windows

To build a binary to run on Mac or Windows, you can add KUBE_BUILD_PLATFORMS.

For Windows

./build/run.sh make KUBE_BUILD_PLATFORMS=windows/amd64 WHAT=test/e2e/e2e.test

For Mac

./build/run.sh make KUBE_BUILD_PLATFORMS=darwin/amd64 WHAT=test/e2e/e2e.test

Your binaries will be available at ~/go/src/k8s.io/kubernetes/_output/dockerized/bin/linux/amd64/e2e.test where linux/amd64/ is replaced by KUBE_BUILD_PLATFORMS if you are building on Mac or Windows.

windows-testing's People

Contributors

adelina-t avatar amolmote avatar andyzhangx avatar aravindhp avatar bclau avatar bingbing8 avatar cblecker avatar claudiubelu avatar cristianhenzel avatar ibabou avatar jayunit100 avatar jeremyje avatar jeremywx avatar jsturtevant avatar k8s-ci-robot avatar liyanhui1228 avatar marosset avatar mboersma avatar michmike avatar nikhilsharmawe avatar pacoxu avatar patricklang avatar pjh avatar ritikaguptams avatar taeduard avatar vyta avatar yanglu1031 avatar yliaog avatar yujuhong avatar zeromagic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

windows-testing's Issues

Several images emit errors, but still build

The rethinkdb, cassandra, and java images all try to cleanup intermediate files in their images, but they all error with "Access is denied." It seems there's some permissioning problem with deleting files that get created by an earlier ADD step.

`kubectl wait` for prepulling GCE test containers takes too long to timeout

The timeout behavior for kubectl wait is unintuitive - see kubernetes/kubectl#754 (comment). The result is that when one of our prepulled test containers fails to run, run-e2e.sh for GCE tests waits 90 minutes instead of 30 minutes before starting to run the e2e tests. The test run then times out at 120 minutes before most of the tests have been run.

An alternative approach might be something like we do in the GCE smoke-test, although surely that can be made a bit cleaner.

cc @YangLu1031 @yliaog @benmoss

Httpd image causing StatefulSet tests to fail.

Stateful set tests [sig-apps] StatefulSet fail with error: " Readiness probe errored: the read limit is reached".

These tests use a httpGet readiness probe to check the pods, trying a GET on index.html. HttpGet are limited to 10kb , however, the apache2 default index.html is way larger than that. The httpd image should replace the default index.html here: https://github.com/kubernetes-sigs/windows-testing/blob/master/images/httpd/Dockerfile#L32 , but it seems it gets copied at the wrong path.

"win-e2e-master-extension" needs to update apiVersion

As of some AKS engine version commit released no long ago (Today is Feb 217, 2019), we cannot deploy this json configuration:
https://github.com/kubernetes-sigs/windows-testing/blob/master/job-templates/kubernetes_release.json

I cannot longer deploy a healthy kubernetes cluster.

The error message is:

INFO[0008] Starting ARM Deployment (test-e2e-win-479321829). This will take some time...
FATA[0009] resources.DeploymentsClient#CreateOrUpdate: Failure sending request: StatusCode=400 -- Original Error: Code="InvalidTemplate" Message="Deployment template validation failed: 'The template resource 'k8s-master-95671182-0win-e2e-master-extension' at line '1' and column '92577' is invalid. 'ApiVersion' property is invalid. The supported versions are '2018-11-01,2018-09-01,2018-08-01,2018-07-01,2018-06-01,2018-05-01,2018-02-01,2018-01-01,2017-12-01,2017-08-01,2017-06-01,2017-05-10,2017-05-01,2017-03-01,2016-09-01,2016-07-01,2016-06-01,2016-02-01,2015-11-01,2015-01-01,2014-04-01-preview,2014-04-01,2014-01-01,2013-03-01,2014-02-26,2014-04'. Please see https://aka.ms/arm-template/#resources for usage details.'.

push a release

since this repo is pretty much the closest thing to conformance for windows i guess we should just publish a release tarball ?

Most tests seem to fail

Hi folks, I just ran these for the first time, almost all of them failed:
https://raw.githubusercontent.com/jayunit100/k8sprototypes/master/windows/windows.e2e.log

It appears the root cause of the failures is missing images

root@ubuntuk8s:/home/jayunit100/go/src/k8s.io# ### docker.io/library/busybox:1.29": rpc error: code = Unknown desc = no matching manifest for windows/amd64

Also, saw failures on

 gcr.io/kubernetes-e2e-test-images/nonroot:1.
 k8s.gcr.io/pause:3.2

I'll dig more into this and see what the issues are later. Asusming maybe we just are in a dockerhub/gcr migration type thing?

Windows unit test script is failing

Starting on august 8th 2023 the unit test started failing:

https://testgrid.k8s.io/sig-windows-signal#windows-unit-master
https://prow.k8s.io/view/gs/kubernetes-jenkins/logs/ci-kubernetes-unit-windows-master/1689083265631129600

+ wait 177
+ ./scripts/ci-k8s-unit-test.sh
./scripts/ci-k8s-unit-test.sh: line 21: az: command not found
./scripts/ci-k8s-unit-test.sh: line 23: az: command not found
./scripts/ci-k8s-unit-test.sh: line 21: az: command not found
./scripts/ci-k8s-unit-test.sh: line 23: az: command not found
./scripts/ci-k8s-unit-test.sh: line 21: az: command not found

The AZ not found is a red hearing as the script is failing before AZ cli is installed

/cc @claudiubelu

Move testing scripts, configurations, and utilities to this repository

Is there a plan to move more testing configurations and common utilities into this repository? If not, I'd like to suggest that we do so while resolving various issues upstream, so that the information is kept in one place and up-to-date.

Some items that I think will be valuable to host here:

gmsa tests setup is failing with ssh handshake error

https://testgrid.k8s.io/sig-windows-signal#capz-windows-master-serial-slow

example failure: https://prow.k8s.io/view/gs/kubernetes-jenkins/logs/ci-kubernetes-e2e-capz-master-windows-serial-slow/1682184679261736960

INFO: Writing gmsa spec to disk
panic: Unexpected error:
    <*errors.withStack | 0xc000cb05d0>: {
        error: <*errors.withMessage | 0xc00048ede0>{
            cause: <*errors.errorString | 0xc000a929e0>{
                s: "ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain",
            },
            msg: "dialing public load balancer at capz-conf-s2u9bs-deea2ac7.northeurope.cloudapp.azure.com",
        },
        stack: [0x2722588, 0x2721647, 0x2720625, 0x271f95a, 0xf44647, 0xf76d61],
    }
    dialing public load balancer at capz-conf-s2u9bs-deea2ac7.northeurope.cloudapp.azure.com: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain

Upstream aks tests fail to delete namespaces for pods.

Master aks-engine Windows tests timeout since the 22nd of June with all tests failing to delete the namespace for their respective resources ( e.g [1] ) with the following message:

I0624 06:26:44.973] Jun 24 06:26:44.972: INFO: Couldn't delete ns: "projected-4296": namespace projected-4296 was not deleted with limit: timed out waiting for the condition, namespace is empty but is not yet removed (&errors.errorString{s:"namespace projected-4296 was not deleted with limit: timed out waiting for the condition, namespace is empty but is not yet removed"})
I0624 06:26:44.973] 

The problem here is this PR that merged over the weekend: kubernetes/kubernetes#70672

Long story short: Aks-engine deployed clusters can't start the resources in addons ( kube-proxy, metrics-server etc. ) because the manifests contain extensions/v1beta1 ApiVersion that was disabled by default with the PR above. All have been moved to ApiVersion apps/v1. More details here [2].

Simple workaround is to just re-enable those endpoints in the apiServer until aks-engine fixes all it's addons manifests.

[1] http://13.77.136.139/log?job=ci-k8s-master-apiServer-fix&id=1143165400901488640
[2] Azure/aks-engine#1522

Build test container images for 1909

Microsoft released Windows Server version 1909 last week, and the servercore:1909 base image is now available in MCR. I'd like to run the sig-windows e2e tests against 1909 - what does it take to rebuild these test containers for a new SAC version? I see BaseImages specified in Utils.ps1 - is it just a matter of adding a new line to that file, then having the right person invoke the right script from this repo?

@BCLAU could you advise and let me know if there's something I can do to help with this?
cc @adelina-t @yliaog @PatrickLang

Image manifest lists fail to be updated

When the script BuildImageManifestLists.ps1 is called with $Recreate = $true, it is expected that all the images and manifest lists are recreated. The images are being rebuilt properly, but not the manifest lists, if they were already built locally.

It seems that docker manifest create --amend will:

  • create a new manifest list, if one does not exist locally.
  • only add new images to the manifest list, if the manifest list already exists locally.

Meaning that on recreate, the manifest lists are not actually recreated and updated as expected.

Passing the --purge argument to the docker manifest push command will solve this issue, as that argument will also delete the local manifest list, allowing a new, updated version to be created next time.

Failed test from image etcd

A commit from the kubernetes repo changed the versioning of the image etcd from v3.3.10 to 3.3.10 which causes the test [sig-api-machinery] Aggregator Should be able to support the 1.10 Sample API Server using the current Aggregator [Conformance] to fail
The difference can be found here

They also changed the ENTRYPOINT of the image from /etcd/etcd.exe/ to /usr/local/bin/etcd, which can cause problems.

Before suite fails on staging aks-engine job

It seems like some aks-engine staging jobs ( https://testgrid.k8s.io/sig-windows#aks-engine-azure-windows-master-staging ) fail at the "Before suite" stage. The cause for this is that not all pods in kube-system are running at the moment testing starts.

Master node extension ( https://github.com/kubernetes-sigs/windows-testing/blob/master/extensions/master_extension/v1/win-e2e-master-extension.sh ) should specifically avoid this case by waiting for all pods in kube-system to be Running before applying any taints on the node and exiting.

liveness image update to tag 1.1 breaks tests

https://testgrid.k8s.io/sig-windows#aks-engine-azure-windows-master

Tests failing:

  • [k8s.io] Probing container should have monotonically increasing restart count [NodeConformance] [Conformance]
  • [k8s.io] Probing container should be restarted with a /healthz http liveness probe [NodeConformance] [Conformance]

Cause:

Create Dockerfile for building nginx x64 for windows

We currently need to build nginx for x64. Do we have steps for that process and do they belong in this repo?

Somehow, I missed this question. :) The steps to build nginx x64 was similar to this: http://nginx.org/en/docs/howto_build_on_win32.html . You'd have to make sure that all your dependencies are x64, for the most part. I tried to create a Dockerfile for it, so anyone can easily build that image, but I was missing nmake / vcvarsall.bat, so I couldn't finish it, and I didn't have enough time find a solution for that. :)

Originally posted by @claudiubelu in #255 (comment)

If we need to make updates for any reason we need to be able to build the images referenced at https://github.com/kubernetes/kubernetes/blob/1a983bb958ba663e5d86983c55a187fb8c429c51/test/images/nginx/Dockerfile_windows#L19

This dockerfile should live in https://github.com/kubernetes/kubernetes/tree/master/test/images/windows

Set up CI build for images/

Now that we have the container image sources here, we need to facilitate collaborate on them.

Continuous integration requirements:

  • Block PR merge on failed builds under images/ - this is a must
  • Publish a multiarch manifest supporting Windows + Linux (docker manifest inspect microsoft/dotnet:2.2-runtime will give you an example image meeting this requirement)
  • Run a e2e test case to verify each one works at a basic level - nice to have but could happen later

Investigate use of images in upstream tests

In #255 we identified a few remaining images that are not upstream. We need to investigate if they are used by any tests and if so create upstream images for them.

Remaining images:

  • cassandra
  • java (base image for cassandra, could be reduced to a stage in a multi-stage Dockerfile)
  • nfs-server

Do we have open issues in k/k for the these?

Not at the moment. Those images were created a few years ago, so I'm not sure how valid they are anymore currently. FWIW, the images are quite easy, and could easily be made buildable for docker buildx.

Migrate test-infra jobs to community infrastructure

Is your feature request related to a problem?/Why is this needed
All of the test-infra jobs need to be migrated to community infrastructure by August 1st else they will be deleted.

The list of tests required to migrate can be found here.

Epic-level tracking issue here with additional information: kubernetes-sigs/cluster-api-provider-azure#4976

Adding known issues during migration:

Tasks

  1. kind/failing-test needs-triage sig/node sig/windows
  2. ritikaguptams

Zookeeper Dockerfile missing

Not sure where the Dockerfile for Zookeeper is, but the BuildImages script fails with An image does not exist locally with the tag: gcr.io/cf-london-servces-k8s/windows-images/zookeeper when I try to build it.

gb-frontend is now pulling php73

It looks like the Dockerfile for gb-frontend is using Chocolatey to install PHP, but also hardcodes the C:\tools\php72 path. It looks like someone rebuilt it and now php72 has only a php.ini file in it, all of the DLLs are in php73.

Update README with latest image building info

follow on to #222

from mark...

This section about Building Test Images might be out of date.
@claudiubelu has been working very hard to move the building of the windows test images into kubernetes/kubernetes.
I don't think that transition is fully complete yet tho...

cc @claudiubelu

Create test non-blocking job to automatically run on all/most-relevant PRs

Recent changes in kubernetes have left our test passes failing to create the cluster in a couple of instances. Examples: flags changed, features removed that aks-engine did not know how to handle. This resulted in the periodic jobs being down for a period until we managed to identify the offending PRs and accommodate the changes in aks-engine.

A non-blocking presubmit job that would run on all / most-relevant PRs in kubernetes/kubernetes would be very useful in helping us find these situations ahead of time.

There are a few blockers for this ideea:

  1. we do not have the resources to run a full Conformance run on each and every PR.
  2. A conformance run, like the staging one takes about 2 - 2 1/2 hours to complete and there is a high chance that we might have flakes.

To get around these issues, I propose that we:

  1. Run the job only on a subset of changes: we can filter by file location. For example, there is no need to run tests if a change happens in kubernetes/cluster or kubernetes/hack etc.
  2. Run only a subset of Conformance tests, that are known to have a high chance of passing. This will reduce the time for every run.

A proposed list of tests :

[k8s.io] [sig-node] Events should be sent by kubelets and the scheduler about pods scheduling and running  [Conformance]
[k8s.io] [sig-node] Pods Extended [k8s.io] Delete Grace Period should be submitted and removed [Conformance]
[k8s.io] [sig-node] PreStop should call prestop when killing a pod  [Conformance]
[k8s.io] Container Lifecycle Hook when create a pod with lifecycle hook should execute poststart exec hook properly [NodeConformance] [Conformance]
[k8s.io] Container Lifecycle Hook when create a pod with lifecycle hook should execute prestop http hook properly [NodeConformance] [Conformance]
[k8s.io] Container Runtime blackbox test when running a container with a new image should be able to pull from private registry with secret [NodeConformance]
[k8s.io] InitContainer [NodeConformance] should invoke init containers on a RestartAlways pod [Conformance]
[k8s.io] Pods should get a host IP [NodeConformance] [Conformance]
[k8s.io] Pods should support remote command execution over websockets [NodeConformance] [Conformance]
[k8s.io] Pods should support retrieving logs from the container over websockets [NodeConformance] [Conformance]
[k8s.io] Probing container should *not* be restarted with a /healthz http liveness probe [NodeConformance] [Conformance] 
[k8s.io] Probing container should be restarted with a /healthz http liveness probe [NodeConformance] [Conformance]
[sig-api-machinery] Secrets should be consumable from pods in env vars [NodeConformance] [Conformance]
[sig-apps] Deployment deployment should delete old replica sets [Conformance]
[sig-apps] Deployment deployment should support rollover [Conformance]
[sig-apps] Deployment RecreateDeployment should delete old pods and create new ones [Conformance]
[sig-apps] ReplicaSet should adopt matching pods on creation and release no longer matching pods [Conformance]
[sig-apps] ReplicationController should release no longer matching pods [Conformance]
[sig-apps] StatefulSet [k8s.io] Basic StatefulSet functionality [StatefulSetBasic] should perform rolling updates and roll backs of template modifications [Conformance]
[sig-network] DNS should provide DNS for ExternalName services [Conformance]
[sig-network] DNS should provide DNS for services  [Conformance]
[sig-network] DNS should provide DNS for the cluster  [Conformance]
[sig-network] Proxy version v1 should proxy logs on node using proxy subresource  [Conformance]
[sig-network] Proxy version v1 should proxy logs on node with explicit kubelet port using proxy subresource  [Conformance]
[sig-network] Proxy version v1 should proxy through a service and a pod  [Conformance]
[sig-network] Services should serve a basic endpoint from pods  [Conformance]
[sig-network] Services should serve multiport endpoints from pods  [Conformance]
[sig-node] ConfigMap should be consumable via the environment [NodeConformance] [Conformance]
[sig-node] Downward API should provide container's limits.cpu/memory and requests.cpu/memory as env vars [NodeConformance] [Conformance]
[sig-node] Downward API should provide pod name, namespace and IP address as env vars [NodeConformance] [Conformance]
[sig-storage] ConfigMap binary data should be reflected in volume [NodeConformance] [Conformance]
[sig-storage] ConfigMap should be consumable from pods in volume [NodeConformance] [Conformance]
[sig-storage] Downward API volume should provide container's cpu limit [NodeConformance] [Conformance]
[sig-storage] Downward API volume should provide podname only [NodeConformance] [Conformance]
[sig-storage] Downward API volume should update labels on modification [NodeConformance] [Conformance]
[sig-storage] EmptyDir volumes pod should support shared volumes between containers [Conformance]
[sig-storage] EmptyDir wrapper volumes should not conflict [Conformance]
[sig-storage] HostPath should support r/w [NodeConformance]
[sig-storage] HostPath should support subPath [NodeConformance]
[sig-storage] Projected combined should project all components that make up the projection API [Projection][NodeConformance] [Conformance]
[sig-storage] Projected configMap should be consumable from pods in volume with mappings [NodeConformance] [Conformance]
[sig-storage] Projected downwardAPI should provide container's memory request [NodeConformance] [Conformance]
[sig-storage] Projected downwardAPI should provide node allocatable (memory) as default memory limit if the limit is not set [NodeConformance] [Conformance]
[sig-storage] Projected secret should be consumable in multiple volumes in a pod [NodeConformance] [Conformance]
[sig-storage] Secrets optional updates should be reflected in volume [NodeConformance] [Conformance]
[sig-storage] Secrets should be able to mount in a volume regardless of a different secret existing with same name in different namespace [NodeConformance] [Conformance]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.