Skip to content

add 'list_ingressroute_for_all_namespaces' method #1454

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

Conversation

Priyankasaggu11929
Copy link
Contributor

What type of PR is this?

/kind cleanup
/kind documentation

What this PR does / why we need it:

As mentioned in the linked issue, there is a suggestion to implement a list_ingressroute_for_all_namespaces method, which is meant for listing all the ingressroutes resources across all the namespaces. This PR adds changes to implement the same.

This new method, list_ingressroute_for_all_namespaces is analogous to executing kubectl get ingressroutes --all-namespaces command.

Besides, implementing the above method, the PR also include changes for demonstrating creation & deletion of k8s namespace resources using dynamic client. The methods implemented are create_namespace & deleted_namespace.

Output of the script:

Screenshot from 2021-05-06 01-08-55

Which issue(s) this PR fixes:

Fixes #1388

Does this PR introduce a user-facing change?

NONE

@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. kind/documentation Categorizes issue or PR as related to documentation. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels May 5, 2021
@k8s-ci-robot k8s-ci-robot requested review from roycaihw and yliaog May 5, 2021 19:49
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label May 5, 2021


def delete_namespace(namespace_api, name):
namespace_deleted = namespace_api.delete(name=name)
Copy link
Contributor

Choose a reason for hiding this comment

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

namespace_deleted is not used, do you need to assign to it?

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 pointing. No, the variable namespace_deleted is not required.

I've removed it.

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 pointing. No, the variable namespace is not required. I've removed it.

@yliaog
Copy link
Contributor

yliaog commented May 6, 2021

please squash the commits, otherwise looks good.

@Priyankasaggu11929 Priyankasaggu11929 force-pushed the psaggu-list-ingressroute-in-all-namespaces branch from e1480d8 to eb952e7 Compare May 6, 2021 04:42
@Priyankasaggu11929
Copy link
Contributor Author

Priyankasaggu11929 commented May 6, 2021

Thank you. I've squashed the commits.

@yliaog
Copy link
Contributor

yliaog commented May 6, 2021

/lgtm
/approve

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Priyankasaggu11929, yliaog

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 May 6, 2021
@k8s-ci-robot k8s-ci-robot merged commit 7b3e019 into kubernetes-client:master May 6, 2021
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. kind/documentation Categorizes issue or PR as related to documentation. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. 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.

how to get namespaces ingressroutes through
3 participants