mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-03-09 03:37:36 +03:00
Fix upgrade for all daemonset type resources
Daemonsets cannot be simply upgraded through a single API call, regardless of any kubectl documentation. The resource must be purged and then recreated in order to make any changes.
This commit is contained in:
@@ -7,6 +7,18 @@
|
||||
resource: "configmap"
|
||||
namespace: "{{system_namespace}}"
|
||||
|
||||
#FIXME: remove if kubernetes/features#124 is implemented
|
||||
- name: Purge old flannel and canal-node
|
||||
run_once: true
|
||||
kube:
|
||||
name: "canal-node"
|
||||
kubectl: "{{ bin_dir }}/kubectl"
|
||||
filename: "{{ kube_config_dir }}/canal-node.yml"
|
||||
resource: "ds"
|
||||
namespace: "{{system_namespace}}"
|
||||
state: absent
|
||||
when: inventory_hostname == groups['kube-master'][0] and canal_node_manifest.changed
|
||||
|
||||
- name: Start flannel and calico-node
|
||||
run_once: true
|
||||
kube:
|
||||
@@ -15,3 +27,6 @@
|
||||
filename: "{{kube_config_dir}}/canal-node.yaml"
|
||||
resource: "ds"
|
||||
namespace: "{{system_namespace}}"
|
||||
state: "{{ item | ternary('latest','present') }}"
|
||||
with_items: "{{ canal_node_manifest.changed }}"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user