-
Notifications
You must be signed in to change notification settings - Fork 554
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce Controller with Create and Delete Volume capability
- Loading branch information
Karthik
committed
Nov 3, 2020
1 parent
44eb94a
commit d7e43c8
Showing
24 changed files
with
2,626 additions
and
25 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
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,35 @@ | ||
--- | ||
kind: ClusterRole | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: efs-external-provisioner-role | ||
labels: | ||
app.kubernetes.io/name: aws-efs-csi-driver | ||
rules: | ||
- apiGroups: [""] | ||
resources: ["persistentvolumes"] | ||
verbs: ["get", "list", "watch", "create", "delete"] | ||
- apiGroups: [""] | ||
resources: ["persistentvolumeclaims"] | ||
verbs: ["get", "list", "watch", "update"] | ||
- apiGroups: ["storage.k8s.io"] | ||
resources: ["storageclasses"] | ||
verbs: ["get", "list", "watch"] | ||
- apiGroups: [""] | ||
resources: ["events"] | ||
verbs: ["list", "watch", "create", "update", "patch"] | ||
- apiGroups: ["snapshot.storage.k8s.io"] | ||
resources: ["volumesnapshots"] | ||
verbs: ["get", "list"] | ||
- apiGroups: ["snapshot.storage.k8s.io"] | ||
resources: ["volumesnapshotcontents"] | ||
verbs: ["get", "list"] | ||
- apiGroups: ["storage.k8s.io"] | ||
resources: ["csinodes"] | ||
verbs: ["get", "list", "watch"] | ||
- apiGroups: [""] | ||
resources: ["nodes"] | ||
verbs: ["get", "list", "watch"] | ||
- apiGroups: ["coordination.k8s.io"] | ||
resources: ["leases"] | ||
verbs: ["get", "watch", "list", "delete", "update", "create"] |
15 changes: 15 additions & 0 deletions
15
deploy/kubernetes/base/clusterrolebinding-provisioner.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
kind: ClusterRoleBinding | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: efs-csi-provisioner-binding | ||
labels: | ||
app.kubernetes.io/name: aws-efs-csi-driver | ||
subjects: | ||
- kind: ServiceAccount | ||
name: efs-csi-controller-sa | ||
namespace: kube-system | ||
roleRef: | ||
kind: ClusterRole | ||
name: efs-external-provisioner-role | ||
apiGroup: rbac.authorization.k8s.io |
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,77 @@ | ||
--- | ||
# Controller Service | ||
kind: Deployment | ||
apiVersion: apps/v1 | ||
metadata: | ||
name: efs-csi-controller | ||
namespace: kube-system | ||
labels: | ||
app.kubernetes.io/name: aws-efs-csi-driver | ||
spec: | ||
replicas: 2 | ||
selector: | ||
matchLabels: | ||
app: efs-csi-controller | ||
app.kubernetes.io/name: aws-efs-csi-driver | ||
template: | ||
metadata: | ||
labels: | ||
app: efs-csi-controller | ||
app.kubernetes.io/name: aws-efs-csi-driver | ||
spec: | ||
nodeSelector: | ||
kubernetes.io/os: linux | ||
serviceAccountName: efs-csi-controller-sa | ||
priorityClassName: system-cluster-critical | ||
tolerations: | ||
- operator: Exists | ||
containers: | ||
- name: efs-plugin | ||
image: amazon/aws-efs-csi-driver:latest | ||
imagePullPolicy: IfNotPresent | ||
args: | ||
- --endpoint=$(CSI_ENDPOINT) | ||
- --logtostderr | ||
- --v=5 | ||
env: | ||
- name: CSI_ENDPOINT | ||
value: unix:///var/lib/csi/sockets/pluginproxy/csi.sock | ||
volumeMounts: | ||
- name: socket-dir | ||
mountPath: /var/lib/csi/sockets/pluginproxy/ | ||
ports: | ||
- name: healthz | ||
containerPort: 9808 | ||
protocol: TCP | ||
livenessProbe: | ||
httpGet: | ||
path: /healthz | ||
port: healthz | ||
initialDelaySeconds: 10 | ||
timeoutSeconds: 3 | ||
periodSeconds: 10 | ||
failureThreshold: 5 | ||
- name: csi-provisioner | ||
image: quay.io/k8scsi/csi-provisioner:v1.6.0 | ||
args: | ||
- --csi-address=$(ADDRESS) | ||
- --v=5 | ||
- --feature-gates=Topology=true | ||
- --enable-leader-election | ||
- --leader-election-type=leases | ||
env: | ||
- name: ADDRESS | ||
value: /var/lib/csi/sockets/pluginproxy/csi.sock | ||
volumeMounts: | ||
- name: socket-dir | ||
mountPath: /var/lib/csi/sockets/pluginproxy/ | ||
- name: liveness-probe | ||
image: quay.io/k8scsi/livenessprobe:v1.1.0 | ||
args: | ||
- --csi-address=/csi/csi.sock | ||
volumeMounts: | ||
- name: socket-dir | ||
mountPath: /csi | ||
volumes: | ||
- name: socket-dir | ||
emptyDir: {} |
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 |
---|---|---|
|
@@ -5,4 +5,4 @@ kind: CSIDriver | |
metadata: | ||
name: efs.csi.aws.com | ||
spec: | ||
attachRequired: false | ||
attachRequired: false |
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,10 @@ | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: efs-csi-controller-sa | ||
namespace: kube-system | ||
labels: | ||
app.kubernetes.io/name: aws-efs-csi-driver | ||
#Enable if EKS IAM for SA is used | ||
#annotations: | ||
# eks.amazonaws.com/role-arn: arn:aws:iam::111122223333:role/efs-csi-role |
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
Oops, something went wrong.