diff --git a/openvswitch/templates/bin/_openvswitch-vswitchd.sh.tpl b/openvswitch/templates/bin/_openvswitch-vswitchd.sh.tpl index 1c35e1c8f6..89f882a321 100644 --- a/openvswitch/templates/bin/_openvswitch-vswitchd.sh.tpl +++ b/openvswitch/templates/bin/_openvswitch-vswitchd.sh.tpl @@ -119,8 +119,10 @@ function start () { -vconsole:err \ -vconsole:info \ --pidfile=${OVS_PID} \ - --mlockall \ - --user="{{ .Values.conf.ovs_user_name }}" + {{- if .Values.conf.ovs_user_name }} + --user="{{ .Values.conf.ovs_user_name }}" \ + {{- end }} + --mlockall } function stop () { diff --git a/openvswitch/values.yaml b/openvswitch/values.yaml index 6cf8233734..89aeb88f66 100644 --- a/openvswitch/values.yaml +++ b/openvswitch/values.yaml @@ -243,6 +243,8 @@ conf: # vhost_iommu_support: true ## OVS supports run in non-root for both OVS and OVS DPDK mode, the user # for OVS need to be added to container image with user id 42424. - # useradd -u 42424 openvswitch, groupmod -g 42424 openvswitch + # useradd -u 42424 openvswitch; groupmod -g 42424 openvswitch + # + # Leave empty to run as user that invokes the command (default: root) ovs_user_name: "openvswitch:openvswitch" ... diff --git a/releasenotes/notes/openvswitch-e761d6733b84bdc7.yaml b/releasenotes/notes/openvswitch-e761d6733b84bdc7.yaml new file mode 100644 index 0000000000..e818af28cc --- /dev/null +++ b/releasenotes/notes/openvswitch-e761d6733b84bdc7.yaml @@ -0,0 +1,4 @@ +--- +openvswitch: + - Make the --user flag for OVS server optional +...