Skip to content

Conversation

@nadiamoe
Copy link
Contributor

@nadiamoe nadiamoe commented Aug 5, 2024

For dual stack (IPv4 and IPv6) clusters, services need to be explicitly opted-in into having two addresses. This is done through the ipFamilyPolicy field, as documented in https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services.

I've wired the templates in a way where if this field is not present, nothing is rendered. This preserves the usual behavior of not specifying this value altogether for services.

@nadiamoe nadiamoe force-pushed the external-service-family branch 2 times, most recently from b52e938 to bb6fbac Compare August 6, 2024 14:47
@nadiamoe nadiamoe force-pushed the external-service-family branch from bb6fbac to da26800 Compare August 6, 2024 14:51
@nadiamoe
Copy link
Contributor Author

CI/CD fails for reasons unknown to me, but I think the PR itself should be okay.

{{- with .Values.front.externalService }}
type: {{ .type | default "ClusterIP" }}
externalTrafficPolicy: {{ .externalTrafficPolicy | default "Local" }}
{{- with .ipFamilyPolicy }}
Copy link
Contributor

Choose a reason for hiding this comment

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

Why use with here and not if?
It would seem that it's not certain that ipFamilyPolicy exists.
with assumes your variable is present: https://helm.sh/docs/chart_template_guide/control_structures/#modifying-scope-using-with

Copy link
Contributor Author

Choose a reason for hiding this comment

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

With and if should behave the same if the variable is absent (not yielding anything), but with only makes you write the name of the field (ipFamilyPolicy) once. So the chance to make a typo is reduced by 50% 😁

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The "typo chance" is not a joke, I think the vast majority of helm chart bugs I've seen, fixed, and introduced come from copypasting snippets and forget to change part of them.

@DrPsychick
Copy link
Collaborator

DrPsychick commented Oct 7, 2024

@fastlorenzo this looks good to me, can we get it merged?

@github-actions
Copy link
Contributor

github-actions bot commented Nov 7, 2024

This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions github-actions bot added the Stale Issues or pull requests that have not been updated for a while label Nov 7, 2024
@nadiamoe
Copy link
Contributor Author

Unstale

@github-actions github-actions bot removed the Stale Issues or pull requests that have not been updated for a while label Nov 11, 2024
@github-actions
Copy link
Contributor

This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions github-actions bot added the Stale Issues or pull requests that have not been updated for a while label Dec 11, 2024
@WebSpider
Copy link
Contributor

Unstale

@nadiamoe
Copy link
Contributor Author

Hey folks, this has been lingering for a long while now. Is there anything I can do to help get this merged?
Due to the nature of helm charts, this not being upstream makes me maintain and deploy a fork of the chart with this commit on it, which is not great. Thanks!

@DrPsychick
Copy link
Collaborator

Hi @roobre I'm in contact with the maintainer to see how we can spped things up here.

@nadiamoe nadiamoe requested a review from WebSpider March 4, 2025 08:17
Copy link
Contributor

@WebSpider WebSpider left a comment

Choose a reason for hiding this comment

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

Lgtm

@nadiamoe
Copy link
Contributor Author

nadiamoe commented Mar 4, 2025

@fastlorenzo Sorry for the direct ping, but you seem to be the most recent contributor here. Is there any chance you can stamp this? Should be a simple change 🙏🏻

@github-actions github-actions bot removed the Stale Issues or pull requests that have not been updated for a while label Aug 31, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Oct 2, 2025

This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions github-actions bot added the Stale Issues or pull requests that have not been updated for a while label Oct 2, 2025
@DrPsychick DrPsychick removed the Stale Issues or pull requests that have not been updated for a while label Oct 17, 2025
@promasu
Copy link
Contributor

promasu commented Oct 17, 2025

@nadiamoe Can you rebase?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants