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

[kueuectl] Added kueuectl list pods command #2280

Merged
merged 41 commits into from
Aug 21, 2024

Conversation

Kavinraja-G
Copy link
Contributor

@Kavinraja-G Kavinraja-G commented May 25, 2024

What type of PR is this?

/kind feature

What this PR does / why we need it:

Adds kueuectl list pods --for job/job-name. This will help users to list all the pods controlled by a specific Job in a namespace.

Which issue(s) this PR fixes:

Fixes #2204

Special notes for your reviewer:

Nil

Does this PR introduce a user-facing change?

CLI: Added list pods for a job command.

@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. release-note Denotes a PR that will be considered when it comes time to generate release notes. labels May 25, 2024
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label May 25, 2024
@k8s-ci-robot
Copy link
Contributor

Welcome @Kavinraja-G!

It looks like this is your first PR to kubernetes-sigs/kueue 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/kueue has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@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 May 25, 2024
@k8s-ci-robot
Copy link
Contributor

Hi @Kavinraja-G. Thanks for your PR.

I'm waiting for a kubernetes-sigs 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-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label May 25, 2024
Copy link

netlify bot commented May 25, 2024

Deploy Preview for kubernetes-sigs-kueue canceled.

Name Link
🔨 Latest commit 520e5c3
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-kueue/deploys/66c5a0bf31988a0008420abc

Copy link
Contributor

@mbobrovskyi mbobrovskyi left a comment

Choose a reason for hiding this comment

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

Don't forget to add docs here.

cmd/kueuectl/app/list/helpers.go Outdated Show resolved Hide resolved
cmd/kueuectl/app/list/list_pods.go Outdated Show resolved Hide resolved
cmd/kueuectl/app/list/list_pods.go Outdated Show resolved Hide resolved
cmd/kueuectl/app/list/list_pods.go Outdated Show resolved Hide resolved
cmd/kueuectl/app/list/list_pods_test.go Outdated Show resolved Hide resolved
cmd/kueuectl/app/list/list_pods_test.go Outdated Show resolved Hide resolved
cmd/kueuectl/app/list/list_pods_test.go Show resolved Hide resolved
@mbobrovskyi
Copy link
Contributor

/assign

@mbobrovskyi
Copy link
Contributor

/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 May 27, 2024
@k8s-ci-robot k8s-ci-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels May 28, 2024
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 28, 2024
cmd/kueuectl/app/list/list_pods.go Outdated Show resolved Hide resolved
cmd/kueuectl/app/list/list_pods.go Outdated Show resolved Hide resolved
cmd/kueuectl/app/list/list_pods.go Outdated Show resolved Hide resolved
cmd/kueuectl/app/list/list_pods_test.go Outdated Show resolved Hide resolved
@mbobrovskyi
Copy link
Contributor

/test pull-kueue-test-e2e-main-1-27

@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 28, 2024
cmd/kueuectl/app/testing/fake.go Outdated Show resolved Hide resolved
cmd/kueuectl/app/list/list_pods.go Outdated Show resolved Hide resolved
cmd/kueuectl/app/list/list_pods.go Outdated Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 18, 2024
@mbobrovskyi
Copy link
Contributor

/lgtm

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

LGTM label has been added.

Git tree hash: b3a768b5699a410e47131749a5389a27a8be3a97

Copy link
Contributor

@alculquicondor alculquicondor left a comment

Choose a reason for hiding this comment

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

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alculquicondor, Kavinraja-G

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 Aug 21, 2024
@k8s-ci-robot k8s-ci-robot merged commit 986d3fe into kubernetes-sigs:main Aug 21, 2024
16 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v0.9 milestone Aug 21, 2024
kannon92 pushed a commit to openshift-kannon92/kubernetes-sigs-kueue that referenced this pull request Nov 19, 2024
* Added kueuectl list pods cmd

* indent and fix PR comments

* fix: goimports

* chore: remove ctx args in tt

* refactor get pods logic for multiple types

* test: Add more job type tests

* refactor: based on comments for listpods & helpers

* remove fmt

* refactor unit tests

* refactor based on commments (1)

* refactor based on commments (2)

* refactor: handle if no resources found

* Added seperate printer for list pods

* rename list_pods_printer

* Refactor printers logic and comments

* fix lint

* Refactor ForObject parsing and comments

* Refactor ListPods logic to use common podLabelSelector

* Refactor jobLabels as per comment

* breakdown Complete() by adding functions

* merge listPods() to Run()

* go mod vendor

* more refactor for podLabelSelection

* support more columns for list pod

* more refactor based on PR comments (1)

* Refactor get pods logic to user API directly

* More refactor based on comments (1)

* Run generate-docs

* support multiple outputs

* refactor: support multiple outputs

* refactor & rm unused params in test

* go mod tidy

* handle podLablesSelectors and refactor

* bugfix: label selectors for raycluster and MPI

* bugfix: add operator name labels for pod selectors

* remove podgroup support

* use kubectl get package for table_printers

* remove podLabelSelector from GenericJob interface

* (revert) remove podgroup support

* go mod tidy (remove goVersion)
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/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

kueuectl: list pods for a job
8 participants