-
Notifications
You must be signed in to change notification settings - Fork 42
NETOBSERV-2484: improve ovn subnets detection #2169
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
Conversation
|
Skipping CI for Draft Pull Request. |
|
@jotak: This pull request references NETOBSERV-2484 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.21.0" version, but no target version was set. 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 openshift-eng/jira-lifecycle-plugin repository. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2169 +/- ##
==========================================
+ Coverage 73.24% 73.29% +0.05%
==========================================
Files 82 84 +2
Lines 9339 9391 +52
==========================================
+ Hits 6840 6883 +43
- Misses 2075 2085 +10
+ Partials 424 423 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
OlivierCazade
left a comment
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
- Check for internal/masquerade/transitswitch subnets - Add API server
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
- move to different file - split into smaller functions
OlivierCazade
left a comment
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!
| internalSubnet := "100.64.0.0/16" | ||
| transitSwitchSubnet := "100.88.0.0/16" | ||
| masqueradeSubnet := "169.254.0.0/17" | ||
| ovnk := networkOp.Spec.DefaultNetwork.OVNKubernetesConfig | ||
| if ovnk != nil { | ||
| if ovnk.V4InternalSubnet != "" { | ||
| internalSubnet = ovnk.V4InternalSubnet | ||
| } | ||
| if ovnk.IPv4 != nil && ovnk.IPv4.InternalTransitSwitchSubnet != "" { | ||
| transitSwitchSubnet = ovnk.IPv4.InternalTransitSwitchSubnet | ||
| } | ||
| if ovnk.GatewayConfig != nil && ovnk.GatewayConfig.IPv4.InternalMasqueradeSubnet != "" { | ||
| masqueradeSubnet = ovnk.GatewayConfig.IPv4.InternalMasqueradeSubnet | ||
| } |
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.
Can't we import https://raw.githubusercontent.com/openshift/cluster-network-operator/refs/heads/master/pkg/network/ovn_kubernetes.go here ?
So at some point if their defaults or CR changes, we'll be updated automatically.
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.
Those constants aren't exported.
Also, if they change, we will have a bigger problem anyway, because that would be tied to the openshift version, so we would have to write specific code anyway. I just hope it won't change :-)
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'm merging it, as this is approved - let me know if it's not satisfying, we can still have follow-ups
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.
The GetInternalSubnets function is public if you want to import that in the future 😉
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.
Yes but like I said it doesn't really help, as we need to support past ovn versions, we will always need some hardcoding if the IPs change
|
/ok-to-test |
|
New images:
They will expire after two weeks. To deploy this build: # Direct deployment, from operator repo
IMAGE=quay.io/netobserv/network-observability-operator:b17bfde make deploy
# Or using operator-sdk
operator-sdk run bundle quay.io/netobserv/network-observability-operator-bundle:v0.0.0-sha-b17bfdeOr as a Catalog Source: apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
name: netobserv-dev
namespace: openshift-marketplace
spec:
sourceType: grpc
image: quay.io/netobserv/network-observability-operator-catalog:v0.0.0-sha-b17bfde
displayName: NetObserv development catalog
publisher: Me
updateStrategy:
registryPoll:
interval: 1m |
|
/label qe-approved |
|
@jotak: This pull request references NETOBSERV-2484 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.21.0" version, but no target version was set. 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 openshift-eng/jira-lifecycle-plugin repository. |
Description
Dependencies
n/a
Checklist
If you are not familiar with our processes or don't know what to answer in the list below, let us know in a comment: the maintainers will take care of that.