Skip to content

Commit 8f16fc7

Browse files
authored
fix installation script and chart for dpdk (#5194)
Signed-off-by: zhangzujian <zhangzujian.7@gmail.com>
1 parent 056d794 commit 8f16fc7

File tree

9 files changed

+24
-426
lines changed

9 files changed

+24
-426
lines changed

charts/kube-ovn-v2/README.md

Lines changed: 8 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -729,7 +729,6 @@ false
729729
{
730730
"images": {
731731
"kubeovn": {
732-
"dpdkRepository": "kube-ovn-dpdk",
733732
"repository": "kube-ovn",
734733
"support_arm": true,
735734
"tag": "v1.14.0",
@@ -1385,68 +1384,31 @@ false
13851384
<td>Disable auto-loading of kernel modules by OVS. If this is disabled, you will have to enable the Open vSwitch kernel module yourself.</td>
13861385
</tr>
13871386
<tr>
1388-
<td>ovsOvn.dpdk</td>
1387+
<td>ovsOvn.dpdkHybrid</td>
13891388
<td>object</td>
13901389
<td><pre lang="">
13911390
"{}"
13921391
</pre>
13931392
</td>
1394-
<td>DPDK support for OVS. ref: https://kubeovn.github.io/docs/v1.12.x/en/advance/dpdk/</td>
1393+
<td>DPDK-hybrid support for OVS. ref: https://kubeovn.github.io/docs/v1.13.x/en/advance/dpdk/</td>
13951394
</tr>
13961395
<tr>
1397-
<td>ovsOvn.dpdk.enabled</td>
1396+
<td>ovsOvn.dpdkHybrid.enabled</td>
13981397
<td>bool</td>
13991398
<td><pre lang="json">
14001399
false
14011400
</pre>
14021401
</td>
1403-
<td>Enables DPDK support on OVS.</td>
1404-
</tr>
1405-
<tr>
1406-
<td>ovsOvn.dpdk.resources</td>
1407-
<td>object</td>
1408-
<td><pre lang="json">
1409-
{
1410-
"limits": {
1411-
"cpu": "1000m",
1412-
"hugepages-1Gi": "1Gi",
1413-
"memory": "1000Mi"
1414-
},
1415-
"requests": {
1416-
"cpu": "1000m",
1417-
"memory": "200Mi"
1418-
}
1419-
}
1420-
</pre>
1421-
</td>
1422-
<td>ovs-ovn resource limits & requests when DPDK is enabled. ref: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/</td>
1402+
<td>Enables DPDK-hybrid support on OVS.</td>
14231403
</tr>
14241404
<tr>
1425-
<td>ovsOvn.dpdk.version</td>
1405+
<td>ovsOvn.dpdkHybrid.tag</td>
14261406
<td>string</td>
14271407
<td><pre lang="json">
1428-
"19.11"
1429-
</pre>
1430-
</td>
1431-
<td>Version of the DPDK image.</td>
1432-
</tr>
1433-
<tr>
1434-
<td>ovsOvn.dpdkHybrid</td>
1435-
<td>object</td>
1436-
<td><pre lang="">
1437-
"{}"
1438-
</pre>
1439-
</td>
1440-
<td>DPDK-hybrid support for OVS. ref: https://kubeovn.github.io/docs/v1.12.x/en/advance/dpdk/</td>
1441-
</tr>
1442-
<tr>
1443-
<td>ovsOvn.dpdkHybrid.enabled</td>
1444-
<td>bool</td>
1445-
<td><pre lang="json">
1446-
false
1408+
"v1.14.0-dpdk"
14471409
</pre>
14481410
</td>
1449-
<td>Enables DPDK-hybrid support on OVS.</td>
1411+
<td>DPDK image tag.</td>
14501412
</tr>
14511413
<tr>
14521414
<td>ovsOvn.dpdkHybrid.resources</td>
@@ -1528,7 +1490,7 @@ false
15281490
}
15291491
</pre>
15301492
</td>
1531-
<td>ovs-ovn resource limits & requests, overridden if DPDK is enabled. ref: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/</td>
1493+
<td>ovs-ovn resource limits & requests. ref: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/</td>
15321494
</tr>
15331495
</tbody>
15341496
</table>

charts/kube-ovn-v2/templates/ovs-ovn/ovs-ovn-daemonset.yaml

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,7 @@ spec:
5151
hostPID: true
5252
initContainers:
5353
- name: hostpath-init
54-
{{- if .Values.ovsOvn.dpdk.enabled }}
55-
image: {{ .Values.global.registry.address }}/{{ .Values.global.images.kubeovn.dpdkRepository }}:{{ .Values.ovsOvn.dpdk.version }}-{{ .Values.global.images.kubeovn.tag }}
56-
{{- else }}
5754
image: {{ .Values.global.registry.address }}/{{ .Values.global.images.kubeovn.repository }}:{{ .Values.global.images.kubeovn.tag }}
58-
{{- end }}
5955
imagePullPolicy: {{ .Values.image.pullPolicy }}
6056
command:
6157
- sh
@@ -95,17 +91,9 @@ spec:
9591
name: host-log-ovs
9692
containers:
9793
- name: openvswitch
98-
{{- if .Values.ovsOvn.dpdk.enabled }}
99-
image: {{ .Values.global.registry.address }}/{{ .Values.global.images.kubeovn.dpdkRepository }}:{{ .Values.ovsOvn.dpdk.version }}-{{ .Values.global.images.kubeovn.tag }}
100-
{{- else }}
10194
image: {{ .Values.global.registry.address }}/{{ .Values.global.images.kubeovn.repository }}:{{ .Values.global.images.kubeovn.tag }}
102-
{{- end }}
10395
imagePullPolicy: {{ .Values.image.pullPolicy }}
104-
{{- if .Values.ovsOvn.dpdk.enabled }}
105-
command: ["/kube-ovn/start-ovs-dpdk.sh"]
106-
{{- else }}
10796
command: ["/kube-ovn/start-ovs.sh"]
108-
{{- end }}
10997
securityContext:
11098
runAsUser: {{ include "kubeovn.runAsUser" . }}
11199
privileged: false
@@ -169,50 +157,27 @@ spec:
169157
- mountPath: /var/run/containerd
170158
name: cruntime
171159
readOnly: true
172-
{{- if .Values.ovsOvn.dpdk.enabled }}
173-
- mountPath: /opt/ovs-config
174-
name: host-config-ovs
175-
- mountPath: /dev/hugepages
176-
name: hugepage
177-
{{- end }}
178160
readinessProbe:
179161
exec:
180-
{{- if .Values.ovsOvn.dpdk.enabled }}
181-
command:
182-
- bash
183-
- /kube-ovn/ovs-dpdk-healthcheck.sh
184-
{{- else }}
185162
command:
186163
- bash
187164
- /kube-ovn/ovs-healthcheck.sh
188-
{{- end }}
189165
initialDelaySeconds: 10
190166
periodSeconds: 5
191167
timeoutSeconds: 45
192168
livenessProbe:
193169
exec:
194-
{{- if .Values.ovsOvn.dpdk.enabled }}
195-
command:
196-
- bash
197-
- /kube-ovn/ovs-dpdk-healthcheck.sh
198-
{{- else }}
199170
command:
200171
- bash
201172
- /kube-ovn/ovs-healthcheck.sh
202-
{{- end }}
203173
initialDelaySeconds: 60
204174
periodSeconds: 5
205175
failureThreshold: 5
206176
timeoutSeconds: 45
207-
{{- if and .Values.ovsOvn.dpdk.enabled .Values.ovsOvn.resources }}
208-
resources:
209-
{{- toYaml .Values.ovsOvn.dpdk.resources | trim | nindent 12 }}
210-
{{- else }}
211177
{{- with .Values.ovsOvn.resources }}
212178
resources:
213179
{{- toYaml . | trim | nindent 12 }}
214180
{{- end }}
215-
{{- end }}
216181
nodeSelector:
217182
kubernetes.io/os: "linux"
218183
volumes:
@@ -246,12 +211,3 @@ spec:
246211
- hostPath:
247212
path: /var/run/containerd
248213
name: cruntime
249-
{{- if .Values.ovsOvn.dpdk.enabled }}
250-
- name: host-config-ovs
251-
hostPath:
252-
path: /opt/ovs-config
253-
type: DirectoryOrCreate
254-
- name: hugepage
255-
emptyDir:
256-
medium: HugePages
257-
{{- end }}

charts/kube-ovn-v2/templates/ovs-ovn/ovs-ovn-dpdk-daemonset.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ spec:
4747
hostPID: true
4848
containers:
4949
- name: openvswitch
50-
image: {{ .Values.global.registry.address }}/{{ .Values.global.images.kubeovn.repository }}:{{ .Values.global.images.kubeovn.tag }}-dpdk
50+
image: {{ .Values.global.registry.address }}/{{ .Values.global.images.kubeovn.repository }}:{{ .Values.ovsOvn.dpdkHybrid.tag }}
5151
imagePullPolicy: {{ .Values.image.pullPolicy }}
5252
command: ["/kube-ovn/start-ovs-dpdk-v2.sh"]
5353
securityContext:

charts/kube-ovn-v2/values.yaml

Lines changed: 4 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ global:
77
images:
88
kubeovn:
99
repository: kube-ovn
10-
dpdkRepository: kube-ovn-dpdk
1110
vpcRepository: vpc-nat-gateway
1211
tag: v1.14.0
1312
support_arm: true
@@ -352,7 +351,7 @@ ovsOvn:
352351
# @section -- OVS/OVN daemons configuration
353352
podLabels: {}
354353

355-
# -- ovs-ovn resource limits & requests, overridden if DPDK is enabled.
354+
# -- ovs-ovn resource limits & requests.
356355
# ref: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
357356
# @section -- OVS/OVN daemons configuration
358357
resources:
@@ -382,30 +381,6 @@ ovsOvn:
382381
# @section -- OVS/OVN daemons configuration.
383382
probeInterval: 180000
384383

385-
# -- DPDK support for OVS.
386-
# ref: https://kubeovn.github.io/docs/v1.12.x/en/advance/dpdk/
387-
# @section -- OVS/OVN daemons configuration
388-
# @default -- "{}"
389-
dpdk:
390-
# -- Enables DPDK support on OVS.
391-
# @section -- OVS/OVN daemons configuration
392-
enabled: false
393-
# -- Version of the DPDK image.
394-
# @section -- OVS/OVN daemons configuration
395-
version: "19.11"
396-
397-
# -- ovs-ovn resource limits & requests when DPDK is enabled.
398-
# ref: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
399-
# @section -- OVS/OVN daemons configuration
400-
resources:
401-
requests:
402-
cpu: "1000m"
403-
memory: "200Mi"
404-
limits:
405-
hugepages-1Gi: 1Gi
406-
cpu: "1000m"
407-
memory: "1000Mi"
408-
409384
# -- DPDK-hybrid support for OVS.
410385
# ref: https://kubeovn.github.io/docs/v1.12.x/en/advance/dpdk/
411386
# @section -- OVS/OVN daemons configuration
@@ -414,6 +389,9 @@ ovsOvn:
414389
# -- Enables DPDK-hybrid support on OVS.
415390
# @section -- OVS/OVN daemons configuration
416391
enabled: false
392+
# -- DPDK image tag.
393+
# @section -- OVS/OVN daemons configuration
394+
tag: "v1.14.0-dpdk"
417395
# -- ovs-ovn resource limits & requests when DPDK-hybrid is enabled.
418396
# ref: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
419397
# @section -- OVS/OVN daemons configuration

charts/kube-ovn/templates/ovn-dpdk-ds.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ spec:
3131
hostPID: true
3232
containers:
3333
- name: openvswitch
34-
image: {{ .Values.global.registry.address }}/{{ .Values.global.images.kubeovn.repository }}:{{ .Values.global.images.kubeovn.tag }}-dpdk
34+
image: {{ .Values.global.registry.address }}/{{ .Values.global.images.kubeovn.repository }}:{{ .Values.DPDK_IMAGE_TAG }}
3535
imagePullPolicy: {{ .Values.image.pullPolicy }}
3636
command: ["/kube-ovn/start-ovs-dpdk-v2.sh"]
3737
securityContext:

charts/kube-ovn/templates/ovsovn-ds.yaml

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,7 @@ spec:
3838
hostPID: true
3939
initContainers:
4040
- name: hostpath-init
41-
{{- if .Values.DPDK }}
42-
image: {{ .Values.global.registry.address }}/{{ .Values.global.images.kubeovn.dpdkRepository }}:{{ .Values.DPDK_VERSION }}-{{ .Values.global.images.kubeovn.tag }}
43-
{{- else }}
4441
image: {{ .Values.global.registry.address }}/{{ .Values.global.images.kubeovn.repository }}:{{ .Values.global.images.kubeovn.tag }}
45-
{{- end }}
4642
imagePullPolicy: {{ .Values.image.pullPolicy }}
4743
command:
4844
- sh
@@ -82,17 +78,9 @@ spec:
8278
name: host-log-ovs
8379
containers:
8480
- name: openvswitch
85-
{{- if .Values.DPDK }}
86-
image: {{ .Values.global.registry.address }}/{{ .Values.global.images.kubeovn.dpdkRepository }}:{{ .Values.DPDK_VERSION }}-{{ .Values.global.images.kubeovn.tag }}
87-
{{- else }}
8881
image: {{ .Values.global.registry.address }}/{{ .Values.global.images.kubeovn.repository }}:{{ .Values.global.images.kubeovn.tag }}
89-
{{- end }}
9082
imagePullPolicy: {{ .Values.image.pullPolicy }}
91-
{{- if .Values.DPDK }}
92-
command: ["/kube-ovn/start-ovs-dpdk.sh"]
93-
{{- else }}
9483
command: ["/kube-ovn/start-ovs.sh"]
95-
{{- end }}
9684
securityContext:
9785
runAsUser: {{ include "kubeovn.runAsUser" . }}
9886
privileged: false
@@ -156,59 +144,30 @@ spec:
156144
- mountPath: /var/run/containerd
157145
name: cruntime
158146
readOnly: true
159-
{{- if .Values.DPDK }}
160-
- mountPath: /opt/ovs-config
161-
name: host-config-ovs
162-
- mountPath: /dev/hugepages
163-
name: hugepage
164-
{{- end }}
165147
readinessProbe:
166148
exec:
167-
{{- if .Values.DPDK }}
168-
command:
169-
- bash
170-
- /kube-ovn/ovs-dpdk-healthcheck.sh
171-
{{- else }}
172149
command:
173150
- bash
174151
- /kube-ovn/ovs-healthcheck.sh
175-
{{- end }}
176152
initialDelaySeconds: 10
177153
periodSeconds: 5
178154
timeoutSeconds: 45
179155
livenessProbe:
180156
exec:
181-
{{- if .Values.DPDK }}
182-
command:
183-
- bash
184-
- /kube-ovn/ovs-dpdk-healthcheck.sh
185-
{{- else }}
186157
command:
187158
- bash
188159
- /kube-ovn/ovs-healthcheck.sh
189-
{{- end }}
190160
initialDelaySeconds: 60
191161
periodSeconds: 5
192162
failureThreshold: 5
193163
timeoutSeconds: 45
194164
resources:
195165
requests:
196-
{{- if .Values.DPDK }}
197-
cpu: {{ .Values.DPDK_CPU }}
198-
memory: {{ .Values.DPDK_MEMORY }}
199-
{{- else }}
200166
cpu: {{ index .Values "ovs-ovn" "requests" "cpu" }}
201167
memory: {{ index .Values "ovs-ovn" "requests" "memory" }}
202-
{{- end }}
203168
limits:
204-
{{- if .Values.DPDK }}
205-
cpu: {{ .Values.DPDK_CPU }}
206-
memory: {{ .Values.DPDK_MEMORY }}
207-
hugepages-1Gi: 1Gi
208-
{{- else }}
209169
cpu: {{ index .Values "ovs-ovn" "limits" "cpu" }}
210170
memory: {{ index .Values "ovs-ovn" "limits" "memory" }}
211-
{{- end }}
212171
nodeSelector:
213172
kubernetes.io/os: "linux"
214173
volumes:
@@ -242,12 +201,3 @@ spec:
242201
- hostPath:
243202
path: /var/run/containerd
244203
name: cruntime
245-
{{- if .Values.DPDK }}
246-
- name: host-config-ovs
247-
hostPath:
248-
path: /opt/ovs-config
249-
type: DirectoryOrCreate
250-
- name: hugepage
251-
emptyDir:
252-
medium: HugePages
253-
{{- end }}

charts/kube-ovn/values.yaml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ global:
88
images:
99
kubeovn:
1010
repository: kube-ovn
11-
dpdkRepository: kube-ovn-dpdk
1211
vpcRepository: vpc-nat-gateway
1312
tag: v1.14.0
1413
support_arm: true
@@ -138,10 +137,7 @@ fullnameOverride: ""
138137
HYBRID_DPDK: false
139138
HUGEPAGE_SIZE_TYPE: hugepages-2Mi # Default
140139
HUGEPAGES: 1Gi
141-
142-
# DPDK
143-
DPDK: false
144-
DPDK_VERSION: "19.11"
140+
DPDK_IMAGE_TAG: "v1.14.0-dpdk"
145141
DPDK_CPU: "1000m" # Default CPU configuration
146142
DPDK_MEMORY: "2Gi" # Default Memory configuration
147143

0 commit comments

Comments
 (0)