mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-02-17 03:00:07 -03:30
Currently, there is no reliable way to obtain individual CRD files, so the only solution is to update first. Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
30 lines
1.0 KiB
YAML
30 lines
1.0 KiB
YAML
---
|
|
- name: CSI CRD | Generate Manifests
|
|
template:
|
|
src: "{{ item.file }}.j2"
|
|
dest: "{{ kube_config_dir }}/{{ item.file }}"
|
|
mode: "0644"
|
|
with_items:
|
|
- {name: volumegroupsnapshotclasses, file: volumegroupsnapshotclasses.yml}
|
|
- {name: volumegroupsnapshotcontents, file: volumegroupsnapshotcontents.yml}
|
|
- {name: volumegroupsnapshots, file: volumegroupsnapshots.yml}
|
|
- {name: volumesnapshotclasses, file: volumesnapshotclasses.yml}
|
|
- {name: volumesnapshotcontents, file: volumesnapshotcontents.yml}
|
|
- {name: volumesnapshots, file: volumesnapshots.yml}
|
|
register: csi_crd_manifests
|
|
when: inventory_hostname == groups['kube_control_plane'][0]
|
|
|
|
- name: CSI CRD | Apply Manifests
|
|
kube:
|
|
kubectl: "{{ bin_dir }}/kubectl"
|
|
filename: "{{ kube_config_dir }}/{{ item.item.file }}"
|
|
state: "latest"
|
|
wait: true
|
|
with_items:
|
|
- "{{ csi_crd_manifests.results }}"
|
|
when:
|
|
- inventory_hostname == groups['kube_control_plane'][0]
|
|
- not item is skipped
|
|
loop_control:
|
|
label: "{{ item.item.file }}"
|