docs(fqdn): use correct arguments order in FQDN Templating custom functions#6144
Conversation
|
Welcome @zcahana! |
|
Hi @zcahana. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
/ok-to-test |
Pull Request Test Coverage Report for Build 21493672451Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ivankatliarchuk The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
Thanks @ivankatliarchuk, appreciate the quick review. |
* master: fix(annotations): initialize annotation keys at declaration time (kubernetes-sigs#6159) chore(linter): unused params and functions linter (kubernetes-sigs#6142) docs(fqdn): use correct arguments order in FQDN Templating custom functions (kubernetes-sigs#6144)
…_total * master: chore(deps): bump mkdocs-git-revision-date-localized-plugin (kubernetes-sigs#6161) fix(annotations): initialize annotation keys at declaration time (kubernetes-sigs#6159) chore(linter): unused params and functions linter (kubernetes-sigs#6142) docs(fqdn): use correct arguments order in FQDN Templating custom functions (kubernetes-sigs#6144) chore(cloudflare): improve tests (kubernetes-sigs#6150) refactor(kubeclient): consolidate duplicate code (kubernetes-sigs#6076) remove call to get latest kubectl (kubernetes-sigs#6148) refactor(aws): extract and restructure alias-handling logic to enable safe upcoming fixes (kubernetes-sigs#6021) feat(pihole): deprecate v5 API support (kubernetes-sigs#6123) chore(cloudflare): move custom hostnames logic to dedicated files (kubernetes-sigs#6114) chore(provider): zone cache provider interface (kubernetes-sigs#6120)
* master: chore(deps): bump mkdocs-git-revision-date-localized-plugin (kubernetes-sigs#6161) fix(annotations): initialize annotation keys at declaration time (kubernetes-sigs#6159) chore(linter): unused params and functions linter (kubernetes-sigs#6142) docs(fqdn): use correct arguments order in FQDN Templating custom functions (kubernetes-sigs#6144) chore(cloudflare): improve tests (kubernetes-sigs#6150)
What does it do ?
This PR fixes the FQDN Templating guide to correctly specify the arguments order for the
trimPrefix,trimSuffix, andreplacecustom template functions.The original documentation demonstrated incorrect order, that yielded unexpected results (e.g.,
{{ trimSuffix "fix" "suffix" }} → fix).Note that the rather common Sprig library does use the original args order (e.g.,
{{ trimSuffix "fix" "suffix" }}), so this indeed might create some confusion, but at least we can be explicit about that.Additionally, added some additional unit test cases to verify basic usage of these template functions.
Motivation
Keep the documentation in-line with how these custom template funcs actually work.
More