728024e8ff
- cephfs-provisioner 06fddbe2 (https://github.com/kubernetes-incubator/external-storage/tree/06fddbe2/ceph/cephfs) Noteable changes from upstream: - Added storage class parameters to specify a root path within the backing cephfs and, optionally, use deterministic directory and user names (https://github.com/kubernetes-incubator/external-storage/pull/696) - Support capacity (https://github.com/kubernetes-incubator/external-storage/pull/770) - Enable metrics server (https://github.com/kubernetes-incubator/external-storage/pull/797) Other noteable changes: - Clean up legacy manifests file naming - Remove legacy manifests, namespace and storageclass before upgrade - `cephfs_provisioner_monitors` simplified as string - Default to new deterministic naming - Add `reclaimPolicy` support in StorageClass With legacy non-deterministic naming style (where $UUID are generated ramdonly): - cephfs_provisioner_claim_root: /volumes/kubernetes - cephfs_provisioner_deterministic_names: false - Generated CephFS volume: /volumes/kubernetes/kubernetes-dynamic-pvc-$UUID - Generated CephFS user: kubernetes-dynamic-user-$UUID With new default deterministic naming style (where $NAMESPACE and $PVC are predictable): - cephfs_provisioner_claim_root: /volumes - cephfs_provisioner_deterministic_names: true - Generated CephFS volume: /volumes/$NAMESPACE/$PVC - Generated CephFS user: k8s.$NAMESPACE.$PVC
66 lines
2.5 KiB
YAML
66 lines
2.5 KiB
YAML
---
|
|
|
|
- name: CephFS Provisioner | Remove legacy addon dir and manifests
|
|
file:
|
|
path: "{{ kube_config_dir }}/addons/cephfs_provisioner"
|
|
state: absent
|
|
when:
|
|
- inventory_hostname == groups['kube-master'][0]
|
|
tags:
|
|
- upgrade
|
|
|
|
- name: CephFS Provisioner | Remove legacy namespace
|
|
shell: |
|
|
{{ bin_dir }}/kubectl delete namespace {{ cephfs_provisioner_namespace }}
|
|
ignore_errors: yes
|
|
when:
|
|
- inventory_hostname == groups['kube-master'][0]
|
|
tags:
|
|
- upgrade
|
|
|
|
- name: CephFS Provisioner | Remove legacy storageclass
|
|
shell: |
|
|
{{ bin_dir }}/kubectl delete storageclass {{ cephfs_provisioner_storage_class }}
|
|
ignore_errors: yes
|
|
when:
|
|
- inventory_hostname == groups['kube-master'][0]
|
|
tags:
|
|
- upgrade
|
|
|
|
- name: CephFS Provisioner | Create addon dir
|
|
file:
|
|
path: "{{ kube_config_dir }}/addons/cephfs_provisioner"
|
|
state: directory
|
|
owner: root
|
|
group: root
|
|
mode: 0755
|
|
when:
|
|
- inventory_hostname == groups['kube-master'][0]
|
|
|
|
- name: CephFS Provisioner | Create manifests
|
|
template:
|
|
src: "{{ item.file }}.j2"
|
|
dest: "{{ kube_config_dir }}/addons/cephfs_provisioner/{{ item.file }}"
|
|
with_items:
|
|
- { name: 00-namespace, file: 00-namespace.yml, type: ns }
|
|
- { name: secret-cephfs-provisioner, file: secret-cephfs-provisioner.yml, type: secret }
|
|
- { name: sa-cephfs-provisioner, file: sa-cephfs-provisioner.yml, type: sa }
|
|
- { name: clusterrole-cephfs-provisioner, file: clusterrole-cephfs-provisioner.yml, type: clusterrole }
|
|
- { name: clusterrolebinding-cephfs-provisioner, file: clusterrolebinding-cephfs-provisioner.yml, type: clusterrolebinding }
|
|
- { name: role-cephfs-provisioner, file: role-cephfs-provisioner.yml, type: role }
|
|
- { name: rolebinding-cephfs-provisioner, file: rolebinding-cephfs-provisioner.yml, type: rolebinding }
|
|
- { name: deploy-cephfs-provisioner, file: deploy-cephfs-provisioner.yml, type: rs }
|
|
- { name: sc-cephfs-provisioner, file: sc-cephfs-provisioner.yml, type: sc }
|
|
register: cephfs_provisioner_manifests
|
|
when: inventory_hostname == groups['kube-master'][0]
|
|
|
|
- name: CephFS Provisioner | Apply manifests
|
|
kube:
|
|
name: "{{ item.item.name }}"
|
|
namespace: "{{ cephfs_provisioner_namespace }}"
|
|
kubectl: "{{ bin_dir }}/kubectl"
|
|
resource: "{{ item.item.type }}"
|
|
filename: "{{ kube_config_dir }}/addons/cephfs_provisioner/{{ item.item.file }}"
|
|
state: "latest"
|
|
with_items: "{{ cephfs_provisioner_manifests.results }}"
|
|
when: inventory_hostname == groups['kube-master'][0]
|