Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add support for dual stack clusters #84

Merged
merged 1 commit into from
May 28, 2024
Merged

feat: add support for dual stack clusters #84

merged 1 commit into from
May 28, 2024

Conversation

M0NsTeRRR
Copy link
Contributor

Support dual stack clusters :)

@guilload guilload requested a review from rdettai May 9, 2024 14:40
@rdettai
Copy link
Collaborator

rdettai commented May 13, 2024

Thanks for this contribution! Can you tell us a bit more about a use case when this is useful? Even though it's just an extra feature, I'm a bit concerned by the ever growing number of tuning nobs on the chart!

Also, this conflicts with #83

Comment on lines +429 to +433
# -- Set the ip family policy to configure dual-stack see [Configure dual-stack](https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services)
ipFamilyPolicy: ""
# -- Sets the families that should be supported and the order in which they should be applied to ClusterIP as well. Can be IPv4 and/or IPv6.
ipFamilies: []

Copy link
Collaborator

@rdettai rdettai May 13, 2024

Choose a reason for hiding this comment

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

Not sure what the best practice is here.

Suggested change
# -- Set the ip family policy to configure dual-stack see [Configure dual-stack](https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services)
ipFamilyPolicy: ""
# -- Sets the families that should be supported and the order in which they should be applied to ClusterIP as well. Can be IPv4 and/or IPv6.
ipFamilies: []
# -- Set the ip family policy to configure dual-stack. See [Configure dual-stack](https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services)
# ipFamilyPolicy: "PreferDualStack"
# -- Sets the families that should be supported and the order in which they should be applied to ClusterIP as well. Can be IPv4 and/or IPv6.
# ipFamilies: ["IPv4","IPv6"]

Copy link
Contributor Author

@M0NsTeRRR M0NsTeRRR May 13, 2024

Choose a reason for hiding this comment

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

We could comment it out to indicate that it's not a required configuration if you prefer but if you use one day helm-docs to comment helm chart configuration commented field will not appears it's why I did that. However if you want to comment it, I believe it's better to retain the current value to demonstrate the default behavior.

Copy link
Collaborator

Choose a reason for hiding this comment

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

the main benefit of commenting out I think is that when we test it, we test that it is compatible with old configuration that didn't have the value!

I believe it's better to retain the current value to demonstrate the default behavior

What is the default behavior actually? "" and [] are pretty confusing to me.

Copy link
Contributor Author

@M0NsTeRRR M0NsTeRRR May 14, 2024

Choose a reason for hiding this comment

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

the main benefit of commenting out I think is that when we test it, we test that it is compatible with old configuration that didn't have the value!

As you want :)

What is the default behavior actually? "" and [] are pretty confusing to me.

They are not set as they are treated as empty value for gotemplate and use default kubernetes values.

The default kubernetes values are :
ipFamilyPolicy: "SingleStack"
ipFamilies: "" # no value, it depends on cluster configuration and ipFamilyPolicy

https://kubernetes.io/docs/reference/kubernetes-api/service-resources/service-v1/

@M0NsTeRRR
Copy link
Contributor Author

Yes, indeed. Some users, like myself, operate dual-stack clusters with both IPv4 and IPv6 deployed. Quickwit for now only supports IPv4 services in dual stack configuration, as IPv4 takes precedence over IPv6 and this cannot be altered. The introduction of the ipFamilies feature allows users to prioritize IPv6 over IPv4. ipFamilyPolicy will allow user to choose if what they want to assign. Why is this significant? Well, IPv6 and IPv4 represent distinct networks, each with its own latency and speed characteristics, which can vary depending on the internet service providers. Moreover, enabling this feature facilitates the seamless operation of existing IPv6 and IPv4 network applications together.

Additionally, it's worth noting that Quickwit pods already possess IPv4, and only IPv6 services are affected, as detailed in the Kubernetes documentation here: link.

Importantly, the current implementation does not constitute a breaking change. Rather, it allow concerned users to opt into IPv6 support if they desire.

@guilload
Copy link
Member

Ok to ship this feature as long as it remains invisible to users who don't care about IPv6.

@rdettai
Copy link
Collaborator

rdettai commented May 16, 2024

Sorry I didn't have the time to test this PR yet, I'll do it early next week. Looking good overall!

@rdettai
Copy link
Collaborator

rdettai commented May 28, 2024

I tested that it works without specifying the new parameters. I don't have a cluster with IPv6 configured so I can't test dual stack, but given that the current functionalities are not impact, I'm merging this anyway.

@rdettai rdettai merged commit eba4224 into quickwit-oss:main May 28, 2024
1 check passed
@M0NsTeRRR M0NsTeRRR deleted the feat/support-dual-stack branch May 28, 2024 14:40
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.

3 participants