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

Add support for allocateLoadBalancerNodePorts, ipFamilyPolicy and ipFamilies #2418

Merged
merged 4 commits into from
May 9, 2022

Conversation

centromere
Copy link
Contributor

Proposed changes

This PR adds support for the allocateLoadBalancerNodePorts and ipFamilyPolicy fields of the Service resource. allocateLoadBalancerNodePorts is only allowed when the Service is of type LoadBalancer.

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that all unit tests pass after adding my changes
  • I have updated necessary documentation
  • I have rebased my branch onto master
  • I will ensure my PR is targeting the master branch and pulling from my branch from my own fork

@centromere
Copy link
Contributor Author

Hi all. Is there any more development required for this to be accepted/merged?

@codecov-commenter
Copy link

codecov-commenter commented Apr 6, 2022

Codecov Report

Merging #2418 (cb178be) into main (22d3d7f) will increase coverage by 0.02%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #2418      +/-   ##
==========================================
+ Coverage   53.39%   53.42%   +0.02%     
==========================================
  Files          52       52              
  Lines       14706    14706              
==========================================
+ Hits         7853     7857       +4     
+ Misses       6591     6589       -2     
+ Partials      262      260       -2     
Impacted Files Coverage Δ
internal/k8s/configuration.go 95.86% <0.00%> (+0.38%) ⬆️

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@lucacome lucacome requested review from a team, lucacome, ciarams87 and shaun-nx April 6, 2022 22:49
@lucacome lucacome self-assigned this Apr 6, 2022
@lucacome lucacome added the enhancement Pull requests for new features/feature enhancements label Apr 6, 2022
@lucacome
Copy link
Member

lucacome commented Apr 6, 2022

Hi @centromere

Sorry for the long wait! I'll take a look at this shortly.

Copy link
Member

@lucacome lucacome left a comment

Choose a reason for hiding this comment

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

@centromere thanks again for the PR, I left some comments.

Comment on lines 23 to 25
{{- if hasKey .Values.controller.service "allocateLoadBalancerNodePorts" }}
allocateLoadBalancerNodePorts: {{ .Values.controller.service.allocateLoadBalancerNodePorts }}
{{- end }}
Copy link
Member

Choose a reason for hiding this comment

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

I think allocateLoadBalancerNodePorts is still in beta, I would wait until it reaches GA before adding it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am using 1.22 and would like to use this feature. With the chart as-is, there is no way for me to achieve this.

Copy link
Member

Choose a reason for hiding this comment

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

@centromere the good news is that it's now stable in 1.24 🎉 the not so good news is that I think we need another version check for the feature. I think since beta in 1.22 should be fine.

something like

{{- if and (semverCompare ">=1.22.0-0" .Capabilities.KubeVersion.Version) (.Values.controller.service.allocateLoadBalancerNodePorts) }}

@centromere centromere force-pushed the additional-service-fields branch 2 times, most recently from 7be97c0 to 51f7172 Compare May 3, 2022 15:57
Comment on lines 23 to 25
{{- if hasKey .Values.controller.service "allocateLoadBalancerNodePorts" }}
allocateLoadBalancerNodePorts: {{ .Values.controller.service.allocateLoadBalancerNodePorts }}
{{- end }}
Copy link
Member

Choose a reason for hiding this comment

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

@centromere the good news is that it's now stable in 1.24 🎉 the not so good news is that I think we need another version check for the feature. I think since beta in 1.22 should be fine.

something like

{{- if and (semverCompare ">=1.22.0-0" .Capabilities.KubeVersion.Version) (.Values.controller.service.allocateLoadBalancerNodePorts) }}

deployments/helm-chart/templates/controller-service.yaml Outdated Show resolved Hide resolved
deployments/helm-chart/templates/controller-service.yaml Outdated Show resolved Hide resolved
deployments/helm-chart/values.yaml Outdated Show resolved Hide resolved
@lucacome lucacome merged commit 6de087c into nginxinc:main May 9, 2022
@lucacome lucacome changed the title [helm-chart] Add support for allocateLoadBalancerNodePorts, ipFamilyPolicy Add support for allocateLoadBalancerNodePorts, ipFamilyPolicy and ipFamilies May 12, 2022
@centromere centromere deleted the additional-service-fields branch May 27, 2022 21:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Pull requests for new features/feature enhancements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants