kubeasz/roles/cluster-storage/templates/alicloud-nas/alicloud-nas.yaml.j2

59 lines
1.5 KiB
Plaintext
Raw Normal View History

2018-07-20 10:55:03 +08:00
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
2018-07-28 11:50:39 +08:00
name: {{ aliyun_nas_storage_class }}
2018-07-20 10:55:03 +08:00
provisioner: alicloud/nas
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: alicloud-nas-controller
namespace: kube-system
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
name: run-alicloud-nas-controller
subjects:
- kind: ServiceAccount
name: alicloud-nas-controller
namespace: kube-system
roleRef:
kind: ClusterRole
name: alicloud-disk-controller-runner
apiGroup: rbac.authorization.k8s.io
---
kind: Deployment
apiVersion: apps/v1beta1
metadata:
2018-07-28 11:50:39 +08:00
name: {{ aliyun_nas_controller_name }}
2018-07-20 10:55:03 +08:00
namespace: kube-system
spec:
replicas: 1
strategy:
type: Recreate
template:
metadata:
labels:
2018-07-28 11:50:39 +08:00
app: {{ aliyun_nas_controller_name }}
2018-07-20 10:55:03 +08:00
spec:
serviceAccount: alicloud-nas-controller
containers:
- name: alicloud-nas-controller
image: registry.cn-hangzhou.aliyuncs.com/acs/alicloud-nas-controller:v1.8.4
volumeMounts:
- mountPath: /persistentvolumes
name: nfs-client-root
env:
- name: PROVISIONER_NAME
value: alicloud/nas
- name: NFS_SERVER
2018-07-28 11:50:39 +08:00
value: {{ aliyun_nas_server }}
2018-07-20 10:55:03 +08:00
- name: NFS_PATH
2018-07-28 11:50:39 +08:00
value: {{ aliyun_nas_server_path }}
2018-07-20 10:55:03 +08:00
volumes:
- name: nfs-client-root
nfs:
2018-07-28 11:50:39 +08:00
server: {{ aliyun_nas_server }}
path: {{ aliyun_nas_server_path }}