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
Bug 1789121: Configure router for IPv6 #342
Conversation
ba62340
to
4770649
Compare
if err != nil { | ||
continue | ||
} | ||
if addr.To4() == nil { |
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.
I think it's a bit easier to understand if the logic is reversed:
if addr.To4() != nil {
usingIPv4 = true
} else {
usingIPv6 = true
}
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.
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.
4770649
to
9cfd4c2
Compare
/lgtm Thanks! |
/lgtm cancel |
/lgtm Let's keep iterating on master. |
[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 |
/cherry-pick release-4.3 |
@ironcladlou: new pull request created: #346 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/test-infra repository. |
@Miciah: All pull requests linked via external trackers have merged. Bugzilla bug 1789121 has been moved to the MODIFIED state. 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/test-infra repository. |
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 toensureIngressController
.(
ensureIngressController
): Add parameter for network config. Pass the network config toensureRouterDeployment
.pkg/operator/controller/ingress/deployment.go
(ensureRouterDeployment
): Add parameter for network config. Pass the network config todesiredRouterDeployment
.(
desiredRouterDeployment
): Add parameter for network config. Use the network config to determine whether the cluster network uses IPv4, IPv6, or both, and set theROUTER_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 thatdesiredRouterDeployment
setsROUTER_IP_V4_V6_MODE
as appropriate.