-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Added replaceAll support for go templates #5468
Added replaceAll support for go templates #5468
Conversation
👷 Deploy request for nginx-kubernetes-ingress pending review.Visit the deploys page to approve it
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It could be potentially confusing for the users since this PR makes changes to helper functions in internal/configs/version2
but the docs are for ingress template only.
Helper functions can be used in the Ingress template to parse the values of custom annotations.
https://github.com/nginxinc/kubernetes-ingress/pull/5468/files#diff-41a03d28be17f49b16b7644d03d1dafb5073b6aee2ffafe099446b1649dba1cfR103
Until we change the page's wording or move it to a better location, I would suggest following this PR #4560 and add the replaceAll
function to both version1
and version2
I also think we should add a test case for the function to template_helper_test.go
in both version1
and version2
like the PR mentioned above
Proposed changes
Enabled support for
replaceAll
in go templatesChecklist
Before creating a PR, run through this checklist and mark each as complete.