Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Refactor to allow for a way to get list of e2e images #74603

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 5, 2019

Conversation

stevesloka
Copy link
Contributor

@stevesloka stevesloka commented Feb 26, 2019

What type of PR is this?
/kind cleanup

What this PR does / why we need it:

This adds the ability to get a list of images used for E2E tests. This is needed to help support environments where users would want to understand what images are being used, and also to be able to push to a private registry for air-gapped style environments.

Additionally, this adds a new flag to e2e.test (--list-images) which allows for the same list to be printed out.

Does this PR introduce a user-facing change?:

NONE

Signed-off-by: Steve Sloka [email protected]

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Feb 26, 2019
@k8s-ci-robot
Copy link
Contributor

Hi @stevesloka. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Feb 26, 2019
@stevesloka
Copy link
Contributor Author

/assign @timothysc

@k8s-ci-robot k8s-ci-robot added sig/apps Categorizes an issue or PR as relevant to SIG Apps. sig/testing Categorizes an issue or PR as relevant to SIG Testing. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Feb 26, 2019
@timothysc
Copy link
Member

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Feb 26, 2019
Copy link
Member

@timothysc timothysc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How can I get a CLI-dump ~= kubeadm config images list

@stevesloka
Copy link
Contributor Author

@timothysc I added a method getImageConfigs() ((https://github.com/kubernetes/kubernetes/pull/74603/files#diff-d511d08b2cdc3d78d9e75c3c131ed2ceR195) which returns all of them. If we needed to customize the locations (e.g. to support private registries, we can use the built-in helpers that exist today but would be pulling in a dep on kubernetes/kubernetes.

@stevesloka
Copy link
Contributor Author

Here's an example:

$ sonobuoy images e2e                                                                                                                                             
gcr.io/kubernetes-e2e-test-images/dnsutils:1.1
gcr.io/kubernetes-e2e-test-images/kitten:1.0
gcr.io/kubernetes-e2e-test-images/redis:1.0
gcr.io/kubernetes-e2e-test-images/volume/nfs:1.0
gcr.io/kubernetes-e2e-test-images/volume/iscsi:1.0
gcr.io/kubernetes-e2e-test-images/apparmor-loader:1.0
gcr.io/kubernetes-e2e-test-images/cuda-vector-add:2.0
docker.io/library/nginx:1.14-alpine
gcr.io/kubernetes-e2e-test-images/porter:1.0
gcr.io/kubernetes-e2e-test-images/resource-consumer/controller:1.0
gcr.io/kubernetes-e2e-test-images/test-webserver:1.0
gcr.io/kubernetes-e2e-test-images/volume/gluster:1.0
gcr.io/kubernetes-e2e-test-images/echoserver:2.2
gcr.io/kubernetes-e2e-test-images/jessie-dnsutils:1.0
gcr.io/kubernetes-e2e-test-images/nonewprivs:1.0
gcr.io/kubernetes-e2e-test-images/crd-conversion-webhook:1.13rev2
gcr.io/kubernetes-e2e-test-images/webhook:1.13v1
gcr.io/kubernetes-e2e-test-images/liveness:1.0
gcr.io/kubernetes-e2e-test-images/mounttest-user:1.0
gcr.io/kubernetes-e2e-test-images/no-snat-test-proxy:1.0
gcr.io/kubernetes-e2e-test-images/sample-apiserver:1.10
gcr.io/kubernetes-e2e-test-images/metadata-concealment:1.2
gcr.io/kubernetes-e2e-test-images/entrypoint-tester:1.0
gcr.io/kubernetes-e2e-test-images/hostexec:1.1
gcr.io/kubernetes-e2e-test-images/nautilus:1.0
gcr.io/kubernetes-e2e-test-images/resource-consumer:1.5
gcr.io/google-samples/gb-frontend:v6
gcr.io/google-samples/gb-redisslave:v3
gcr.io/kubernetes-e2e-test-images/ipc-utils:1.0
gcr.io/kubernetes-e2e-test-images/logs-generator:1.0
k8s.gcr.io/pause:3.1
docker.io/library/busybox:1.29
gcr.io/kubernetes-e2e-test-images/cuda-vector-add:1.0
gcr.io/kubernetes-e2e-test-images/iperf:1.0
gcr.io/kubernetes-e2e-test-images/net:1.0
gcr.io/kubernetes-e2e-test-images/netexec:1.1
docker.io/library/nginx:1.15-alpine
gcr.io/kubernetes-e2e-test-images/no-snat-test:1.0
gcr.io/kubernetes-e2e-test-images/volume/rbd:1.0.1
gcr.io/kubernetes-e2e-test-images/fakegitserver:1.0
gcr.io/kubernetes-e2e-test-images/mounttest:1.0
gcr.io/kubernetes-e2e-test-images/nettest:1.0
gcr.io/kubernetes-e2e-test-images/port-forward-tester:1.0
gcr.io/kubernetes-e2e-test-images/serve-hostname:1.1

@timothysc
Copy link
Member

@stevesloka we should probably also expose via the e2e.test artifact as well.

@timothysc
Copy link
Member

If you want todo that in a separate PR, I'm ok with that.

@stevesloka stevesloka force-pushed the e2eImageList branch 2 times, most recently from b962105 to 321d017 Compare February 27, 2019 18:38
@timothysc
Copy link
Member

/retest

@stevesloka
Copy link
Contributor Author

/test pull-kubernetes-e2e-gce

@neolit123
Copy link
Member

/retest

NoSnatTestProxy = Config{e2eRegistry, "no-snat-test-proxy", "1.0"}
const (
// CRDConversionWebhook image
CRDConversionWebhook = iota
Copy link
Member

@neolit123 neolit123 Mar 1, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not map by image-name:image-tag instead of enum values?
edit: NVM

func initImageConfigs() map[int]Config {
configs := map[int]Config{}
configs[CRDConversionWebhook] = Config{e2eRegistry, "crd-conversion-webhook", "1.13rev2"}
configs[AdmissionWebhook] = Config{e2eRegistry, "webhook", "1.13v1"}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this value changed; possible cause for the failures.

@stevesloka stevesloka force-pushed the e2eImageList branch 2 times, most recently from 08167f9 to ea99135 Compare March 1, 2019 14:00
@stevesloka
Copy link
Contributor Author

@timothysc I've got the CI tests all fixed up now and also added an arg to e2e.test to show the list of images used. Please take a look, thanks!

Copy link
Member

@timothysc timothysc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor comment then lgtm
/approve
/hold

@@ -37,6 +37,9 @@ import (

const defaultHost = "http://127.0.0.1:8080"

// ListImages will list off all images that are used then quit
var ListImages bool
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems weirdly global vs adding to the context object.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved it to the test context object. My initial thought was this isn't really part of a test, so it didn't belong there.

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 1, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: stevesloka, timothysc

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 1, 2019
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 4, 2019
Copy link
Member

@timothysc timothysc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

There is a part of me that doesn't like the init section but I think to make it cleaner should be a separate recfactor.

@timothysc
Copy link
Member

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 4, 2019
@k8s-ci-robot k8s-ci-robot merged commit f5574bf into kubernetes:master Mar 5, 2019
@k8s-ci-robot
Copy link
Contributor

@stevesloka: The following test failed, say /retest to rerun them all:

Test name Commit Details Rerun command
pull-kubernetes-e2e-gce 6dc5494 link /test pull-kubernetes-e2e-gce

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note-none Denotes a PR that doesn't merit a release note. sig/apps Categorizes an issue or PR as relevant to SIG Apps. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants