-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
[ingress-nginx] Enable to fix the nodePort of ingress-nginx service #11310
[ingress-nginx] Enable to fix the nodePort of ingress-nginx service #11310
Conversation
/retest |
1 similar comment
/retest |
/ok-to-test |
@@ -2,6 +2,8 @@ | |||
ingress_nginx_namespace: "ingress-nginx" | |||
ingress_nginx_host_network: false | |||
ingress_nginx_service_type: LoadBalancer | |||
ingress_nginx_service_nodeport_http: {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is it an empty dict? what the value expected if filled ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ant31
Thank you for your feedback.
The intention is to leave the .spec.ports[].nodePort
of the Service unspecified by default as it currently is(Dynamic port will be assigned).
If user specified ingress_nginx_service_nodeport_http
or ingress_nginx_service_nodeport_https
field in addons.yml
, these values will be used as .spec.ports[].nodePort
.
As a result of my reconsideration, I think ""
is appropriate instead of {}
and fixed.
In addition, user may be confused how to use these param, so I've added commented out example to addons.yml
like that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you !
cc5d3f0
to
2b24f3f
Compare
- name: https | ||
port: 443 | ||
targetPort: 443 | ||
protocol: TCP | ||
{% if (ingress_nginx_service_type == 'NodePort' or ingress_nginx_service_type == 'LoadBalancer') and ingress_nginx_service_nodeport_https %} | ||
nodePort: {{ingress_nginx_service_nodeport_https}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{{ingress_nginx_service_nodeport_https|int}}
That checking it's valid int and it easier to pass arguments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ant31
I've fixed.
How about that?
2b24f3f
to
61c9a46
Compare
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mochizuki875, yankay The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/cherrypick release-2.25 |
@mochizuki875: new pull request created: #11339 In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
/cherrypick release-2.24 related #11330 has been merged |
@mochizuki875: new pull request created: #11361 In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
What type of PR is this?
/kind feature
What this PR does / why we need it:
Auto creation of Service/ingress-nginx was added by #10925.
In this change, we can choose serviceType.
However, we can’t fix nodePort when choose NodePort or LoadBalancer as serviceType.
In this PR, I’ve added
ingress_nginx_service_nodeport_http
andingress_nginx_service_nodeport_https
properties inaddons.yml
to fix nodePort.Which issue(s) this PR fixes:
Fixes
Does this PR introduce a user-facing change?: