Skip to content
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

Fix DISABLE_MODULES_MANAGEMENT #4365

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions charts/kube-ovn/templates/ovncni-ds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ spec:
chown -R nobody: /var/log/kube-ovn
chmod g+r /run/xtables.lock
chmod g+w /var/run/netns
{{- if not .Values.DISABLE_MODULES_MANAGEMENT }}
iptables -V
{{- end }}
securityContext:
allowPrivilegeEscalation: true
capabilities:
Expand Down Expand Up @@ -126,7 +128,9 @@ spec:
- NET_BIND_SERVICE
- NET_RAW
- SYS_ADMIN
{{- if not .Values.DISABLE_MODULES_MANAGEMENT }}
- SYS_MODULE
{{- end }}
- SYS_NICE
env:
- name: ENABLE_SSL
Expand Down
21 changes: 9 additions & 12 deletions charts/kube-ovn/templates/ovsovn-ds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,13 @@ spec:
- -xec
- |
chown -R nobody: /var/run/ovn /var/log/ovn /etc/openvswitch /var/run/openvswitch /var/log/openvswitch
{{- if not .Values.DISABLE_MODULES_MANAGEMENT }}
iptables -V
{{- else }}
ln -sf /bin/true /usr/local/sbin/modprobe
ln -sf /bin/true /usr/local/sbin/modinfo
ln -sf /bin/true /usr/local/sbin/rmmod
{{- end }}
securityContext:
allowPrivilegeEscalation: true
capabilities:
Expand Down Expand Up @@ -81,18 +87,7 @@ spec:
{{- if .Values.DPDK }}
command: ["/kube-ovn/start-ovs-dpdk.sh"]
{{- else }}
command:
{{- if .Values.DISABLE_MODULES_MANAGEMENT }}
- /bin/sh
- -ec
- |
ln -sf /bin/true /usr/sbin/modprobe
ln -sf /bin/true /usr/sbin/modinfo
ln -sf /bin/true /usr/sbin/rmmod
exec /kube-ovn/start-ovs.sh
{{- else }}
- /kube-ovn/start-ovs.sh
{{- end }}
command: ["/kube-ovn/start-ovs.sh"]
{{- end }}
securityContext:
runAsUser: 65534
Expand All @@ -101,7 +96,9 @@ spec:
add:
- NET_ADMIN
- NET_BIND_SERVICE
{{- if not .Values.DISABLE_MODULES_MANAGEMENT }}
- SYS_MODULE
{{- end }}
- SYS_NICE
- SYS_ADMIN
env:
Expand Down
Loading