Skip to content

Commit 6684117

Browse files
authored
[kube-ovn] Update and patch Kube-OVN (#1363)
## What this PR does This patch updates Kube-OVN to 1.14.5 and patches the northd leader check to test against all northd endpoints instead of just the first one marked as ready. ### Release note ```release-note [kube-ovn, fix] Update Kube-OVN and improve northd leader detection. ``` Signed-off-by: Timofei Larkin <[email protected]>
2 parents 89c80a8 + 6b9b700 commit 6684117

16 files changed

Lines changed: 635 additions & 276 deletions

‎packages/system/kubeovn/Makefile‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ include ../../../scripts/package.mk
88

99
update:
1010
rm -rf charts && mkdir -p charts/kube-ovn
11-
tag=$$(git ls-remote --tags --sort="v:refname" https://github.com/kubeovn/kube-ovn | awk -F'[/^]' '{print $$3}' | grep '^v1\.13\.' | tail -n1 ) && \
11+
tag=$$(git ls-remote --tags --sort="v:refname" https://github.com/kubeovn/kube-ovn | awk -F'[/^]' '{print $$3}' | grep '^v1\.14\.' | tail -n1 ) && \
1212
curl -sSL https://github.com/kubeovn/kube-ovn/archive/refs/tags/$${tag}.tar.gz | \
13-
tar xzvf - --strip 1 kube-ovn-$${tag#*v}/charts
13+
tar xzvf - --strip 1 kube-ovn-$${tag#*v}/charts/kube-ovn
1414
patch --no-backup-if-mismatch -p4 < patches/cozyconfig.diff
1515
patch --no-backup-if-mismatch -p4 < patches/mtu.diff
1616
version=$$(awk '$$1 == "version:" {print $$2}' charts/kube-ovn/Chart.yaml) && \

‎packages/system/kubeovn/charts/kube-ovn/Chart.yaml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: v1.13.14
18+
version: v1.14.5
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to
2222
# follow Semantic Versioning. They should reflect the version the application is using.
2323
# It is recommended to use it with quotes.
24-
appVersion: "1.13.14"
24+
appVersion: "1.14.5"
2525

26-
kubeVersion: ">= 1.23.0-0"
26+
kubeVersion: ">= 1.29.0-0"

‎packages/system/kubeovn/charts/kube-ovn/templates/_helpers.tpl‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ Get IP-addresses of master nodes
2020
{{- end -}}
2121
{{- end -}}
2222
{{- end -}}
23+
{{- if and (eq (len $ips) 0) (not $.Values.MASTER_NODES) -}}
24+
{{- fail (printf "No nodes found with label '%s'. Please check your MASTER_NODES_LABEL configuration or ensure master nodes are properly labeled." $.Values.MASTER_NODES_LABEL) -}}
25+
{{- end -}}
2326
{{ join "," $ips }}
2427
{{- end -}}
2528

‎packages/system/kubeovn/charts/kube-ovn/templates/controller-deploy.yaml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,9 @@ spec:
115115
- --enable-anp={{- .Values.func.ENABLE_ANP }}
116116
- --ovsdb-con-timeout={{- .Values.func.OVSDB_CON_TIMEOUT }}
117117
- --ovsdb-inactivity-timeout={{- .Values.func.OVSDB_INACTIVITY_TIMEOUT }}
118+
- --enable-live-migration-optimize={{- .Values.func.ENABLE_LIVE_MIGRATION_OPTIMIZE }}
119+
- --enable-ovn-lb-prefer-local={{- .Values.func.ENABLE_OVN_LB_PREFER_LOCAL }}
120+
- --image={{ .Values.global.registry.address }}/{{ .Values.global.images.kubeovn.repository }}:{{ .Values.global.images.kubeovn.tag }}
118121
securityContext:
119122
runAsUser: {{ include "kubeovn.runAsUser" . }}
120123
privileged: false

‎packages/system/kubeovn/charts/kube-ovn/templates/ic-controller-deploy.yaml‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ kind: Deployment
33
apiVersion: apps/v1
44
metadata:
55
name: ovn-ic-controller
6-
namespace: kube-system
6+
namespace: {{ .Values.namespace }}
77
annotations:
88
kubernetes.io/description: |
99
OVN IC Client
@@ -109,7 +109,9 @@ spec:
109109
name: kube-ovn-log
110110
nodeSelector:
111111
kubernetes.io/os: "linux"
112-
kube-ovn/role: "master"
112+
{{- with splitList "=" .Values.MASTER_NODES_LABEL }}
113+
{{ index . 0 }}: "{{ if eq (len .) 2 }}{{ index . 1 }}{{ end }}"
114+
{{- end }}
113115
volumes:
114116
- name: host-run-ovn
115117
hostPath:

0 commit comments

Comments
 (0)