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

Bug 1789121: Configure router for IPv6 #342

Merged

Conversation

Miciah
Copy link
Contributor

@Miciah Miciah commented Dec 17, 2019

Configure the router deployment to enable IPv4, IPv6, or both in accordance with the cluster network config.

  • pkg/operator/controller/ingress/controller.go (Reconcile): Get the cluster network config and pass it to ensureIngressController.
    (ensureIngressController): Add parameter for network config. Pass the network config to ensureRouterDeployment.
  • pkg/operator/controller/ingress/deployment.go (ensureRouterDeployment): Add parameter for network config. Pass the network config to desiredRouterDeployment.
    (desiredRouterDeployment): Add parameter for network config. Use the network config to determine whether the cluster network uses IPv4, IPv6, or both, and set the ROUTER_IP_V4_V6_MODE environment variable accordingly.
  • pkg/operator/controller/ingress/deployment_test.go (TestDesiredRouterDeployment): Define a network config for the test input, and verify that desiredRouterDeployment sets ROUTER_IP_V4_V6_MODE as appropriate.

@openshift-ci-robot openshift-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Dec 17, 2019
@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 17, 2019
@openshift-ci-robot openshift-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Dec 17, 2019
if err != nil {
continue
}
if addr.To4() == nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's a bit easier to understand if the logic is reversed:

		if addr.To4() != nil {
			usingIPv4 = true
		} else {
			usingIPv6 = true
		}

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 have reversed it. Thanks!

Configure the router deployment to enable IPv4, IPv6, or both in accordance
with the cluster network config.

* manifests/00-cluster-role.yaml: Allow the operator to get the networks
config resource.
* pkg/manifests/bindata.go: Regenerate.
* pkg/operator/controller/ingress/controller.go (Reconcile): Get the
cluster network config and pass it to ensureIngressController.
(ensureIngressController): Add parameter for network config.  Pass the
network config to ensureRouterDeployment.
* pkg/operator/controller/ingress/deployment.go (ensureRouterDeployment):
Add parameter for network config.  Pass the network config to
desiredRouterDeployment.
(desiredRouterDeployment): Add parameter for network config.  Use the
network config to determine whether the cluster network uses IPv4, IPv6, or
both, and set the ROUTER_IP_V4_V6_MODE environment variable accordingly.
* pkg/operator/controller/ingress/deployment_test.go
(TestDesiredRouterDeployment): Define a network config for the test input,
and verify that desiredRouterDeployment sets ROUTER_IP_V4_V6_MODE as
appropriate.
@ironcladlou
Copy link
Contributor

/lgtm

Thanks!

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Dec 17, 2019
@ironcladlou
Copy link
Contributor

/lgtm cancel

@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Dec 17, 2019
@ironcladlou
Copy link
Contributor

/lgtm

Let's keep iterating on master.

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Dec 19, 2019
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ironcladlou, 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

@openshift-merge-robot openshift-merge-robot merged commit 68829b9 into openshift:master Dec 19, 2019
@ironcladlou
Copy link
Contributor

/cherry-pick release-4.3

@openshift-cherrypick-robot

@ironcladlou: new pull request created: #346

In response to this:

/cherry-pick release-4.3

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.

@ironcladlou ironcladlou changed the title Configure router for IPv6 Bug 1789121: Configure router for IPv6 Jan 8, 2020
@openshift-ci-robot
Copy link
Contributor

@Miciah: All pull requests linked via external trackers have merged. Bugzilla bug 1789121 has been moved to the MODIFIED state.

In response to this:

Bug 1789121: Configure router for IPv6

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.

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. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants