Skip to content

Commit

Permalink
fix permission issue in kube-ovn installation script and chart (kubeo…
Browse files Browse the repository at this point in the history
…vn#4613)

Signed-off-by: zhangzujian <[email protected]>
  • Loading branch information
zhangzujian authored Oct 16, 2024
1 parent ea80cf2 commit 1f22795
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 15 deletions.
11 changes: 4 additions & 7 deletions charts/kube-ovn/templates/ovncni-ds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,10 @@ spec:
command:
- sh
- -xec
- |
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 }}
- {{ if not .Values.DISABLE_MODULES_MANAGEMENT -}}
iptables -V
{{- else -}}
echo "nothing to do"
{{- end }}
securityContext:
allowPrivilegeEscalation: true
Expand Down Expand Up @@ -121,8 +119,7 @@ spec:
- --enable-ovn-ipsec={{- .Values.func.ENABLE_OVN_IPSEC }}
- --set-vxlan-tx-off={{- .Values.func.SET_VXLAN_TX_OFF }}
securityContext:
runAsUser: {{ include "kubeovn.runAsUser" . }}
runAsGroup: 0
runAsUser: 0
privileged: false
capabilities:
add:
Expand Down
10 changes: 2 additions & 8 deletions dist/images/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4456,19 +4456,14 @@ spec:
command:
- sh
- -xec
- |
chown -R nobody: /var/log/kube-ovn
chmod g+r /run/xtables.lock
chmod g+w /var/run/netns
iptables -V
- iptables -V
securityContext:
allowPrivilegeEscalation: true
capabilities:
drop:
- ALL
privileged: true
runAsUser: 0
runAsGroup: 0
volumeMounts:
- name: usr-local-sbin
mountPath: /usr/local/sbin
Expand Down Expand Up @@ -4523,8 +4518,7 @@ spec:
- --enable-ovn-ipsec=$ENABLE_OVN_IPSEC
- --set-vxlan-tx-off=$SET_VXLAN_TX_OFF
securityContext:
runAsUser: ${RUN_AS_USER}
runAsGroup: 0
runAsUser: 0
privileged: false
capabilities:
add:
Expand Down

0 comments on commit 1f22795

Please sign in to comment.