Skip to content

docs(fqdn): use correct arguments order in FQDN Templating custom functions#6144

Merged
k8s-ci-robot merged 3 commits intokubernetes-sigs:masterfrom
zcahana:fqdn-template-func-args
Jan 30, 2026
Merged

docs(fqdn): use correct arguments order in FQDN Templating custom functions#6144
k8s-ci-robot merged 3 commits intokubernetes-sigs:masterfrom
zcahana:fqdn-template-func-args

Conversation

@zcahana
Copy link
Copy Markdown
Contributor

@zcahana zcahana commented Jan 25, 2026

What does it do ?

This PR fixes the FQDN Templating guide to correctly specify the arguments order for the trimPrefix, trimSuffix, and replace custom 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

  • Yes, this PR title follows Conventional Commits
  • Yes, I added unit tests
  • Yes, I updated end user documentation accordingly

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

Welcome @zcahana!

It looks like this is your first PR to kubernetes-sigs/external-dns 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/external-dns has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jan 25, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions 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.

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jan 25, 2026
@ivankatliarchuk
Copy link
Copy Markdown
Member

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jan 28, 2026
@coveralls
Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 21493672451

Warning: 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

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.9%) to 79.904%

Totals Coverage Status
Change from base Build 21330217007: 0.9%
Covered Lines: 16346
Relevant Lines: 20457

💛 - Coveralls

@ivankatliarchuk
Copy link
Copy Markdown
Member

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 30, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[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

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 30, 2026
@k8s-ci-robot k8s-ci-robot merged commit d40b200 into kubernetes-sigs:master Jan 30, 2026
18 checks passed
@zcahana
Copy link
Copy Markdown
Contributor Author

zcahana commented Jan 30, 2026

Thanks @ivankatliarchuk, appreciate the quick review.

ivankatliarchuk added a commit to gofogo/k8s-sigs-external-dns-fork that referenced this pull request Feb 1, 2026
* 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)
ivankatliarchuk added a commit to gofogo/k8s-sigs-external-dns-fork that referenced this pull request Feb 1, 2026
…_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)
ivankatliarchuk added a commit to gofogo/k8s-sigs-external-dns-fork that referenced this pull request Feb 1, 2026
* 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. docs lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. source

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants