-
Notifications
You must be signed in to change notification settings - Fork 220
OCPBUGS-14995: desiredRouterDeployment: Set HostPort if needed #947
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
OCPBUGS-14995: desiredRouterDeployment: Set HostPort if needed #947
Conversation
Set spec.template.spec.containers[*].ports[*].hostPort on a router deployment if the deployment sets spec.template.spec.hostNetwork to true. Before this commit, the operator left the hostPort field unspecified. As a result, the API set a default value for hostPort. The operator detected this as an external update and attempted to revert it. This commit prevents the operator from making these spurious updates in response to API defaulting. This commit fixes OCPBUGS-14995. https://issues.redhat.com/browse/OCPBUGS-14995 * pkg/operator/controller/ingress/deployment.go (desiredRouterDeployment): Set each container port's HostPort to the port's ContainerPort value when HostNetwork is enabled for the deployment. * pkg/operator/controller/ingress/deployment_test.go (checkContainerPort): Verify that HostPort is set to ContainerPort if HostNetwork is enabled.
|
@Miciah: This pull request references Jira Issue OCPBUGS-14995, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
Requesting review from QA contact: The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn 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/test-infra repository. |
|
/assign |
|
/assign @alebedev87 |
|
e2e-aws-operator failed because must-gather failed. |
|
/lgtm |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alebedev87 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/hold Revision 58f2a10 was retested 3 times: holding |
|
e2e-azure-ovn failed because and and /test e2e-azure-ovn e2e-aws-ovn-serial failed because This is a known issue: OCPBUGS-10841. /hold cancel |
|
/test all |
|
e2e-hypershift failed because and because Cc: @enxebre. |
|
/test e2e-hypershift |
|
@Miciah: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions 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. |
|
@Miciah: Jira Issue OCPBUGS-14995: All pull requests linked via external trackers have merged: Jira Issue OCPBUGS-14995 has been moved to the MODIFIED state. DetailsIn 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/test-infra repository. |
|
/cherry-pick release-4.13 release-4.12 |
|
@candita: new pull request created: #1062 DetailsIn 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. |
Set
spec.template.spec.containers[*].ports[*].hostPorton a router deployment if the deployment setsspec.template.spec.hostNetworkto true.Before this change, the operator left the
hostPortfield unspecified. As a result, the API set a default value forhostPort. The operator detected this as an external update and attempted to revert it. The change in this PR prevents the operator from making these spurious updates in response to API defaulting.pkg/operator/controller/ingress/deployment.go(desiredRouterDeployment): Set each container port'sHostPortto the port'sContainerPortvalue whenHostNetworkis enabled for the deployment.pkg/operator/controller/ingress/deployment_test.go(checkContainerPort): Verify thatHostPortis set toContainerPortifHostNetworkis enabled.