Skip to content
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

Add CI job to run e2e tests in vanilla K8s with Kind #2056

Merged
merged 10 commits into from
Oct 31, 2019

Conversation

artemnikitin
Copy link
Member

This PR introduces new CI job which will run e2e tests on different versions of vanilla K8s using Kind.

Job will run tests on 1.11, 1.15 and 1.16. Why these versions?
We don't test on 1.11 in GKE anymore but still support it. 1.15 and 1.16 are not available in cloud services. Probably it doesn't make sense to test on 1.12, 1.13 or 1.14 because we are already testing on them in GKE.

@artemnikitin artemnikitin added :ci Things related to Continuous Integration, automation and releases >test Related to unit/integration/e2e tests labels Oct 24, 2019
@artemnikitin
Copy link
Member Author

jenkins test this please

1 similar comment
@artemnikitin
Copy link
Member Author

jenkins test this please

@@ -36,6 +36,7 @@ ci-internal: ci-build-image
-v /var/run/docker.sock:/var/run/docker.sock \
-v $(ROOT_DIR):$(GO_MOUNT_PATH) \
-w $(GO_MOUNT_PATH) \
--network="host" \
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we need this?

Copy link
Member Author

Choose a reason for hiding this comment

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

Otherwise we can't access kind cluster within container

@@ -33,7 +33,7 @@ spec:
containers:
- name: e2e
image: {{ .E2EImage }}
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
Copy link
Contributor

Choose a reason for hiding this comment

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

I remember this conversation: #1995 (comment).
Is it important to cache the image?

Copy link
Member Author

Choose a reason for hiding this comment

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

Without this change tests will not work in Kind. For unknown reasons for me, it can't pull image. We even have a special script to load images into kind https://github.com/elastic/cloud-on-k8s/blob/master/hack/kind/kind.sh#L137
Probably @barkbay can explain better why do we need to load images in kind when he will be back...

Copy link
Contributor

Choose a reason for hiding this comment

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

IIRC, the docker images need to be pre-loaded into Kind nodes because there's no registry to pull the images from. When I changed the image pull policy, we didn't have Kind tests yet and it was just convenient to have that setting committed to Git to help test uncommited changes in a GKE cluster.

I think reverting to IfNotPresent makes sense now.

Copy link
Contributor

@charith-elastic charith-elastic left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -33,7 +33,7 @@ spec:
containers:
- name: e2e
image: {{ .E2EImage }}
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
Copy link
Contributor

Choose a reason for hiding this comment

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

IIRC, the docker images need to be pre-loaded into Kind nodes because there's no registry to pull the images from. When I changed the image pull policy, we didn't have Kind tests yet and it was just convenient to have that setting committed to Git to help test uncommited changes in a GKE cluster.

I think reverting to IfNotPresent makes sense now.

@artemnikitin artemnikitin merged commit 684be7d into elastic:master Oct 31, 2019
@artemnikitin artemnikitin deleted the 1096-kind-in-docker branch October 31, 2019 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:ci Things related to Continuous Integration, automation and releases >test Related to unit/integration/e2e tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants