mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-05-08 01:47:37 -02:30
AWS EBS CSI implementation (#5549)
* AWS EBS CSI implementation * Fixing image repos * Add OWNERS file * Fix expressions * Add csi-driver tag * Add AWS EBS prefix to variables * Add AWS EBS CSI Driver documentation
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
# See the OWNERS docs at https://go.k8s.io/owners
|
||||
|
||||
approvers:
|
||||
- alijahnas
|
||||
reviewers:
|
||||
@@ -0,0 +1,8 @@
|
||||
---
|
||||
# To restrict which AZ the volume should be provisioned in
|
||||
# set this value to true and set the list of relevant AZs
|
||||
# For it to work, the flag aws_ebs_csi_enable_volume_scheduling
|
||||
# in AWS EBS Driver must be true
|
||||
restrict_az_provisioning: false
|
||||
aws_ebs_availability_zones:
|
||||
- eu-west-3c
|
||||
@@ -0,0 +1,19 @@
|
||||
---
|
||||
- name: Kubernetes Persistent Volumes | Copy AWS EBS CSI Storage Class template
|
||||
template:
|
||||
src: "aws-ebs-csi-storage-class.yml.j2"
|
||||
dest: "{{ kube_config_dir }}/aws-ebs-csi-storage-class.yml"
|
||||
register: manifests
|
||||
when:
|
||||
- inventory_hostname == groups['kube-master'][0]
|
||||
|
||||
- name: Kubernetes Persistent Volumes | Add AWS EBS CSI Storage Class
|
||||
kube:
|
||||
name: aws-ebs-csi
|
||||
kubectl: "{{ bin_dir }}/kubectl"
|
||||
resource: StorageClass
|
||||
filename: "{{ kube_config_dir }}/aws-ebs-csi-storage-class.yml"
|
||||
state: "latest"
|
||||
when:
|
||||
- inventory_hostname == groups['kube-master'][0]
|
||||
- manifests.changed
|
||||
@@ -0,0 +1,18 @@
|
||||
kind: StorageClass
|
||||
apiVersion: storage.k8s.io/v1
|
||||
metadata:
|
||||
name: ebs-sc
|
||||
provisioner: ebs.csi.aws.com
|
||||
volumeBindingMode: WaitForFirstConsumer
|
||||
parameters:
|
||||
csi.storage.k8s.io/fstype: xfs
|
||||
type: gp2
|
||||
{% if restrict_az_provisioning %}
|
||||
allowedTopologies:
|
||||
- matchLabelExpressions:
|
||||
- key: topology.ebs.csi.aws.com/zone
|
||||
values:
|
||||
{% for value in aws_ebs_availability_zones %}
|
||||
- {{ value }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
@@ -13,3 +13,10 @@ dependencies:
|
||||
tags:
|
||||
- persistent_volumes_cinder_csi
|
||||
- cinder-csi-driver
|
||||
|
||||
- role: kubernetes-apps/persistent_volumes/aws-ebs-csi
|
||||
when:
|
||||
- aws_ebs_csi_enabled
|
||||
tags:
|
||||
- persistent_volumes_aws_ebs_csi
|
||||
- aws-ebs-csi-driver
|
||||
|
||||
Reference in New Issue
Block a user