mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-03-09 11:47:47 +03:00
Run kubeadm and hyperkube outside of local_release_dir (#4098)
Addressing the discussion started in #4064, this PR moves kubeadm and hyperkube binaries to /usr/local/bin before running them on the master nodes. It is to address the case where local_release_dir points to /tmp (kubespray default) and /tmp is mounted with noexec mode, preventing any binaries to be run in that partition. In role "node", we still move kubeadm to bin_dir only on the worker nodes.
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
ce8ba1f170
commit
2054a98cf7
@@ -4,5 +4,21 @@
|
||||
src: "kubeadm-images.yaml.j2"
|
||||
dest: "{{ kube_config_dir }}/kubeadm-images.yaml"
|
||||
|
||||
- name: kubeadm | Copy kubeadm binary from download dir
|
||||
synchronize:
|
||||
src: "{{ local_release_dir }}/kubeadm"
|
||||
dest: "{{ bin_dir }}/kubeadm"
|
||||
compress: no
|
||||
perms: yes
|
||||
owner: no
|
||||
group: no
|
||||
delegate_to: "{{ inventory_hostname }}"
|
||||
|
||||
- name: kubeadm | Set kubeadm binary permissions
|
||||
file:
|
||||
path: "{{ bin_dir }}/kubeadm"
|
||||
mode: "0755"
|
||||
state: file
|
||||
|
||||
- name: container_download | download images for kubeadm config images
|
||||
command: "{{ local_release_dir }}/kubeadm config images pull --config={{ kube_config_dir }}/kubeadm-images.yaml"
|
||||
command: "{{ bin_dir }}/kubeadm config images pull --config={{ kube_config_dir }}/kubeadm-images.yaml"
|
||||
|
||||
Reference in New Issue
Block a user