feat: Enable single stack deployments in Helm chart#828
Conversation
58f43c6 to
c91ec10
Compare
f9e187d to
ac13637
Compare
|
@mergify rebase |
❌ Pull request can't be updated with latest base branch changesDetailsMergify needs the author permission to update the base branch of the pull request. |
|
@jochenseeber sorry about the delay, could you please rebase? |
Signed-off-by: Jochen Seeber <jochen@seeber.me>
|
@jochenseeber , could you please take a look at the failure: |
niladrih
left a comment
There was a problem hiding this comment.
Few minor comments. Looks good overall.
| Valid values: "ipv4", "ipv6", "both" | ||
| */}} | ||
| {{- define "service_ip_family" -}} | ||
| {{- if eq .Values.ipFamily "ipv4" }} |
There was a problem hiding this comment.
Should we do the comparison after a run through tostring, lower and trim?
| ipFamilyPolicy: SingleStack | ||
| ipFamilies: | ||
| - IPv4 | ||
| {{- else if eq .Values.ipFamily "ipv6" }} |
There was a problem hiding this comment.
Same. Maybe use tostring, lower and trim?
| ipFamilyPolicy: SingleStack | ||
| ipFamilies: | ||
| - IPv6 | ||
| {{- else if eq .Values.ipFamily "both" }} |
There was a problem hiding this comment.
Maybe tostring, lower and trim here as well.
| | io_engine.​target.​nvmf.​ptpl | Reservations Persist Through Power Loss State | `true` | | ||
| | io_engine.​target.​nvmf.​rdma | Enable RDMA Capability of Mayastor nvmf target to take RDMA connections if the cluster nodes have RDMA device(s) configured from RNIC. | <pre>{<br>"enabled":false<br>}</pre> | | ||
| | io_engine.​tolerations | Set tolerations, overrides global | `[]` | | ||
| | ipFamily | IP family for services and bind addresses. Valid values: "ipv4", "ipv6", "both" (default). | `"both"` | |
There was a problem hiding this comment.
nit: the (default) is redundant as the default value is mentioned in the very next column.
| | ipFamily | IP family for services and bind addresses. Valid values: "ipv4", "ipv6", "both" (default). | `"both"` | | |
| | ipFamily | IP family for services and bind addresses. Valid values: "ipv4", "ipv6", "both". | `"both"` | |
a gentle ping @jochenseeber |
Description
Add a global
ipFamilysetting to the Helm chart that controls IP familyconfiguration for all chart-managed Kubernetes Services and adjusts container
bind addresses accordingly.
The setting accepts three values:
ipv4-- IPv4 SingleStack, services bind to0.0.0.0ipv6-- IPv6 SingleStack, services bind to::both(default) -- PreferDualStack with IPv4 and IPv6, services bind to::Two new helper templates are added to
_helpers.tpl:service_ip_family-- generatesipFamilyPolicyandipFamiliesfieldsfor Service specs
bind_address-- returns the appropriate bind address (0.0.0.0or::)All four chart-managed Services now include the
service_ip_familyhelper,and four hardcoded
[::]bind addresses in container args are replaced withthe
bind_addresshelper.Invalid values (including empty string) are rejected at template time with an error message.
Motivation and Context
The chart previously hardcoded
[::]as the bind address and did not setipFamilyPolicyoripFamilieson any Service. This made deployments onIPv4-only fail, with no way to correctly configure the components.
Regression
No
How Has This Been Tested?
Verified with
helm templatefor all supported values:both): All 4 Services render withipFamilyPolicy: PreferDualStackandipFamilies: [IPv4, IPv6]. Bind addresses render as[::].ipv4: All 4 Services render withipFamilyPolicy: SingleStackandipFamilies: [IPv4]. Bind addresses render as[0.0.0.0].ipv6: All 4 Services render withipFamilyPolicy: SingleStackandipFamilies: [IPv6]. Bind addresses render as[::].helm template --set ipFamily=invalidfails with errorinvalid ipFamily value "invalid" -- valid values: ipv4, ipv6, both.helm template --set ipFamily=""fails with the samevalidation error.
Types of changes
Checklist: