Skip to content

fix(service)!: align syntax with upstream - #1686

Merged
traefiker merged 4 commits into
traefik:masterfrom
parkerfath:chore/values-service-indent
Mar 13, 2026
Merged

fix(service)!: align syntax with upstream#1686
traefiker merged 4 commits into
traefik:masterfrom
parkerfath:chore/values-service-indent

Conversation

@parkerfath

@parkerfath parkerfath commented Feb 25, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Changes the indent and order of a few values.yaml items under service.spec to clarify which items go inside the "spec" field and which items are directly under "service."

Before

service:
  type: LoadBalancer
  loadBalancerSourceRanges:
    - 192.168.0.1/32
  externalIPs:
    - 1.2.3.4
  ipFamilyPolicy: SingleStack
  ipFamilies:
    - IPv6
  spec:
    externalTrafficPolicy: Cluster

After

service:
  spec:
    type: LoadBalancer
    externalIPs:
      - 1.2.3.4
    externalTrafficPolicy: Cluster
    ipFamilyPolicy: SingleStack
    ipFamilies:
      - IPv6
    loadBalancerSourceRanges:
      - 192.168.0.1/32

Motivation

See #1680 - I tried uncommenting and setting externalTrafficPolicy but it was silently ignored.

More

  • Yes, I updated the tests accordingly
  • Yes, I updated the schema accordingly
  • Yes, I ran make test and all the tests passed

(No test or schema change needed, but I did run the tests.)

@mloiseleur mloiseleur left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔 In fact, we should not have also type, loadBalancerSourceRanges and externalIPs. And there is the same issue for the additionalServices section.

Like all the others, there are all subparameters of Service's spec. For consistency and simplicity, they all should be set in service.spec (except selector and ports entries, that should be computed from related values)

This is not only in values, we should also remove nearly all the code (and just keep what the user set on .spec) here:

https://github.com/traefik/traefik-helm-chart/blob/master/traefik/templates/_service.tpl#L22-L50

And also, to avoid values.yaml growing too much, we've moved the examples to EXAMPLES.md

I know it's breaking but sometimes it can be better in the long term.
This brings two questions:

  1. Wdyt of this approach?
  2. Do you think you can try to implement it? Or do you prefer that we update your PR?

@mloiseleur mloiseleur added area/documentation Improvements or additions to documentation contributor/waiting-for-feedback labels Mar 4, 2026
@parkerfath

Copy link
Copy Markdown
Contributor Author

🤔 In fact, we should not have also type, loadBalancerSourceRanges and externalIPs. And there is the same issue for the additionalServices section.

Like all the others, there are all subparameters of Service's spec. For consistency and simplicity, they all should be set in service.spec (except selector and ports entries, that should be computed from related values)

This is not only in values, we should also remove nearly all the code (and just keep what the user set on .spec) here:

https://github.com/traefik/traefik-helm-chart/blob/master/traefik/templates/_service.tpl#L22-L50

And also, to avoid values.yaml growing too much, we've moved the examples to EXAMPLES.md

I know it's breaking but sometimes it can be better in the long term. This brings two questions:

  1. Wdyt of this approach?
  2. Do you think you can try to implement it? Or do you prefer that we update your PR?

Hmm I think I see what you're getting at, but not sure I have enough context to implement. Would it be something like this? https://github.com/parkerfath/traefik-helm-chart/commit/3a6136191934d6f737b863c423745425d72901c5

@mloiseleur

mloiseleur commented Mar 5, 2026

Copy link
Copy Markdown
Member

Yes.
There is also this helper to rework. It should only set .service.spec. And there are also tests to update accordingly to this new behavior.

@parkerfath

Copy link
Copy Markdown
Contributor Author

I am interested, but might not be able to carve out the time to do it quickly (not to mention this is my first contribution to a helm chart). So, if it's high priority you can feel free to take it off my hands, otherwise, I'll see what I can do with my free cycles.

