-
Notifications
You must be signed in to change notification settings - Fork 223
USHIFT-536: add user-facing config for ovn-kubernetes CNI #956
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
USHIFT-536: add user-facing config for ovn-kubernetes CNI #956
Conversation
|
/test e2e-openshift-conformance-sig-api-machinery |
|
/approve |
|
Putting a hold for the API team to take some time to consider how to handle this new configuration parameter going forward. We are currently working on rewriting the existing configuration to be more in line with OCP so adding a dependency on the existing configuration of MicroShift will be problematic for us. /hold |
packaging/microshift/config.yaml
Outdated
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.
We found a way to have all of the configuration for ODF-LVM in a file outside of MicroShift's main config file. That will, eventually, allow us to provide a different CSI implementation that can also have its own separate file.
Some of the future use cases for MicroShift, especially upstream, make it desirable to be able to replace the CNI implementation as well, and following the same pattern with a similar clean separation for the configuration will make that more straightforward.
Let's talk about the approach we want to take this week.
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.
@dhellmann ack+, I updated the PR to follow the CSI approach and have a separate config file for ovn-kubernetes.
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.
That looks good.
I'm not entirely comfortable with parsing YAML from bash, but what you have looks like it will work and we can consider whether we need something more "robust" in the future if we run into problems.
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 thought about using yq in the bash to parse yaml file, but it's not available in the existing repos. Adding the installation dependency sounds a bit heavy for this change in configure-ovs.sh since it is currently the only one I'm aware of that requires parsing yaml in bash in microshift project.
Another idea might be to use json config file and jq to parse it, jq is installed by default. The downside is that it is inconsistent with csi and microshift config files. I could write a small golang program to parse the yaml if we will have similar needs in microshift scripts. Or any other ideas?
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.
Like I said, I think what you have is fine. We can consider other options as an improvement later if we have issues or establish a pattern based on other config.
6a7ed3f to
d5875a2
Compare
@dgrisonnet The PR is updated to use a separate config file for ovn-kubernetes. |
d5875a2 to
b148790
Compare
|
/retest |
|
/jira refresh |
|
Unholding since the initial concerns were cleared in this thread: #1030 (comment) /unhold |
dhellmann
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.
Let's work on this, but wait until we branch for 4.13 to merge it.
packaging/systemd/configure-ovs.sh
Outdated
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 we use yq to parse the YAML? How big is it and is it OK as a dependency?
If not, would it make sense to use a file format that is friendly for parsing with bash?
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 found it is not straight to install yq on rhel. It requires snapd pkg management.
yq on the fedora system is ~13M.
Would it be OK to use a config file in json format? jq is available in rhel.
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 believe @zshi-redhat solution is OK, we avoid installing yq which based on his comments doesn't seem to be available in RHEL, and we keep yaml which is a more familiar config format in the k8s world, also more human friendly than json.
packaging/systemd/configure-ovs.sh
Outdated
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.
Is it likely that a systemd unit would find something in ~/.microshift? Should we just look in /etc?
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.
Good catch!
agree, systemd may not find the config file in user root. I'll update to use /etc/ directly.
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.
pkg/components/networking.go
Outdated
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.
What do you think about passing ovnConfig here so the template can access any future settings without us having to extend this parameter list?
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.
Good idea, will update to pass ovnConfig.
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.
|
Waiting for last comments to be handled, looks good otherwise. |
b148790 to
e9f1144
Compare
|
/retest |
mangelajo
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
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mangelajo, zshi-redhat The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@zshi-redhat: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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. |
|
/retest |
Closes USHIFT-536