Skip to content

Commit 0b3def3

Browse files
committed
add manifests for the aws-fsx-csi-driver
1 parent cee2bd9 commit 0b3def3

File tree

4 files changed

+380
-0
lines changed

4 files changed

+380
-0
lines changed
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
# Source: aws-fsx-csi-driver/templates/controller-deployment.yaml
2+
apiVersion: apps/v1
3+
kind: Deployment
4+
metadata:
5+
name: fsx-csi-controller
6+
labels:
7+
application: kubernetes
8+
component: aws-fsx-csi-driver
9+
spec:
10+
replicas: 2
11+
selector:
12+
matchLabels:
13+
deployment: fsx-csi-controller
14+
template:
15+
metadata:
16+
labels:
17+
deployment: fsx-csi-controller
18+
application: kubernetes
19+
component: aws-fsx-csi-driver
20+
spec:
21+
nodeSelector:
22+
kubernetes.io/os: linux
23+
serviceAccountName: fsx-csi-controller-sa
24+
priorityClassName: system-cluster-critical
25+
tolerations:
26+
- key: CriticalAddonsOnly
27+
operator: Exists
28+
- effect: NoExecute
29+
operator: Exists
30+
tolerationSeconds: 300
31+
containers:
32+
- name: fsx-plugin
33+
image: container-registry.zalando.net/teapot/aws-fsx-csi-driver:v1.3.0-master-25
34+
imagePullPolicy: IfNotPresent
35+
args:
36+
- --mode=controller
37+
- --endpoint=$(CSI_ENDPOINT)
38+
- --logging-format=text
39+
- --v=2
40+
env:
41+
- name: CSI_ENDPOINT
42+
value: unix:///var/lib/csi/sockets/pluginproxy/csi.sock
43+
- name: CSI_NODE_NAME
44+
valueFrom:
45+
fieldRef:
46+
fieldPath: spec.nodeName
47+
- name: AWS_ACCESS_KEY_ID
48+
valueFrom:
49+
secretKeyRef:
50+
name: aws-secret
51+
key: key_id
52+
optional: true
53+
- name: AWS_SECRET_ACCESS_KEY
54+
valueFrom:
55+
secretKeyRef:
56+
name: aws-secret
57+
key: access_key
58+
optional: true
59+
volumeMounts:
60+
- name: socket-dir
61+
mountPath: /var/lib/csi/sockets/pluginproxy/
62+
ports:
63+
- name: healthz
64+
containerPort: 9910
65+
protocol: TCP
66+
livenessProbe:
67+
httpGet:
68+
path: /healthz
69+
port: healthz
70+
initialDelaySeconds: 10
71+
timeoutSeconds: 3
72+
periodSeconds: 2
73+
failureThreshold: 5
74+
- name: csi-provisioner
75+
image: container-registry.zalando.net/teapot/external-provisioner:v5.1.0-eks-1-31-10-master-24
76+
args:
77+
- --csi-address=$(ADDRESS)
78+
- --v=2
79+
- --timeout=5m
80+
- --extra-create-metadata
81+
- --leader-election=true
82+
env:
83+
- name: ADDRESS
84+
value: /var/lib/csi/sockets/pluginproxy/csi.sock
85+
volumeMounts:
86+
- name: socket-dir
87+
mountPath: /var/lib/csi/sockets/pluginproxy/
88+
- name: csi-resizer
89+
image: container-registry.zalando.net/teapot/external-resizer:v1.12.0-eks-1-31-10-master-24
90+
args:
91+
- --csi-address=$(ADDRESS)
92+
- --v=2
93+
- --leader-election=true
94+
- --timeout=5m
95+
env:
96+
- name: ADDRESS
97+
value: /var/lib/csi/sockets/pluginproxy/csi.sock
98+
volumeMounts:
99+
- name: socket-dir
100+
mountPath: /var/lib/csi/sockets/pluginproxy/
101+
- name: liveness-probe
102+
image: container-registry.zalando.net/teapot/livenessprobe:v2.14.0-eks-1-31-10-master-24
103+
args:
104+
- --csi-address=/csi/csi.sock
105+
- --health-port=9910
106+
volumeMounts:
107+
- name: socket-dir
108+
mountPath: /csi
109+
volumes:
110+
- name: socket-dir
111+
emptyDir: {}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Source: aws-fsx-csi-driver/templates/csidriver.yaml
2+
apiVersion: storage.k8s.io/v1
3+
kind: CSIDriver
4+
metadata:
5+
name: fsx.csi.aws.com
6+
spec:
7+
attachRequired: false
8+
fsGroupPolicy: ReadWriteOnceWithFSType
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
# Source: aws-fsx-csi-driver/templates/node-daemonset.yaml
2+
apiVersion: apps/v1
3+
kind: DaemonSet
4+
metadata:
5+
name: fsx-csi-node
6+
labels:
7+
application: kubernetes
8+
component: aws-fsx-csi-driver
9+
spec:
10+
selector:
11+
matchLabels:
12+
app: fsx-csi-node
13+
application: kubernetes
14+
component: aws-fsx-csi-driver
15+
template:
16+
metadata:
17+
labels:
18+
app: fsx-csi-node
19+
application: kubernetes
20+
component: aws-fsx-csi-driver
21+
spec:
22+
nodeSelector:
23+
kubernetes.io/os: linux
24+
dnsPolicy: ClusterFirst
25+
serviceAccountName: fsx-csi-node-sa
26+
priorityClassName: system-node-critical
27+
tolerations:
28+
- operator: Exists
29+
affinity:
30+
nodeAffinity:
31+
requiredDuringSchedulingIgnoredDuringExecution:
32+
nodeSelectorTerms:
33+
- matchExpressions:
34+
- key: eks.amazonaws.com/compute-type
35+
operator: NotIn
36+
values:
37+
- fargate
38+
containers:
39+
- name: fsx-plugin
40+
securityContext:
41+
privileged: true
42+
image: container-registry.zalando.net/teapot/aws-fsx-csi-driver:v1.3.0-master-25
43+
imagePullPolicy: IfNotPresent
44+
args:
45+
- --mode=node
46+
- --endpoint=$(CSI_ENDPOINT)
47+
- --logging-format=text
48+
- --v=2
49+
env:
50+
- name: CSI_ENDPOINT
51+
value: unix:/csi/csi.sock
52+
- name: CSI_NODE_NAME
53+
valueFrom:
54+
fieldRef:
55+
fieldPath: spec.nodeName
56+
volumeMounts:
57+
- name: kubelet-dir
58+
mountPath: /var/lib/kubelet
59+
mountPropagation: "Bidirectional"
60+
- name: plugin-dir
61+
mountPath: /csi
62+
ports:
63+
- name: healthz
64+
containerPort: 9810
65+
protocol: TCP
66+
livenessProbe:
67+
httpGet:
68+
path: /healthz
69+
port: healthz
70+
initialDelaySeconds: 10
71+
timeoutSeconds: 3
72+
periodSeconds: 2
73+
failureThreshold: 5
74+
- name: node-driver-registrar
75+
image: container-registry.zalando.net/teapot/node-driver-registrar:v2.12.0-eks-1-31-10-master-24
76+
imagePullPolicy: IfNotPresent
77+
args:
78+
- --csi-address=$(ADDRESS)
79+
- --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)
80+
- --v=2
81+
env:
82+
- name: ADDRESS
83+
value: /csi/csi.sock
84+
- name: DRIVER_REG_SOCK_PATH
85+
value: /var/lib/kubelet/plugins/fsx.csi.aws.com/csi.sock
86+
- name: KUBE_NODE_NAME
87+
valueFrom:
88+
fieldRef:
89+
fieldPath: spec.nodeName
90+
volumeMounts:
91+
- name: plugin-dir
92+
mountPath: /csi
93+
- name: registration-dir
94+
mountPath: /registration
95+
- name: liveness-probe
96+
image: container-registry.zalando.net/teapot/livenessprobe:v2.14.0-eks-1-31-10-master-24
97+
imagePullPolicy: IfNotPresent
98+
args:
99+
- --csi-address=/csi/csi.sock
100+
- --health-port=9810
101+
volumeMounts:
102+
- mountPath: /csi
103+
name: plugin-dir
104+
volumes:
105+
- name: kubelet-dir
106+
hostPath:
107+
path: /var/lib/kubelet
108+
type: Directory
109+
- name: registration-dir
110+
hostPath:
111+
path: /var/lib/kubelet/plugins_registry/
112+
type: Directory
113+
- name: plugin-dir
114+
hostPath:
115+
path: /var/lib/kubelet/plugins/fsx.csi.aws.com/
116+
type: DirectoryOrCreate
Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
# Source: aws-fsx-csi-driver/templates/controller-serviceaccount.yaml
2+
apiVersion: v1
3+
kind: ServiceAccount
4+
metadata:
5+
name: fsx-csi-controller-sa
6+
labels:
7+
application: kubernetes
8+
component: aws-fsx-csi-driver
9+
---
10+
# Source: aws-fsx-csi-driver/templates/node-serviceaccount.yaml
11+
apiVersion: v1
12+
kind: ServiceAccount
13+
metadata:
14+
name: fsx-csi-node-sa
15+
labels:
16+
application: kubernetes
17+
component: aws-fsx-csi-driver
18+
---
19+
# Source: aws-fsx-csi-driver/templates/clusterrole-csi-node.yaml
20+
kind: ClusterRole
21+
apiVersion: rbac.authorization.k8s.io/v1
22+
metadata:
23+
name: fsx-csi-node-role
24+
labels:
25+
application: kubernetes
26+
component: aws-fsx-csi-driver
27+
rules:
28+
- apiGroups: [""]
29+
resources: ["nodes"]
30+
verbs: ["get", "patch"]
31+
---
32+
# Source: aws-fsx-csi-driver/templates/controller-serviceaccount.yaml
33+
kind: ClusterRole
34+
apiVersion: rbac.authorization.k8s.io/v1
35+
metadata:
36+
name: fsx-csi-external-provisioner-role
37+
labels:
38+
application: kubernetes
39+
component: aws-fsx-csi-driver
40+
rules:
41+
- apiGroups: [""]
42+
resources: ["persistentvolumes"]
43+
verbs: ["get", "list", "watch", "create", "delete"]
44+
- apiGroups: [""]
45+
resources: ["persistentvolumeclaims"]
46+
verbs: ["get", "list", "watch", "update"]
47+
- apiGroups: ["storage.k8s.io"]
48+
resources: ["storageclasses"]
49+
verbs: ["get", "list", "watch"]
50+
- apiGroups: [""]
51+
resources: ["events"]
52+
verbs: ["list", "watch", "create", "update", "patch"]
53+
- apiGroups: ["storage.k8s.io"]
54+
resources: ["csinodes"]
55+
verbs: ["get", "list", "watch"]
56+
- apiGroups: [""]
57+
resources: ["nodes"]
58+
verbs: ["get", "list", "watch"]
59+
- apiGroups: ["coordination.k8s.io"]
60+
resources: ["leases"]
61+
verbs: ["get", "watch", "list", "delete", "update", "create"]
62+
---
63+
# Source: aws-fsx-csi-driver/templates/controller-serviceaccount.yaml
64+
kind: ClusterRole
65+
apiVersion: rbac.authorization.k8s.io/v1
66+
metadata:
67+
name: fsx-external-resizer-role
68+
labels:
69+
application: kubernetes
70+
component: aws-fsx-csi-driver
71+
rules:
72+
# The following rule should be uncommented for plugins that require secrets
73+
# for provisioning.
74+
# - apiGroups: [""]
75+
# resources: ["secrets"]
76+
# verbs: ["get", "list", "watch"]
77+
- apiGroups: [ "" ]
78+
resources: [ "persistentvolumes" ]
79+
verbs: [ "get", "list", "watch", "update", "patch" ]
80+
- apiGroups: [ "" ]
81+
resources: [ "persistentvolumeclaims" ]
82+
verbs: [ "get", "list", "watch" ]
83+
- apiGroups: [ "" ]
84+
resources: [ "persistentvolumeclaims/status" ]
85+
verbs: [ "update", "patch" ]
86+
- apiGroups: [ "storage.k8s.io" ]
87+
resources: [ "storageclasses" ]
88+
verbs: [ "get", "list", "watch" ]
89+
- apiGroups: [ "" ]
90+
resources: [ "events" ]
91+
verbs: [ "list", "watch", "create", "update", "patch" ]
92+
- apiGroups: [ "" ]
93+
resources: [ "pods" ]
94+
verbs: [ "get", "list", "watch" ]
95+
---
96+
# Source: aws-fsx-csi-driver/templates/clusterrolebinding-csi-node.yaml
97+
kind: ClusterRoleBinding
98+
apiVersion: rbac.authorization.k8s.io/v1
99+
metadata:
100+
name: fsx-csi-node-getter-binding
101+
labels:
102+
application: kubernetes
103+
component: aws-fsx-csi-driver
104+
subjects:
105+
- kind: ServiceAccount
106+
name: fsx-csi-node-sa
107+
namespace: default
108+
roleRef:
109+
kind: ClusterRole
110+
name: fsx-csi-node-role
111+
apiGroup: rbac.authorization.k8s.io
112+
---
113+
# Source: aws-fsx-csi-driver/templates/controller-serviceaccount.yaml
114+
kind: ClusterRoleBinding
115+
apiVersion: rbac.authorization.k8s.io/v1
116+
metadata:
117+
name: fsx-csi-external-provisioner-binding
118+
labels:
119+
application: kubernetes
120+
component: aws-fsx-csi-driver
121+
subjects:
122+
- kind: ServiceAccount
123+
name: fsx-csi-controller-sa
124+
namespace: default
125+
roleRef:
126+
kind: ClusterRole
127+
name: fsx-csi-external-provisioner-role
128+
apiGroup: rbac.authorization.k8s.io
129+
---
130+
# Source: aws-fsx-csi-driver/templates/controller-serviceaccount.yaml
131+
kind: ClusterRoleBinding
132+
apiVersion: rbac.authorization.k8s.io/v1
133+
metadata:
134+
name: fsx-csi-resizer-binding
135+
labels:
136+
application: kubernetes
137+
component: aws-fsx-csi-driver
138+
subjects:
139+
- kind: ServiceAccount
140+
name: fsx-csi-controller-sa
141+
namespace: default
142+
roleRef:
143+
kind: ClusterRole
144+
name: fsx-external-resizer-role
145+
apiGroup: rbac.authorization.k8s.io

0 commit comments

Comments
 (0)