fix(service)!: align syntax with upstream - #1686
Conversation
mloiseleur
left a comment
There was a problem hiding this comment.
🤔 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:
- Wdyt of this approach?
- 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 |
|
Yes. |
|
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. |
|
@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 }} |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
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 [#​1669](traefik/traefik-helm-chart#1669) for more details. #### 💥 BREAKING CHANGES - refactor(chart)!: support only Proxy v3.6+ & Kubernetes v25+ [#​1718](traefik/traefik-helm-chart#1718) by [@​mloiseleur](https://github.com/mloiseleur) - fix(providers)!: kubernetesIngressNginx => kubernetesIngressNGINX [#​1714](traefik/traefik-helm-chart#1714) by [@​mloiseleur](https://github.com/mloiseleur) - fix(service)!: align syntax with upstream [#​1686](traefik/traefik-helm-chart#1686) by [@​parkerfath](https://github.com/parkerfath) #### 🚀 Features - feat: support templated values in service annotations [#​1696](traefik/traefik-helm-chart#1696) by [@​DrFaust92](https://github.com/DrFaust92) - feat(ingress): add native ingressEndpoint hostname and ip support [#​1695](traefik/traefik-helm-chart#1695) by [@​DrFaust92](https://github.com/DrFaust92) - feat(logs): add accesslog.dualOutput option [#​1725](traefik/traefik-helm-chart#1725) by [@​darkweaver87](https://github.com/darkweaver87) - feat(CRDs): 🚀 update CRDs to v3.7 [#​1721](traefik/traefik-helm-chart#1721) by [@​darkweaver87](https://github.com/darkweaver87) - feat(providers): 🚀 update NGINX with v3.7 options [#​1720](traefik/traefik-helm-chart#1720) by [@​darkweaver87](https://github.com/darkweaver87) - feat(entrypoints): add forwardedHeaders.notAppendXForwardedFor option [#​1723](traefik/traefik-helm-chart#1723) by [@​darkweaver87](https://github.com/darkweaver87) - feat(api): add dashboardName option [#​1726](traefik/traefik-helm-chart#1726) by [@​darkweaver87](https://github.com/darkweaver87) - feat(deployment): add hostUsers support [#​1744](traefik/traefik-helm-chart#1744) by [@​DrFaust92](https://github.com/DrFaust92) - feat(ports): add allowACMEByPass to web port values [#​1734](traefik/traefik-helm-chart#1734) by [@​jnoordsij](https://github.com/jnoordsij) - feat(ingressroute): support templating in annotations and labels [#​1728](traefik/traefik-helm-chart#1728) by [@​DrFaust92](https://github.com/DrFaust92) - feat(deps): update traefik docker tag to v3.6.12 (master) [#​1767](traefik/traefik-helm-chart#1767) by [@​renovate-with-github-actions](https://github.com/renovate-with-github-actions)\[bot] - feat(deps): update traefik docker tag to v3.6.13 (master) [#​1793](traefik/traefik-helm-chart#1793) by [@​renovate-with-github-actions](https://github.com/renovate-with-github-actions)\[bot] - feat(podtemplate): allow disabling automatic GOMEMLIMIT [#​1796](traefik/traefik-helm-chart#1796) by [@​johnvanhienen](https://github.com/johnvanhienen) - feat(deps): update traefik docker tag to v3.6.15 (master) [#​1818](traefik/traefik-helm-chart#1818) by [@​renovate-with-github-actions](https://github.com/renovate-with-github-actions)\[bot] - feat(proxy): add support of kubernetesIngressNGINX.ipAllowListStrategy [#​1828](traefik/traefik-helm-chart#1828) by [@​mloiseleur](https://github.com/mloiseleur) - feat(image): add image.digest for digest-based pinning [#​1821](traefik/traefik-helm-chart#1821) by [@​zalbiraw](https://github.com/zalbiraw) - feat(deps): support traefik v3.7.0 & hub v3.20.0 [#​1835](traefik/traefik-helm-chart#1835) by [@​mloiseleur](https://github.com/mloiseleur) #### 🐛 Bug fixes - fix(traefik-hub): set token using a file [#​1679](traefik/traefik-helm-chart#1679) by [@​komalsukhani](https://github.com/komalsukhani) - fix(providers.kubernetesIngressNGINX): 🐛 clarify int defaults [#​1829](traefik/traefik-helm-chart#1829) by [@​darkweaver87](https://github.com/darkweaver87) #### 📦 Others - refactor(providers): 🎨 kubernetes ingress nginx [#​1717](traefik/traefik-helm-chart#1717) by [@​darkweaver87](https://github.com/darkweaver87) - chore(ci): upgrade helm unittest to 1.0.1 [#​1713](traefik/traefik-helm-chart#1713) by [@​mloiseleur](https://github.com/mloiseleur) - docs(gateway): improve wording on namespaces [#​1716](traefik/traefik-helm-chart#1716) by [@​mloiseleur](https://github.com/mloiseleur) - test(acme): add certificateTimeout option coverage [#​1724](traefik/traefik-helm-chart#1724) by [@​darkweaver87](https://github.com/darkweaver87) - chore: 🍱 merge back 39.1.0-ea.2 into master [#​1727](traefik/traefik-helm-chart#1727) by [@​darkweaver87](https://github.com/darkweaver87) - chore(deps): update github actions (major) [#​1731](traefik/traefik-helm-chart#1731) by [@​renovate-with-github-actions](https://github.com/renovate-with-github-actions)\[bot] - chore(deps): update github actions [#​1730](traefik/traefik-helm-chart#1730) by [@​renovate-with-github-actions](https://github.com/renovate-with-github-actions)\[bot] - chore(deps): update github actions (major) [#​1756](traefik/traefik-helm-chart#1756) by [@​renovate-with-github-actions](https://github.com/renovate-with-github-actions)\[bot] - chore(deps): update github actions [#​1755](traefik/traefik-helm-chart#1755) by [@​renovate-with-github-actions](https://github.com/renovate-with-github-actions)\[bot] - docs(values): update reference links [#​1762](traefik/traefik-helm-chart#1762) by [@​mloiseleur](https://github.com/mloiseleur) - docs(values): clarify that kubernetesIngressNGINX.watchNamespace only watches one namespace [#​1759](traefik/traefik-helm-chart#1759) by [@​parkerfath](https://github.com/parkerfath) - docs: clarify DaemonSet updateStrategy to prevent rollout deadlock [#​1761](traefik/traefik-helm-chart#1761) by [@​Ahmed-Sameh-MM](https://github.com/Ahmed-Sameh-MM) - ci: fix renovate config and extend to v40.0 branch [#​1765](traefik/traefik-helm-chart#1765) by [@​mloiseleur](https://github.com/mloiseleur) - ci(renovate): add v40.0 baseBranch on traefik updates [#​1770](traefik/traefik-helm-chart#1770) by [@​mloiseleur](https://github.com/mloiseleur) - ci(renovate): disable gha update on previous branches [#​1774](traefik/traefik-helm-chart#1774) by [@​mloiseleur](https://github.com/mloiseleur) - ci(renovate): enable stable updates on v39.0 [#​1775](traefik/traefik-helm-chart#1775) by [@​mloiseleur](https://github.com/mloiseleur) - chore(deps): update ghcr.io/traefik/helm-changelog docker tag to v1 (master) [#​1771](traefik/traefik-helm-chart#1771) by [@​renovate-with-github-actions](https://github.com/renovate-with-github-actions)\[bot] - chore(deps): update github actions (master) [#​1776](traefik/traefik-helm-chart#1776) by [@​renovate-with-github-actions](https://github.com/renovate-with-github-actions)\[bot] - chore(deps): update dawidd6/action-download-artifact action to v20 (master) [#​1786](traefik/traefik-helm-chart#1786) by [@​renovate-with-github-actions](https://github.com/renovate-with-github-actions)\[bot] - chore(deps): update github actions (master) [#​1785](traefik/traefik-helm-chart#1785) by [@​renovate-with-github-actions](https://github.com/renovate-with-github-actions)\[bot] - chore(deps): update github actions (master) [#​1794](traefik/traefik-helm-chart#1794) by [@​renovate-with-github-actions](https://github.com/renovate-with-github-actions)\[bot] - chore(deps): update renovatebot/github-action action to v46.1.10 (master) [#​1811](traefik/traefik-helm-chart#1811) by [@​renovate-with-github-actions](https://github.com/renovate-with-github-actions)\[bot] - docs(examples): 📚 Azure Application Gateway and Load Balancer [#​1797](traefik/traefik-helm-chart#1797) by [@​darkweaver87](https://github.com/darkweaver87) - docs(examples): 📚 deployment with FluxCD OCI [#​1792](traefik/traefik-helm-chart#1792) by [@​darkweaver87](https://github.com/darkweaver87) - docs: add example for binding to privileged ports [#​1783](traefik/traefik-helm-chart#1783) by [@​tmchow](https://github.com/tmchow) - chore(deps): update renovatebot/github-action action to v46.1.13 (master) [#​1817](traefik/traefik-helm-chart#1817) by [@​renovate-with-github-actions](https://github.com/renovate-with-github-actions)\[bot] - chore(deps): update dawidd6/action-download-artifact action to v21 (master) [#​1822](traefik/traefik-helm-chart#1822) by [@​renovate-with-github-actions](https://github.com/renovate-with-github-actions)\[bot] - chore: 🍱 merge back v40.0 into master [#​1827](traefik/traefik-helm-chart#1827) by [@​darkweaver87](https://github.com/darkweaver87) - docs(readme): fix latest patch versions for legacy [#​1830](traefik/traefik-helm-chart#1830) by [@​jnoordsij](https://github.com/jnoordsij) - ci(renovate): switch to master branch [#​1833](traefik/traefik-helm-chart#1833) by [@​mloiseleur](https://github.com/mloiseleur) - ci(renovate): disable renovate self rate limit [#​1834](traefik/traefik-helm-chart#1834) by [@​mloiseleur](https://github.com/mloiseleur) - chore(release): 🚀 publish traefik 40.0.0 and crds 1.18.0 [#​1836](traefik/traefik-helm-chart#1836) by [@​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) [#​1823](traefik/traefik-helm-chart#1823) by [@​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 [#​1813](traefik/traefik-helm-chart#1813) by [@​mmatur](https://github.com/mmatur) #### 📦 Others - chore(release): 🚀 publish traefik 39.0.9 and crds 1.14.1 [#​1825](traefik/traefik-helm-chart#1825) by [@​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>
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
After
Motivation
See #1680 - I tried uncommenting and setting externalTrafficPolicy but it was silently ignored.
More
make testand all the tests passed(No test or schema change needed, but I did run the tests.)