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

#1291 Updated sum function docs to mention array should not be empty #1454

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

cerebro1
Copy link
Contributor

Related issue #1291

Proposed Changes

The page does not mention the caveat that the sum function in Kyverno requires at least 1 element in the array, while the JMESPath specification says that the result should be 0 when the array is empty.

##Verify

sonali@SONALI-SRIVASTAVA:~/github/website$ echo '{"input":[]}' | kyverno jp query "sum(input)"
Reading from terminal input.
Enter input object and hit Ctrl+D.
Error: error evaluating JMESPath expression: JMESPath function 'sum': at least one element in the array is required

Checklist

  • I have read the contributing guidelines.
  • I have inspected the website preview for accuracy.
  • I have signed off my issue.

Attached the preview:
issue-3

@cerebro1
Copy link
Contributor Author

@realshuting @vishal-chdhry Could you review this, please?

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

Successfully merging this pull request may close these issues.

1 participant