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

Add PowerVS OVN Kube routing config #1718

Merged

Conversation

dharaneeshvrd
Copy link
Member

@dharaneeshvrd dharaneeshvrd commented Sep 1, 2022

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

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.
  • This change includes unit tests.

@dharaneeshvrd
Copy link
Member Author

/cc @mkumatag

@openshift-ci openshift-ci bot requested a review from mkumatag September 1, 2022 09:37
Copy link
Member

@mkumatag mkumatag left a 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{}
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
network.Spec.DefaultNetwork.OVNKubernetesConfig.GatewayConfig = &operatorv1.GatewayConfig{}
network.Spec.DefaultNetwork.OVNKubernetesConfig.GatewayConfig = &operatorv1.GatewayConfig{
RoutingViaHost = true
}

Copy link
Member Author

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{}
Copy link
Member

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

@dharaneeshvrd dharaneeshvrd force-pushed the powervs-ovnkube-config branch 2 times, most recently from 810ffbb to 8263785 Compare September 1, 2022 09:52
@dharaneeshvrd
Copy link
Member Author

ptal @mkumatag

Copy link
Member

@mkumatag mkumatag left a comment

Choose a reason for hiding this comment

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

/lgtm

@mkumatag
Copy link
Member

mkumatag commented Sep 1, 2022

/assign @alvaroaleman @csrwng

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Sep 1, 2022
case hyperv1.PowerVSPlatform:
if networkType == hyperv1.OVNKubernetes {
if network.Spec.DefaultNetwork.OVNKubernetesConfig == nil {
network.Spec.DefaultNetwork.OVNKubernetesConfig = &operatorv1.OVNKubernetesConfig{}
Copy link
Member

@enxebre enxebre Sep 1, 2022

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?

Copy link
Member

@enxebre enxebre Sep 1, 2022

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?

Copy link
Member Author

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

Copy link
Member Author

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?

@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Sep 1, 2022
@dharaneeshvrd
Copy link
Member Author

@enxebre I think I got your point on reconciling GatewayConfig with out the nil check. Moved the reconcilation outside the if. Ptal.

@enxebre
Copy link
Member

enxebre commented Sep 2, 2022

/approve

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 2, 2022
Copy link
Member

@mkumatag mkumatag left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Sep 2, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 2, 2022

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

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 2, 2022

@dharaneeshvrd: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-kubevirt-gcp-ovn 1a6ca6b link false /test e2e-kubevirt-gcp-ovn
ci/prow/capi-provider-agent-sanity 1a6ca6b link false /test capi-provider-agent-sanity

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 ee373af into openshift:main Sep 2, 2022
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants