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
Add PowerVS OVN Kube routing config #1718
Add PowerVS OVN Kube routing config #1718
Conversation
/cc @mkumatag |
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.
one minor comment, otherwise lgtm
if networkType == hyperv1.OVNKubernetes { | ||
if network.Spec.DefaultNetwork.OVNKubernetesConfig == nil { | ||
network.Spec.DefaultNetwork.OVNKubernetesConfig = &operatorv1.OVNKubernetesConfig{} | ||
network.Spec.DefaultNetwork.OVNKubernetesConfig.GatewayConfig = &operatorv1.GatewayConfig{} |
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.
network.Spec.DefaultNetwork.OVNKubernetesConfig.GatewayConfig = &operatorv1.GatewayConfig{} | |
network.Spec.DefaultNetwork.OVNKubernetesConfig.GatewayConfig = &operatorv1.GatewayConfig{ | |
RoutingViaHost = 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.
Done
if networkType == hyperv1.OVNKubernetes { | ||
if network.Spec.DefaultNetwork.OVNKubernetesConfig == nil { | ||
network.Spec.DefaultNetwork.OVNKubernetesConfig = &operatorv1.OVNKubernetesConfig{} | ||
network.Spec.DefaultNetwork.OVNKubernetesConfig.GatewayConfig = &operatorv1.GatewayConfig{} |
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.
Add some information why we are adding this block, information from this BZ https://bugzilla.redhat.com/show_bug.cgi?id=1996108 can be used here
810ffbb
to
8263785
Compare
ptal @mkumatag |
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.
/lgtm
/assign @alvaroaleman @csrwng |
case hyperv1.PowerVSPlatform: | ||
if networkType == hyperv1.OVNKubernetes { | ||
if network.Spec.DefaultNetwork.OVNKubernetesConfig == nil { | ||
network.Spec.DefaultNetwork.OVNKubernetesConfig = &operatorv1.OVNKubernetesConfig{} |
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.
why is this needed initialisation to empty struct needed?
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 GatewayConfig reconciliation without the if nil check?
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.
Followed the same pattern from KubeVirt platform https://github.com/openshift/hypershift/blob/main/control-plane-operator/hostedclusterconfigoperator/controllers/resources/network/reconcile.go#L41
Initially network.Spec.DefaultNetwork.OVNKubernetesConfig
is nil and tried to initialise with empty struct and again initialled GatewayConfig
to set RoutingViaHost
to 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.
To align with the other part of the block of code refactored slightly.
@enxebre Kept GatewayConfig
reconciliation inside nil check or else it would try to reassign the same obj on every reconcilation. Please let me know whether that answers your question?
8263785
to
37ecc5d
Compare
37ecc5d
to
5a9ec05
Compare
5a9ec05
to
1a6ca6b
Compare
@enxebre I think I got your point on reconciling |
/approve |
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.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dharaneeshvrd, enxebre, mkumatag 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 |
@dharaneeshvrd: The following tests failed, say
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. |
What this PR does / why we need it:
Fixes https://issues.redhat.com/browse/MULTIARCH-2631
Trying to add routing config for OVN Kube CNI for PowerVS platform
Which issue(s) this PR fixes (optional, use
fixes #<issue_number>(, fixes #<issue_number>, ...)
format, where issue_number might be a GitHub issue, or a Jira story:Fixes #
Checklist