Skip to content

Commit

Permalink
Allow specifying mtu for kubeovn daemonset (#487)
Browse files Browse the repository at this point in the history
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Introduced a new patch application step in the update process for
KubeOVN.
- Enhanced flexibility in the `kube-ovn-cni` configuration by allowing
users to specify the Maximum Transmission Unit (MTU) for improved
network performance.
  
- **Bug Fixes**
- Applied a patch to ensure the new MTU configuration is properly
integrated into the deployment process.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
  • Loading branch information
kvaps authored Dec 2, 2024
1 parent df448b9 commit 9a699d7
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/system/kubeovn/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ update:
curl -sSL https://github.com/kubeovn/kube-ovn/archive/refs/heads/master.tar.gz | \
tar xzvf - --strip 1 kube-ovn-master/charts
patch --no-backup-if-mismatch -p4 < patches/cozyconfig.diff
patch --no-backup-if-mismatch -p4 < patches/mtu.diff

image:
docker buildx build images/kubeovn \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ spec:
- --kubelet-dir={{ .Values.kubelet_conf.KUBELET_DIR }}
- --enable-tproxy={{ .Values.func.ENABLE_TPROXY }}
- --ovs-vsctl-concurrency={{ .Values.performance.OVS_VSCTL_CONCURRENCY }}
{{- with .Values.mtu }}
- --mtu={{ . }}
{{- end }}
securityContext:
runAsUser: 0
privileged: true
Expand Down
14 changes: 14 additions & 0 deletions packages/system/kubeovn/patches/mtu.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/packages/system/kubeovn/charts/kube-ovn/templates/ovncni-ds.yaml b/packages/system/kubeovn/charts/kube-ovn/templates/ovncni-ds.yaml
index c6834ef..423f66b 100644
--- a/packages/system/kubeovn/charts/kube-ovn/templates/ovncni-ds.yaml
+++ b/packages/system/kubeovn/charts/kube-ovn/templates/ovncni-ds.yaml
@@ -76,6 +76,9 @@ spec:
- --kubelet-dir={{ .Values.kubelet_conf.KUBELET_DIR }}
- --enable-tproxy={{ .Values.func.ENABLE_TPROXY }}
- --ovs-vsctl-concurrency={{ .Values.performance.OVS_VSCTL_CONCURRENCY }}
+ {{- with .Values.mtu }}
+ - --mtu={{ . }}
+ {{- end }}
securityContext:
runAsUser: 0
privileged: true

0 comments on commit 9a699d7

Please sign in to comment.