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

Support for looking into all namespaces #50

Open
pedroapero opened this issue Dec 16, 2024 · 2 comments
Open

Support for looking into all namespaces #50

pedroapero opened this issue Dec 16, 2024 · 2 comments

Comments

@pedroapero
Copy link

pedroapero commented Dec 16, 2024

Hello,
Maybe I missed it from the documentation; but how can I use kubectl --all-namespaces with bats-detik?

Example:

verify "there are 0 pods named '*' with 'status' being 'crashLoopBackoff'"

I tried DETIK_CLIENT_NAME='kubectl --all-namespaces' with no luck.

@vincent-zurczak
Copy link
Member

Hi @pedroapero.
Indeed, this is not supported. That would not be very complicated, the missing part is here.
I will try to add its support this week.

@vincent-zurczak
Copy link
Member

After digging, DETIK_CLIENT_NAME='kubectl --all-namespaces' should work.
The reason about the failure is because of the query:

  • * is not considered a valid resource name by DETIK.
  • I assume the verify query is run with a try prefix. Otherwise, this is not valid.
  • The documentation also indicates that « if it finds 0 item verifying the property, the assertion fails ».

The query you wrote totally makes sense.
I have to see how we can complete the assertions to support it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants