mirror of https://github.com/easzlab/kubeasz.git
fix: change cni bin directory t0 /opt/cni/bin #1248
parent
54bae288ba
commit
e2bd948db4
|
@ -442,7 +442,7 @@ spec:
|
|||
# Used to install CNI.
|
||||
- name: cni-bin-dir
|
||||
hostPath:
|
||||
path: {{ bin_dir }}
|
||||
path: /opt/cni/bin
|
||||
- name: cni-net-dir
|
||||
hostPath:
|
||||
path: /etc/cni/net.d
|
||||
|
|
|
@ -463,7 +463,7 @@ spec:
|
|||
# Used to install CNI.
|
||||
- name: cni-bin-dir
|
||||
hostPath:
|
||||
path: {{ bin_dir }}
|
||||
path: /opt/cni/bin
|
||||
- name: cni-net-dir
|
||||
hostPath:
|
||||
path: /etc/cni/net.d
|
||||
|
|
|
@ -521,7 +521,7 @@ spec:
|
|||
# Used to install CNI.
|
||||
- name: cni-bin-dir
|
||||
hostPath:
|
||||
path: {{ bin_dir }}
|
||||
path: /opt/cni/bin
|
||||
- name: cni-net-dir
|
||||
hostPath:
|
||||
path: /etc/cni/net.d
|
||||
|
|
|
@ -18,7 +18,7 @@ resources:
|
|||
memory: 512Mi
|
||||
|
||||
cni:
|
||||
binPath: {{ bin_dir }}
|
||||
binPath: /opt/cni/bin
|
||||
|
||||
containerRuntime:
|
||||
integration: containerd
|
||||
|
|
|
@ -69,7 +69,7 @@ version = 2
|
|||
unset_seccomp_profile = ""
|
||||
|
||||
[plugins."io.containerd.grpc.v1.cri".cni]
|
||||
bin_dir = "{{ bin_dir }}"
|
||||
bin_dir = "/opt/cni/bin"
|
||||
conf_dir = "/etc/cni/net.d"
|
||||
conf_template = "/etc/cni/net.d/10-default.conf"
|
||||
max_conf_num = 1
|
||||
|
|
|
@ -1,11 +1,3 @@
|
|||
- name: 下载cni plugins
|
||||
copy: src={{ base_dir }}/bin/{{ item }} dest={{ bin_dir }}/{{ item }} mode=0755
|
||||
with_items:
|
||||
- bridge
|
||||
- host-local
|
||||
- loopback
|
||||
- portmap
|
||||
|
||||
- name: 配置 flannel DaemonSet yaml文件
|
||||
template: src=kube-flannel.yaml.j2 dest={{ cluster_dir }}/yml/flannel.yaml
|
||||
run_once: true
|
||||
|
|
|
@ -184,7 +184,7 @@ spec:
|
|||
path: /run/flannel
|
||||
- name: cni-plugin
|
||||
hostPath:
|
||||
path: {{ bin_dir }}
|
||||
path: /opt/cni/bin
|
||||
- name: cni
|
||||
hostPath:
|
||||
path: /etc/cni/net.d
|
||||
|
|
|
@ -3,18 +3,22 @@
|
|||
with_items:
|
||||
- /var/lib/kubelet
|
||||
- /var/lib/kube-proxy
|
||||
- /etc/cni/net.d
|
||||
- /opt/cni/bin
|
||||
|
||||
- name: 下载 kubelet,kube-proxy 二进制和基础 cni plugins
|
||||
- name: 下载 kubelet,kube-proxy 二进制
|
||||
copy: src={{ base_dir }}/bin/{{ item }} dest={{ bin_dir }}/{{ item }} mode=0755
|
||||
with_items:
|
||||
- kubectl
|
||||
- kubelet
|
||||
- kube-proxy
|
||||
- bridge
|
||||
- host-local
|
||||
- loopback
|
||||
tags: upgrade_k8s
|
||||
|
||||
- name: 下载 cni plugins 二进制文件
|
||||
copy: src={{ item }} dest=/opt/cni/bin/ mode=0755
|
||||
with_fileglob:
|
||||
- {{ base_dir }}/bin/cni-bin/*
|
||||
|
||||
- name: 添加 kubectl 自动补全
|
||||
lineinfile:
|
||||
dest: ~/.bashrc
|
||||
|
|
|
@ -214,7 +214,7 @@ spec:
|
|||
path: /etc/cni/net.d
|
||||
- name: cni-bin
|
||||
hostPath:
|
||||
path: {{ bin_dir }}
|
||||
path: /opt/cni/bin
|
||||
- name: host-ns
|
||||
hostPath:
|
||||
path: /var/run/netns
|
||||
|
|
|
@ -1,11 +1,3 @@
|
|||
- name: 下载cni plugins
|
||||
copy: src={{ base_dir }}/bin/{{ item }} dest={{ bin_dir }}/{{ item }} mode=0755
|
||||
with_items:
|
||||
- bridge
|
||||
- host-local
|
||||
- loopback
|
||||
- portmap
|
||||
|
||||
- name: 准备配置 kube-router DaemonSet (without IPVS)
|
||||
template: src=kuberouter.yaml.j2 dest={{ cluster_dir }}/yml/kube-router.yaml
|
||||
run_once: true
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
- "{{ bin_dir }}"
|
||||
- "{{ ca_dir }}"
|
||||
- /root/.kube
|
||||
- /etc/cni/net.d
|
||||
|
||||
# 某些系统没有/usr/bin/python,需要配置一个软链接,否则connection: local的任务会失败
|
||||
# 如果仍旧出现任务失败,重新执行一遍即可 https://github.com/ansible/ansible/issues/64903
|
||||
|
|
Loading…
Reference in New Issue