-
Notifications
You must be signed in to change notification settings - Fork 582
Allow ports on host to be specified for HostNetwork Ingresses #1097
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
Allow ports on host to be specified for HostNetwork Ingresses #1097
Conversation
09a8743 to
cd04d6a
Compare
cd04d6a to
a9c2727
Compare
alebedev87
left a comment
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.
Remarks to align with the proposal which used the api conventions.
a9c2727 to
9773c8b
Compare
operator/v1/types_ingress.go
Outdated
| // +kubebuilder:validation:Maximum=65535 | ||
| // +kubebuilder:validation:Minimum=1 | ||
| // +kubebuilder:default=80 | ||
| HTTPPort int32 `json:"HTTPPort"` |
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.
Shouldn't we stick with the lower camel case convention for the JSON tags?
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.
You're right. It looks like all the fields are in lower case even for words like HTTP.
9773c8b to
6a80c26
Compare
|
/lgtm |
| Protocol IngressControllerProtocol `json:"protocol,omitempty"` | ||
|
|
||
| // HTTPPort is the port on the host which should be used to listen for | ||
| // HTTP requests. This field should be set when port 80 is already in use. |
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.
For each new field, please add a sentence describing the default value. The default value that is specified by the kubebuilder tag doesn't show in generated Swagger or the OpenAPI schema.
This changes adds fields to the `HostNetworkStrategy` to specify the ports on the host which should be bound to ports in the router pods.
6a80c26 to
19dea10
Compare
|
/lgtm |
| // unhealthy respectively, are well-tested values. When not specified the | ||
| // value defaults to 1936. | ||
| // +kubebuilder:validation:Optional | ||
| // +kubebuilder:validation:Maximum=65535 |
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.
do we know where the nodeport range starts in openshift clusters?
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.
It appears to be configurable. The default is 30000-32767 but a user could configure it to start at a lower port number than 30000. Also the user might want to use a port outside the nodeport range, both higher or lower.
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.
ok
| // +kubebuilder:validation:Maximum=65535 | ||
| // +kubebuilder:validation:Minimum=1 | ||
| // +kubebuilder:default=80 | ||
| HTTPPort int32 `json:"httpPort"` |
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.
CRD changes can be observed on a delay. What does the operator do when this field is zero-value, not 80, because the kube-apiserver has not observed the default.
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.
We will have the same defaults also in the operator so if a 0 is observed it is defaulted there as well.
https://github.com/openshift/cluster-ingress-operator/pull/694/files#L392-L404
|
Thanks! |
|
/label px-approved |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alebedev87, arjunrn, deads2k, Miciah 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 |
|
/retest-required |
|
@arjunrn: all tests passed! Full PR test history. Your PR dashboard. 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/test-infra repository. I understand the commands that are listed here. |
The e2e test `TestHostNetworkEndpointPublishingStrategy` is always failing. We directly need openshift/api#1097 but I bumped openshift/api to current latest. go get -u github.com/openshift/api@c3bb724c282a1ac34d7c769da99543a453ae90b9 go mod vendor go mod tidy
The API change in openshift/api#1097 means that the set of configurable ports on type HostNetworkStrategy are not marked as optional. It's not clear whether that was deliberate but without specifying these the e2e tests will always fail.
The API change in openshift/api#1097 means that the set of configurable ports on type HostNetworkStrategy are not marked as optional. It's not clear whether that was deliberate but without specifying these the e2e tests will always fail.
The API change in openshift/api#1097 means that the set of configurable ports on type HostNetworkStrategy are not marked as optional. It's not clear whether that was deliberate but without specifying these the e2e tests will always fail.
The API change in openshift/api#1097 means that the set of configurable ports on type HostNetworkStrategy are not marked as optional. It's not clear whether that was deliberate but without specifying these the e2e tests will always fail.
This changes adds fields to the
HostNetworkStrategyto specify the ports on the host which should be bound to ports in the router pods.