forked from easzlab/kubeasz
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
54 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
- hosts: | ||
- deploy | ||
- kube-node | ||
roles: | ||
- cluster-storage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
hosts: deploy | ||
roles: | ||
- cluster-storage | ||
vars: | ||
storage_type: nfs | ||
storage_server: 172.16.3.86 | ||
storage_path: /data/nfs | ||
storage_class_name: nfs-dynamic-class |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# 动态存储类型, 目前支持nfs和alicloud-nas | ||
storage_type: nfs | ||
storage_server: 172.16.3.86 | ||
storage_path: /data/nfs | ||
storage_class_name: nfs-dynamic-class |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
- block: | ||
- name: 准备部署nfs-client动态存储 | ||
template: | ||
src: nfs/nfs-client-provisioner.yaml.j2 | ||
dest: "{{ base_dir }}/manifests/storage/nfs/nfs-client-provisioner.yaml" | ||
- name: 开始部署nfs-client动态存储 | ||
shell: "{{ bin_dir }}/kubectl apply -f {{ base_dir }}/manifests/storage/nfs/nfs-client-provisioner.yaml" | ||
when: 'storage_type == "nfs"' | ||
|
||
- block: | ||
- name: 准备部署alicloud-nas动态存储 | ||
template: | ||
src: alicloud-nas/alicloud-nas.yaml.j2 | ||
dest: "{{ base_dir }}/manifests/storage/alicloud-nas/alicloud-nas.yaml" | ||
- name: 开始部署alicloud-disk存储 | ||
shell: "{{ bin_dir }}/kubectl apply -f {{ base_dir }}/manifests/storage/alicloud-nas/alicloud-disk.yaml" | ||
- name: 开始部署alicloud-nas动态存储 | ||
shell: "{{ bin_dir }}/kubectl apply -f {{ base_dir }}/manifests/storage/alicloud-nas/alicloud-nas.yaml" | ||
when: 'storage_type == "alicloud-nas"' | ||
|
||
- block: | ||
- name: 准备部署动态存储类 | ||
template: | ||
src: dynamic-storageclass.yaml.j2 | ||
dest: "{{ base_dir }}/manifests/storage/dynamic-storageclass.yaml" | ||
- name: 开始部署动态存储类 | ||
shell: "{{ bin_dir }}/kubectl apply -f {{ base_dir }}/manifests/storage/dynamic-storageclass.yaml" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ates/storage/dynamic-storageclass.yaml.j2 → ...ge/templates/dynamic-storageclass.yaml.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
apiVersion: storage.k8s.io/v1 | ||
kind: StorageClass | ||
metadata: | ||
name: {{ STORAGE_CLASS_NAME }} | ||
name: {{ storage_class_name }} | ||
provisioner: prov |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters