mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-02-28 09:39:12 +03:00
Cleanup: remove all cloud_provider related tasks & files
Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
This commit is contained in:
@@ -1,12 +1,5 @@
|
||||
---
|
||||
dependencies:
|
||||
- role: kubernetes-apps/persistent_volumes/openstack
|
||||
when:
|
||||
- cloud_provider is defined
|
||||
- cloud_provider in [ 'openstack' ]
|
||||
tags:
|
||||
- persistent_volumes_openstack
|
||||
|
||||
- role: kubernetes-apps/persistent_volumes/cinder-csi
|
||||
when:
|
||||
- cinder_csi_enabled
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
---
|
||||
persistent_volumes_enabled: false
|
||||
storage_classes:
|
||||
- name: standard
|
||||
is_default: true
|
||||
parameters:
|
||||
availability: nova
|
||||
@@ -1,20 +0,0 @@
|
||||
---
|
||||
- name: Kubernetes Persistent Volumes | Lay down OpenStack Cinder Storage Class template
|
||||
template:
|
||||
src: "openstack-storage-class.yml.j2"
|
||||
dest: "{{ kube_config_dir }}/openstack-storage-class.yml"
|
||||
mode: "0644"
|
||||
register: manifests
|
||||
when:
|
||||
- inventory_hostname == groups['kube_control_plane'][0]
|
||||
|
||||
- name: Kubernetes Persistent Volumes | Add OpenStack Cinder Storage Class
|
||||
kube:
|
||||
name: storage-class
|
||||
kubectl: "{{ bin_dir }}/kubectl"
|
||||
resource: StorageClass
|
||||
filename: "{{ kube_config_dir }}/openstack-storage-class.yml"
|
||||
state: "latest"
|
||||
when:
|
||||
- inventory_hostname == groups['kube_control_plane'][0]
|
||||
- manifests.changed
|
||||
@@ -1,27 +0,0 @@
|
||||
{% for class in storage_classes %}
|
||||
---
|
||||
kind: StorageClass
|
||||
apiVersion: storage.k8s.io/v1
|
||||
metadata:
|
||||
name: "{{ class.name }}"
|
||||
annotations:
|
||||
storageclass.kubernetes.io/is-default-class: "{{ class.is_default | default(false) | ternary("true","false") }}"
|
||||
provisioner: kubernetes.io/cinder
|
||||
{% if class.mount_options is defined %}
|
||||
mountOptions:
|
||||
{% for option in class.mount_options | default([]) %}
|
||||
- "{{ option }}"
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
parameters:
|
||||
{% for key, value in (class.parameters | default({})).items() %}
|
||||
"{{ key }}": "{{ value }}"
|
||||
{% endfor %}
|
||||
{% if class.reclaim_policy is defined %}
|
||||
reclaimPolicy: "{{ class.reclaim_policy }}"
|
||||
{% endif %}
|
||||
{% if class.volume_binding_mode is defined %}
|
||||
volumeBindingMode: "{{ class.volume_binding_mode }}"
|
||||
{% endif %}
|
||||
allowVolumeExpansion: {{ expand_persistent_volumes }}
|
||||
{% endfor %}
|
||||
Reference in New Issue
Block a user