Skip to content

Commit

Permalink
Set exact user for Kubelet services
Browse files Browse the repository at this point in the history
  • Loading branch information
avoidik committed Mar 27, 2018
1 parent f077345 commit e375678
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions roles/kubernetes/node/templates/kubelet.docker.service.j2
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ After=docker.service
Wants=docker.socket

[Service]
User=root
EnvironmentFile={{kube_config_dir}}/kubelet.env
ExecStart={{ bin_dir }}/kubelet \
$KUBE_LOGTOSTDERR \
Expand Down
1 change: 1 addition & 0 deletions roles/kubernetes/node/templates/kubelet.host.service.j2
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ After=docker.service
Wants=docker.socket

[Service]
User=root
EnvironmentFile=-{{kube_config_dir}}/kubelet.env
{% if kubelet_flexvolumes_plugins_dir is defined %}
ExecStartPre=-/bin/mkdir -p {{ kubelet_flexvolumes_plugins_dir }}
Expand Down
1 change: 1 addition & 0 deletions roles/kubernetes/node/templates/kubelet.rkt.service.j2
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Documentation=https://github.com/GoogleCloudPlatform/kubernetes
Wants=network.target

[Service]
User=root
Restart=on-failure
RestartSec=10s
TimeoutStartSec=0
Expand Down

0 comments on commit e375678

Please sign in to comment.