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 keyword for getting all k8s objects (based on available api-resources) in a namespace #26

Open
Nilsty opened this issue Oct 4, 2020 · 0 comments
Labels
Hacktoberfest Hacktoberfest

Comments

@Nilsty
Copy link
Collaborator

Nilsty commented Oct 4, 2020

This keyword should list all objects in a namesapce by listing all available api-resources and then checking if this namespace has any resources of that type.

with kubectl this can be done via

kubectl api-resources --verbs=list --namespaced -o name \
  | xargs -n 1 kubectl get --show-kind --ignore-not-found -n default

This keyword can be used to validate the existence of k8s objects for a certain namespace.

I believe it would be nice to have the keyword return a json object like this:

{
  {
    "configmaps": [
      "cm_name1",
      "cm_name2",
      "cm_name3"
    ]
  },
    {
    "pods": [
      "pod_name1",
      "pod_name2",
      "pod_name3"
    ]
  }
}
@Nilsty Nilsty added the Hacktoberfest Hacktoberfest label Oct 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Hacktoberfest Hacktoberfest
Projects
None yet
Development

No branches or pull requests

1 participant