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

Variable substitution and custom JMESPath function changes. #127

Closed
kacejot opened this issue Apr 6, 2021 · 4 comments · Fixed by #177
Closed

Variable substitution and custom JMESPath function changes. #127

kacejot opened this issue Apr 6, 2021 · 4 comments · Fixed by #177
Labels
documentation Improvements or additions to documentation
Milestone

Comments

@kacejot
Copy link

kacejot commented Apr 6, 2021

kyverno/kyverno#1772 implements two new things:

  1. This one is tiny. New variable is available: {{@}} - current value that is being processed;
  2. List of new function that are available for using in JMESPath. The list is available in PR in functions.go file
@kacejot
Copy link
Author

kacejot commented Apr 7, 2021

List of new functions:

compare(a string, b string)
equal_fold(a string, b string)
replace(str string, old string, new string, n number)
replace_all(str string, old string, new string)
to_upper(str string)
to_lower(str string)
trim(str string, cutset string)
split(str string, separator string)
regex_replace_all(regex string, str string/number, new string/number)
regex_replace_all_literal(regex string, str string/number, new string/number)
regex_match(regex string, str string/number)

@kacejot
Copy link
Author

kacejot commented Apr 12, 2021

I have updated function list (removed equals because it has same behavior as == in JMESPath)

@chipzoller chipzoller added the documentation Improvements or additions to documentation label Apr 17, 2021
@chipzoller chipzoller modified the milestones: 1.3.5, 1.3.6 Apr 17, 2021
@chipzoller
Copy link
Contributor

@realshuting is this slated for 1.3.6? Please confirm.

@realshuting
Copy link
Member

@realshuting is this slated for 1.3.6? Please confirm.

Yes.

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

Successfully merging a pull request may close this issue.

3 participants