-
Notifications
You must be signed in to change notification settings - Fork 53
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
Allow specifying mtu for kubeovn daemonset #487
Conversation
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
WalkthroughThe pull request introduces changes to the KubeOVN project, specifically modifying the Makefile to include a new patch application step for Changes
Possibly related PRs
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 1
🧹 Outside diff range and nitpick comments (3)
packages/system/kubeovn/Makefile (1)
Line range hint
9-14
: Consider pinning the chart version for better stability.Currently, the charts are downloaded from the master branch, which could lead to inconsistency and reproducibility issues. Consider downloading a specific version that matches KUBEOVN_TAG (v1.13.0).
Example modification:
update: rm -rf charts && mkdir -p charts/kube-ovn - curl -sSL https://github.com/kubeovn/kube-ovn/archive/refs/heads/master.tar.gz | \ + curl -sSL https://github.com/kubeovn/kube-ovn/archive/refs/tags/$(KUBEOVN_TAG).tar.gz | \ tar xzvf - --strip 1 kube-ovn-master/chartspackages/system/kubeovn/charts/kube-ovn/templates/ovncni-ds.yaml (2)
79-81
: LGTM! Consider adding MTU validationThe implementation correctly adds MTU configuration support using Helm templating. The conditional inclusion is well-placed within the container args section.
Consider adding validation for the MTU value in values.yaml to ensure it falls within acceptable ranges (typically 1280-9000):
mtu: description: "MTU value for the CNI interface" type: integer minimum: 1280 maximum: 9000
79-81
: Document the new MTU configuration optionPlease update the relevant documentation to include:
- The new
mtu
configuration option- Valid MTU ranges
- Impact on network performance
- Default behavior when not specified
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (3)
packages/system/kubeovn/Makefile
(1 hunks)packages/system/kubeovn/charts/kube-ovn/templates/ovncni-ds.yaml
(1 hunks)packages/system/kubeovn/patches/mtu.diff
(1 hunks)
🔇 Additional comments (2)
packages/system/kubeovn/patches/mtu.diff (1)
9-11
: LGTM! Clean implementation of optional MTU configuration.
The conditional MTU configuration is well-implemented using Helm's templating features. The with
block ensures the argument is only included when MTU is explicitly configured.
packages/system/kubeovn/Makefile (1)
14-14
: LGTM! Verify patch file existence and conflicts.
The implementation follows the existing pattern and is correctly placed after the cozyconfig patch.
Let's verify the patch file and potential conflicts:
+ {{- with .Values.mtu }} | ||
+ - --mtu={{ . }} | ||
+ {{- end }} |
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.
💡 Codebase verification
MTU configuration needs validation and documentation
The verification reveals that while the chart has a values.yaml
, it currently:
- Lacks any MTU configuration validation
- Does not document the new MTU configuration option in either values.yaml or README.md
Please add:
- A documented MTU option in values.yaml with description and default value
- Schema validation for the MTU value (should be a number between typical MTU ranges)
- Documentation of the MTU configuration option in the README.md
🔗 Analysis chain
Verify MTU validation and documentation.
While the implementation is correct, please ensure:
- The MTU value is properly validated in the chart's values validation
- The new configuration option is documented in the chart's README or values.yaml
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Check if MTU validation exists in values.yaml or schema
fd -t f "values.yaml|values.schema.json" packages/system/kubeovn/charts/kube-ovn -x grep -l "mtu"
# Check if MTU is documented
fd -t f "README.md|CHANGELOG.md|values.yaml" packages/system/kubeovn/charts/kube-ovn -x grep -l "mtu"
Length of output: 199
Script:
#!/bin/bash
# Let's first check if the files exist
fd "values.yaml|values.schema.json|README.md|CHANGELOG.md" packages/system/kubeovn/charts/kube-ovn
# Then let's look at the content of values.yaml if it exists
fd "values.yaml" packages/system/kubeovn/charts/kube-ovn -x cat
# And check for any schema validation files in the chart directory
find packages/system/kubeovn/charts/kube-ovn -type f -name "*schema*" -o -name "*validation*"
Length of output: 4281
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.
Looks good
Signed-off-by: Andrei Kvapil kvapss@gmail.com
Summary by CodeRabbit
New Features
kube-ovn-cni
configuration by allowing users to specify the Maximum Transmission Unit (MTU) for improved network performance.Bug Fixes