Skip to content

Use create jobs command instead of run pods in e2e testing #445

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 2 commits into from
Mar 19, 2025

Conversation

ardaguclu
Copy link
Contributor

What type of PR is this?

/kind cleanup

What this PR does / why we need it

curl-metrics test tries to run a curl command to collect the metrics and
it is intended to be short lived. This is typical use case for jobs rather
than pods. This PR modifies the test to run job by using kubectl create job
command. Besides, kubectl run is not recommended.

Additionally, Default nginx image requires privileged access in the pod which is
unwanted and not recommended even in testing environments.

This PR switches to nginxinc/nginx-unprivileged that installs nginx
in an unprivileged way. This PR also updates the nginx version to 1.27
instead of the very old 1.14.2 (we only need to update the e2e tests, but just to
align all the pieces, this PR switches everywhere to the same version).

This PR must no affect on any functionality or any test.

Does this PR introduce a user-facing change?

None

@k8s-ci-robot k8s-ci-robot added the kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. label Mar 18, 2025
@k8s-ci-robot k8s-ci-robot requested a review from Edwinhr716 March 18, 2025 07:49
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Mar 18, 2025
@k8s-ci-robot k8s-ci-robot requested a review from kerthcet March 18, 2025 07:49
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Mar 18, 2025
Copy link

netlify bot commented Mar 18, 2025

Deploy Preview for kubernetes-sigs-lws canceled.

Name Link
🔨 Latest commit f49e150
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-lws/deploys/67d9a5b844b8500008bd8238

@ardaguclu
Copy link
Contributor Author

@Edwinhr716 @kerthcet would you mind having a look at this PR, when you have a chance?.

@@ -363,23 +363,23 @@ var _ = ginkgo.Describe("leaderWorkerSet e2e tests", func() {
gomega.Eventually(verifyMetricsServerStarted).Should(gomega.Succeed())

ginkgo.By("creating the curl-metrics pod to access the metrics endpoint")
Copy link
Contributor

Choose a reason for hiding this comment

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

curl-metrics job

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for review. Updated.

curl-metrics test tries to run a curl command to collect the metrics and
it is intended to be short lived. This is typical use case for jobs rather
than pods. This commit modifies the test to run job by using kubectl create job
command. Besides, kubectl run is not recommended.
Default nginx image requires privileged access in the pod which is
unwanted and not recommended even in testing environments.

This commit switches to nginxinc/nginx-unprivileged that installs nginx
in an unprivileged way. This commit also updates the nginx version to 1.27
instead of the very old 1.14.2
@ardaguclu
Copy link
Contributor Author

This is known flakiness
/retest

@ardaguclu
Copy link
Contributor Author

I will try to investigate the flakiness tomorrow

Copy link
Contributor

@kerthcet kerthcet left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

Thanks!

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 19, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ardaguclu, kerthcet

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 19, 2025
@k8s-ci-robot k8s-ci-robot merged commit 7c2ee14 into kubernetes-sigs:main Mar 19, 2025
12 checks passed
@ardaguclu ardaguclu deleted the use-create-jobs branch March 19, 2025 06:41
@kerthcet kerthcet mentioned this pull request Mar 26, 2025
19 tasks
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. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants