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

[question] how can I perform hasKey to check path exists? #211

Open
asfaltboy opened this issue Jul 31, 2023 · 0 comments
Open

[question] how can I perform hasKey to check path exists? #211

asfaltboy opened this issue Jul 31, 2023 · 0 comments

Comments

@asfaltboy
Copy link

I'm looking to check the existance of a path (hasKey), and the fact that it does not exist (e.g hasNotKey).

For context: it is similar to the contains flag, but for maps rather than arrays.

Use case: it's pretty common to use a switch between two options based on a value, e.g choose one of two annotations per container runtime.

Note: I tried using matchRegex with the .* pattern, but the validator complains that it's an unknown path.

Appologies if there is already a way to do this, I tried my best to read through the docs and the issues, but could not find an answer to this question

d3adb5 pushed a commit to d3adb5/helm-unittest-tests that referenced this issue Apr 30, 2024
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

1 participant