@mloiseleur mloiseleur changed the title chore: tweak values.yaml service.spec comments to clarify child attributes fix(service)!: align syntax with upstream Mar 11, 2026
@mloiseleur mloiseleur linked an issue Mar 11, 2026 that may be closed by this pull request
2 tasks
@mloiseleur mloiseleur added kind/bug/fix kind/breaking This PR introduce a breaking change and removed area/documentation Improvements or additions to documentation contributor/waiting-for-feedback labels Mar 11, 2026
@mloiseleur

mloiseleur commented Mar 11, 2026

Copy link
Copy Markdown
Member

@parkerfath I updated the PR with the simplified syntax. It comes with less code to maintain and should avoid any future confusion this. Since it's a breaking change, I updated PR description with a before / after block.

{{- end}}
{{- with .service.spec }}
{{- toYaml . | nindent 2 }}
{{- toYaml . | nindent 2 }}

@jnoordsij jnoordsij Mar 12, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could use (merge . (dict "type" "LoadBalancer")) here (if the top-of-my-head Helm skills suffice) to at least retain the previous default? Otherwise requiring people to provide this now is also not too much of a breaking change I'd say.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the other moves like this, we failed gracefully (with schema) and did not support it, so the user can update it.

🤔

With current schema verification, it will fail anyway before this merge is executed.
So I think we can stay like that. It's only a parent change.

