move flexvolume plugin directory creation to preinstall (#4999)
* move flexvolume plugin directory creation to preinstall * changes per pr feedback
This commit is contained in:
parent
fbbfff3795
commit
da50ed0936
6 changed files with 15 additions and 3 deletions
|
@ -191,6 +191,9 @@ podsecuritypolicy_enabled: false
|
||||||
# Acceptable options are 'pods', 'system-reserved', 'kube-reserved' and ''. Default is "".
|
# Acceptable options are 'pods', 'system-reserved', 'kube-reserved' and ''. Default is "".
|
||||||
# kubelet_enforce_node_allocatable: pods
|
# kubelet_enforce_node_allocatable: pods
|
||||||
|
|
||||||
|
# An alternative flexvolume plugin directory
|
||||||
|
# kubelet_flexvolumes_plugins_dir: /usr/libexec/kubernetes/kubelet-plugins/volume/exec
|
||||||
|
|
||||||
## Supplementary addresses that can be added in kubernetes ssl keys.
|
## Supplementary addresses that can be added in kubernetes ssl keys.
|
||||||
## That can be useful for example to setup a keepalived virtual IP
|
## That can be useful for example to setup a keepalived virtual IP
|
||||||
# supplementary_addresses_in_ssl_keys: [10.0.0.1, 10.0.0.2, 10.0.0.3]
|
# supplementary_addresses_in_ssl_keys: [10.0.0.1, 10.0.0.2, 10.0.0.3]
|
||||||
|
|
|
@ -50,8 +50,6 @@ loadbalancer_apiserver_cpu_requests: 25m
|
||||||
# - extensions/v1beta1/daemonsets=true
|
# - extensions/v1beta1/daemonsets=true
|
||||||
# - extensions/v1beta1/deployments=true
|
# - extensions/v1beta1/deployments=true
|
||||||
|
|
||||||
kubelet_flexvolumes_plugins_dir: /usr/libexec/kubernetes/kubelet-plugins/volume/exec
|
|
||||||
|
|
||||||
# A port range to reserve for services with NodePort visibility.
|
# A port range to reserve for services with NodePort visibility.
|
||||||
# Inclusive at both ends of the range.
|
# Inclusive at both ends of the range.
|
||||||
kube_apiserver_node_port_range: "30000-32767"
|
kube_apiserver_node_port_range: "30000-32767"
|
||||||
|
|
|
@ -7,7 +7,6 @@ Wants=docker.socket
|
||||||
[Service]
|
[Service]
|
||||||
User=root
|
User=root
|
||||||
EnvironmentFile=-{{ kube_config_dir }}/kubelet.env
|
EnvironmentFile=-{{ kube_config_dir }}/kubelet.env
|
||||||
ExecStartPre=-/bin/mkdir -p {{ kubelet_flexvolumes_plugins_dir }}
|
|
||||||
ExecStart={{ bin_dir }}/kubelet \
|
ExecStart={{ bin_dir }}/kubelet \
|
||||||
$KUBE_LOGTOSTDERR \
|
$KUBE_LOGTOSTDERR \
|
||||||
$KUBE_LOG_LEVEL \
|
$KUBE_LOG_LEVEL \
|
||||||
|
|
|
@ -25,6 +25,7 @@ kube_cert_group: kube-cert
|
||||||
kube_config_dir: /etc/kubernetes
|
kube_config_dir: /etc/kubernetes
|
||||||
kube_cert_dir: "{{ kube_config_dir }}/ssl"
|
kube_cert_dir: "{{ kube_config_dir }}/ssl"
|
||||||
kube_cert_compat_dir: /etc/kubernetes/pki
|
kube_cert_compat_dir: /etc/kubernetes/pki
|
||||||
|
kubelet_flexvolumes_plugins_dir: /usr/libexec/kubernetes/kubelet-plugins/volume/exec
|
||||||
|
|
||||||
# Container Linux by CoreOS cloud init config file to define /etc/resolv.conf content
|
# Container Linux by CoreOS cloud init config file to define /etc/resolv.conf content
|
||||||
# for hostnet pods and infra needs
|
# for hostnet pods and infra needs
|
||||||
|
|
|
@ -178,3 +178,13 @@
|
||||||
etcd_deployment_type: host
|
etcd_deployment_type: host
|
||||||
when:
|
when:
|
||||||
- etcd_kubeadm_enabled
|
- etcd_kubeadm_enabled
|
||||||
|
|
||||||
|
- name: check /usr readonly
|
||||||
|
stat:
|
||||||
|
path: "/usr"
|
||||||
|
register: usr
|
||||||
|
|
||||||
|
- name: set alternate flexvolume path
|
||||||
|
set_fact:
|
||||||
|
kubelet_flexvolumes_plugins_dir: /var/lib/kubelet/volumeplugins
|
||||||
|
when: not usr.stat.writeable
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
- "{{ kube_cert_dir }}"
|
- "{{ kube_cert_dir }}"
|
||||||
- "{{ kube_manifest_dir }}"
|
- "{{ kube_manifest_dir }}"
|
||||||
- "{{ kube_script_dir }}"
|
- "{{ kube_script_dir }}"
|
||||||
|
- "{{ kubelet_flexvolumes_plugins_dir }}"
|
||||||
|
|
||||||
- name: Check if kubernetes kubeadm compat cert dir exists
|
- name: Check if kubernetes kubeadm compat cert dir exists
|
||||||
stat:
|
stat:
|
||||||
|
|
Loading…
Reference in a new issue