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
RFE-2962: Set interface name from node-ip-configuration to configure-ovs #186
RFE-2962: Set interface name from node-ip-configuration to configure-ovs #186
Conversation
node-ip-configuration will set env file for configure-ovs when it will set kubelet ip, this will allow to configure ovs with the bridge on the same interface that kubelet will use
Skipping CI for Draft Pull Request. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: tsorya 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 |
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 patch is draft but it's in my queue for review, looks good but I have few comments.
// in that case don't change the previous written interface | ||
if chosenAddresses[0].LinkName != "br-ex" { | ||
interfaceDir := filepath.Dir(interfaceFile) | ||
err = os.MkdirAll(interfaceDir, 0755) |
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.
should we check if the interfaceDir exists before trying to create?
|
||
// Set interface in case it is not br-ex that means that it was already configured and node is rebooting | ||
// in that case don't change the previous written interface | ||
if chosenAddresses[0].LinkName != "br-ex" { |
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.
br-ex seems a good candidate for const ?
err = os.MkdirAll(interfaceDir, 0755) | ||
if err != nil { | ||
return err | ||
} |
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.
From line 144 to 160 can be a helper function IMHO
Similar to #183 ? |
it was decided to go with ip address and not setting interface |
node-ip-configuration will set env file for configure-ovs when it will
set kubelet ip, this will allow to configure ovs with the bridge on the
same interface that kubelet will use