@traefiker
traefiker merged commit b9f3ed3 into traefik:master Mar 13, 2026
2 checks passed
mitchell-thompson-CS pushed a commit to toast-dog/kubernetes-terraform that referenced this pull request May 7, 2026
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [traefik](https://traefik.io/) ([source](https://github.com/traefik/traefik-helm-chart)) | major | `39.0.8` → `40.0.0` |

---

### Release Notes

<details>
<summary>traefik/traefik-helm-chart (traefik)</summary>

### [`v40.0.0`](https://github.com/traefik/traefik-helm-chart/releases/tag/v40.0.0)

[Compare Source](traefik/traefik-helm-chart@v39.0.9...v40.0.0)

**Upgrade Notes**

> \[!IMPORTANT]
> Traefik v3.7.0 comes with CRDs update. See [UPGRADING](https://github.com/traefik/traefik-helm-chart?tab=readme-ov-file#upgrading) instructions and upstream [migration guide](https://doc.traefik.io/traefik/v3.7/migrate/v3/#v370).

> \[!NOTE]
> Gateway API CRDs will no longer be shipped with this chart in the next future major version. See [#&#8203;1669](traefik/traefik-helm-chart#1669) for more details.

#### 💥 BREAKING CHANGES

- refactor(chart)!: support only Proxy v3.6+ & Kubernetes v25+ [#&#8203;1718](traefik/traefik-helm-chart#1718) by [@&#8203;mloiseleur](https://github.com/mloiseleur)
- fix(providers)!: kubernetesIngressNginx => kubernetesIngressNGINX [#&#8203;1714](traefik/traefik-helm-chart#1714) by [@&#8203;mloiseleur](https://github.com/mloiseleur)
- fix(service)!: align syntax with upstream [#&#8203;1686](traefik/traefik-helm-chart#1686) by [@&#8203;parkerfath](https://github.com/parkerfath)

#### 🚀 Features

- feat: support templated values in service annotations [#&#8203;1696](traefik/traefik-helm-chart#1696) by [@&#8203;DrFaust92](https://github.com/DrFaust92)
- feat(ingress): add native ingressEndpoint hostname and ip support [#&#8203;1695](traefik/traefik-helm-chart#1695) by [@&#8203;DrFaust92](https://github.com/DrFaust92)
- feat(logs): add accesslog.dualOutput option [#&#8203;1725](traefik/traefik-helm-chart#1725) by [@&#8203;darkweaver87](https://github.com/darkweaver87)
- feat(CRDs): 🚀 update CRDs to v3.7 [#&#8203;1721](traefik/traefik-helm-chart#1721) by [@&#8203;darkweaver87](https://github.com/darkweaver87)
- feat(providers): 🚀 update NGINX with v3.7 options [#&#8203;1720](traefik/traefik-helm-chart#1720) by [@&#8203;darkweaver87](https://github.com/darkweaver87)
- feat(entrypoints): add forwardedHeaders.notAppendXForwardedFor option [#&#8203;1723](traefik/traefik-helm-chart#1723) by [@&#8203;darkweaver87](https://github.com/darkweaver87)
- feat(api): add dashboardName option [#&#8203;1726](traefik/traefik-helm-chart#1726) by [@&#8203;darkweaver87](https://github.com/darkweaver87)
- feat(deployment): add hostUsers support [#&#8203;1744](traefik/traefik-helm-chart#1744) by [@&#8203;DrFaust92](https://github.com/DrFaust92)
- feat(ports): add allowACMEByPass to web port values [#&#8203;1734](traefik/traefik-helm-chart#1734) by [@&#8203;jnoordsij](https://github.com/jnoordsij)
- feat(ingressroute): support templating in annotations and labels [#&#8203;1728](traefik/traefik-helm-chart#1728) by [@&#8203;DrFaust92](https://github.com/DrFaust92)
- feat(deps): update traefik docker tag to v3.6.12 (master) [#&#8203;1767](traefik/traefik-helm-chart#1767) by [@&#8203;renovate-with-github-actions](https://github.com/renovate-with-github-actions)\[bot]
- feat(deps): update traefik docker tag to v3.6.13 (master) [#&#8203;1793](traefik/traefik-helm-chart#1793) by [@&#8203;renovate-with-github-actions](https://github.com/renovate-with-github-actions)\[bot]
- feat(podtemplate): allow disabling automatic GOMEMLIMIT [#&#8203;1796](traefik/traefik-helm-chart#1796) by [@&#8203;johnvanhienen](https://github.com/johnvanhienen)
- feat(deps): update traefik docker tag to v3.6.15 (master) [#&#8203;1818](traefik/traefik-helm-chart#1818) by [@&#8203;renovate-with-github-actions](https://github.com/renovate-with-github-actions)\[bot]
- feat(proxy): add support of kubernetesIngressNGINX.ipAllowListStrategy [#&#8203;1828](traefik/traefik-helm-chart#1828) by [@&#8203;mloiseleur](https://github.com/mloiseleur)
- feat(image): add image.digest for digest-based pinning [#&#8203;1821](traefik/traefik-helm-chart#1821) by [@&#8203;zalbiraw](https://github.com/zalbiraw)
- feat(deps): support traefik v3.7.0 & hub v3.20.0 [#&#8203;1835](traefik/traefik-helm-chart#1835) by [@&#8203;mloiseleur](https://github.com/mloiseleur)

#### 🐛 Bug fixes

- fix(traefik-hub): set token using a file [#&#8203;1679](traefik/traefik-helm-chart#1679) by [@&#8203;komalsukhani](https://github.com/komalsukhani)
- fix(providers.kubernetesIngressNGINX): 🐛 clarify int defaults [#&#8203;1829](traefik/traefik-helm-chart#1829) by [@&#8203;darkweaver87](https://github.com/darkweaver87)

#### 📦 Others

- refactor(providers): 🎨 kubernetes ingress nginx [#&#8203;1717](traefik/traefik-helm-chart#1717) by [@&#8203;darkweaver87](https://github.com/darkweaver87)
- chore(ci): upgrade helm unittest to 1.0.1 [#&#8203;1713](traefik/traefik-helm-chart#1713) by [@&#8203;mloiseleur](https://github.com/mloiseleur)
- docs(gateway): improve wording on namespaces [#&#8203;1716](traefik/traefik-helm-chart#1716) by [@&#8203;mloiseleur](https://github.com/mloiseleur)
- test(acme): add certificateTimeout option coverage [#&#8203;1724](traefik/traefik-helm-chart#1724) by [@&#8203;darkweaver87](https://github.com/darkweaver87)
- chore: 🍱 merge back 39.1.0-ea.2 into master [#&#8203;1727](traefik/traefik-helm-chart#1727) by [@&#8203;darkweaver87](https://github.com/darkweaver87)
- chore(deps): update github actions (major) [#&#8203;1731](traefik/traefik-helm-chart#1731) by [@&#8203;renovate-with-github-actions](https://github.com/renovate-with-github-actions)\[bot]
- chore(deps): update github actions [#&#8203;1730](traefik/traefik-helm-chart#1730) by [@&#8203;renovate-with-github-actions](https://github.com/renovate-with-github-actions)\[bot]
- chore(deps): update github actions (major) [#&#8203;1756](traefik/traefik-helm-chart#1756) by [@&#8203;renovate-with-github-actions](https://github.com/renovate-with-github-actions)\[bot]
- chore(deps): update github actions [#&#8203;1755](traefik/traefik-helm-chart#1755) by [@&#8203;renovate-with-github-actions](https://github.com/renovate-with-github-actions)\[bot]
- docs(values): update reference links [#&#8203;1762](traefik/traefik-helm-chart#1762) by [@&#8203;mloiseleur](https://github.com/mloiseleur)
- docs(values): clarify that kubernetesIngressNGINX.watchNamespace only watches one namespace [#&#8203;1759](traefik/traefik-helm-chart#1759) by [@&#8203;parkerfath](https://github.com/parkerfath)
- docs: clarify DaemonSet updateStrategy to prevent rollout deadlock [#&#8203;1761](traefik/traefik-helm-chart#1761) by [@&#8203;Ahmed-Sameh-MM](https://github.com/Ahmed-Sameh-MM)
- ci: fix renovate config and extend to v40.0 branch [#&#8203;1765](traefik/traefik-helm-chart#1765) by [@&#8203;mloiseleur](https://github.com/mloiseleur)
- ci(renovate): add v40.0 baseBranch on traefik updates [#&#8203;1770](traefik/traefik-helm-chart#1770) by [@&#8203;mloiseleur](https://github.com/mloiseleur)
- ci(renovate): disable gha update on previous branches [#&#8203;1774](traefik/traefik-helm-chart#1774) by [@&#8203;mloiseleur](https://github.com/mloiseleur)
- ci(renovate): enable stable updates on v39.0 [#&#8203;1775](traefik/traefik-helm-chart#1775) by [@&#8203;mloiseleur](https://github.com/mloiseleur)
- chore(deps): update ghcr.io/traefik/helm-changelog docker tag to v1 (master) [#&#8203;1771](traefik/traefik-helm-chart#1771) by [@&#8203;renovate-with-github-actions](https://github.com/renovate-with-github-actions)\[bot]
- chore(deps): update github actions (master) [#&#8203;1776](traefik/traefik-helm-chart#1776) by [@&#8203;renovate-with-github-actions](https://github.com/renovate-with-github-actions)\[bot]
- chore(deps): update dawidd6/action-download-artifact action to v20 (master) [#&#8203;1786](traefik/traefik-helm-chart#1786) by [@&#8203;renovate-with-github-actions](https://github.com/renovate-with-github-actions)\[bot]
- chore(deps): update github actions (master) [#&#8203;1785](traefik/traefik-helm-chart#1785) by [@&#8203;renovate-with-github-actions](https://github.com/renovate-with-github-actions)\[bot]
- chore(deps): update github actions (master) [#&#8203;1794](traefik/traefik-helm-chart#1794) by [@&#8203;renovate-with-github-actions](https://github.com/renovate-with-github-actions)\[bot]
- chore(deps): update renovatebot/github-action action to v46.1.10 (master) [#&#8203;1811](traefik/traefik-helm-chart#1811) by [@&#8203;renovate-with-github-actions](https://github.com/renovate-with-github-actions)\[bot]
- docs(examples): 📚 Azure Application Gateway and Load Balancer [#&#8203;1797](traefik/traefik-helm-chart#1797) by [@&#8203;darkweaver87](https://github.com/darkweaver87)
- docs(examples): 📚 deployment with FluxCD OCI [#&#8203;1792](traefik/traefik-helm-chart#1792) by [@&#8203;darkweaver87](https://github.com/darkweaver87)
- docs: add example for binding to privileged ports [#&#8203;1783](traefik/traefik-helm-chart#1783) by [@&#8203;tmchow](https://github.com/tmchow)
- chore(deps): update renovatebot/github-action action to v46.1.13 (master) [#&#8203;1817](traefik/traefik-helm-chart#1817) by [@&#8203;renovate-with-github-actions](https://github.com/renovate-with-github-actions)\[bot]
- chore(deps): update dawidd6/action-download-artifact action to v21 (master) [#&#8203;1822](traefik/traefik-helm-chart#1822) by [@&#8203;renovate-with-github-actions](https://github.com/renovate-with-github-actions)\[bot]
- chore: 🍱 merge back v40.0 into master [#&#8203;1827](traefik/traefik-helm-chart#1827) by [@&#8203;darkweaver87](https://github.com/darkweaver87)
- docs(readme): fix latest patch versions for legacy [#&#8203;1830](traefik/traefik-helm-chart#1830) by [@&#8203;jnoordsij](https://github.com/jnoordsij)
- ci(renovate): switch to master branch [#&#8203;1833](traefik/traefik-helm-chart#1833) by [@&#8203;mloiseleur](https://github.com/mloiseleur)
- ci(renovate): disable renovate self rate limit [#&#8203;1834](traefik/traefik-helm-chart#1834) by [@&#8203;mloiseleur](https://github.com/mloiseleur)
- chore(release): 🚀 publish traefik 40.0.0 and crds 1.18.0 [#&#8203;1836](traefik/traefik-helm-chart#1836) by [@&#8203;mloiseleur](https://github.com/mloiseleur)

#### 👌 Traefik version support

- Traefik Proxy: v3.6.0 -> v3.7.0 (default)
- Traefik Hub: v3.19.3 -> v3.20.0

### [`v39.0.9`](https://github.com/traefik/traefik-helm-chart/releases/tag/v39.0.9)

[Compare Source](traefik/traefik-helm-chart@v39.0.8...v39.0.9)

**Upgrade Notes**

> \[!IMPORTANT]
> This new default Traefik version comes with CRDs update.
> See [UPGRADING](https://github.com/traefik/traefik-helm-chart?tab=readme-ov-file#upgrading) instructions + upstream [migration guide](https://doc.traefik.io/traefik/v3.7/migrate/v3/#v3615).

#### 👌 Traefik version support

- Traefik Proxy: v3.6.x
- Traefik Hub: v3.19.x

#### 🚀 Features

- feat(deps): update traefik docker tag to v3.6.15 (v39.0) [#&#8203;1823](traefik/traefik-helm-chart#1823) by [@&#8203;renovate-with-github-actions](https://github.com/renovate-with-github-actions)\[bot]

#### 🐛 Bug fixes

- fix(deps): bump traefik.io CRDs to release v3.6.14 [#&#8203;1813](traefik/traefik-helm-chart#1813) by [@&#8203;mmatur](https://github.com/mmatur)

#### 📦 Others

- chore(release): 🚀 publish traefik 39.0.9 and crds 1.14.1 [#&#8203;1825](traefik/traefik-helm-chart#1825) by [@&#8203;mloiseleur](https://github.com/mloiseleur)

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xNjguNSIsInVwZGF0ZWRJblZlciI6IjQzLjE2OC41IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJyZW5vdmF0ZSJdfQ==-->

Reviewed-on: https://git.thompson-manor.org/toast-dog/kubernetes-terraform/pulls/20
Co-authored-by: Renovate Bot <renovate@toastdog.net>
Co-committed-by: Renovate Bot <renovate@toastdog.net>
mcsrobert added a commit to mcsrobert/homelab that referenced this pull request May 11, 2026
mcsrobert added a commit to mcsrobert/homelab that referenced this pull request May 11, 2026
mcsrobert added a commit to mcsrobert/homelab that referenced this pull request May 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/breaking This PR introduce a breaking change kind/bug/fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

externalTrafficPolicy: Local seems to be ignored on helm install

4 participants