Skip to content

Conversation

@arjunrn
Copy link
Contributor

@arjunrn arjunrn commented Jan 14, 2022

This changes adds fields to the HostNetworkStrategy to specify the ports on the host which should be bound to ports in the router pods.

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 14, 2022
@openshift-ci openshift-ci bot requested review from knobunc and sttts January 14, 2022 13:11
@arjunrn arjunrn changed the title [WIP] Allow ports on host to be specified for HostNetwork Ingresses Allow ports on host to be specified for HostNetwork Ingresses Jan 27, 2022
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 27, 2022
@arjunrn arjunrn force-pushed the ingress-host-bind-ports branch from 09a8743 to cd04d6a Compare January 27, 2022 12:39
@arjunrn arjunrn force-pushed the ingress-host-bind-ports branch from cd04d6a to a9c2727 Compare March 25, 2022 09:22
Copy link
Contributor

@alebedev87 alebedev87 left a 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.

@arjunrn arjunrn force-pushed the ingress-host-bind-ports branch from a9c2727 to 9773c8b Compare March 28, 2022 11:47
// +kubebuilder:validation:Maximum=65535
// +kubebuilder:validation:Minimum=1
// +kubebuilder:default=80
HTTPPort int32 `json:"HTTPPort"`
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@arjunrn arjunrn force-pushed the ingress-host-bind-ports branch from 9773c8b to 6a80c26 Compare March 28, 2022 13:32
@alebedev87
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Mar 28, 2022
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.
Copy link
Contributor

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.
@arjunrn arjunrn force-pushed the ingress-host-bind-ports branch from 6a80c26 to 19dea10 Compare March 29, 2022 07:42
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Mar 29, 2022
@alebedev87
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Mar 29, 2022
// unhealthy respectively, are well-tested values. When not specified the
// value defaults to 1936.
// +kubebuilder:validation:Optional
// +kubebuilder:validation:Maximum=65535
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

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"`
Copy link
Contributor

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.

Copy link
Contributor Author

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

@deads2k
Copy link
Contributor

deads2k commented Mar 30, 2022

/approve
/hold

holding for @Miciah .
/assign @Miciah

@Miciah feel free to remove the hold when you're happy with it.

@openshift-ci openshift-ci bot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Mar 30, 2022
@Miciah
Copy link
Contributor

Miciah commented Mar 31, 2022

Thanks!
/lgtm
/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 31, 2022
@arjunrn
Copy link
Contributor Author

arjunrn commented Mar 31, 2022

/label px-approved
/label qe-approved
/label docs-approved

@openshift-ci openshift-ci bot added the px-approved Signifies that Product Support has signed off on this PR label Mar 31, 2022
@openshift-ci openshift-ci bot added qe-approved Signifies that QE has signed off on this PR docs-approved Signifies that Docs has signed off on this PR labels Mar 31, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 31, 2022

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@arjunrn
Copy link
Contributor Author

arjunrn commented Mar 31, 2022

/retest-required

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 31, 2022

@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.

@openshift-merge-robot openshift-merge-robot merged commit 6ff3e35 into openshift:master Mar 31, 2022
@arjunrn arjunrn deleted the ingress-host-bind-ports branch March 31, 2022 17:43
frobware added a commit to frobware/cluster-ingress-operator that referenced this pull request Apr 12, 2022
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
frobware added a commit to frobware/cluster-ingress-operator that referenced this pull request Apr 12, 2022
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.
frobware added a commit to frobware/cluster-ingress-operator that referenced this pull request Apr 12, 2022
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.
frobware added a commit to frobware/cluster-ingress-operator that referenced this pull request Apr 14, 2022
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.
frobware added a commit to frobware/cluster-ingress-operator that referenced this pull request Apr 14, 2022
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. docs-approved Signifies that Docs has signed off on this PR lgtm Indicates that a PR is ready to be merged. px-approved Signifies that Product Support has signed off on this PR qe-approved Signifies that QE has signed off on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants