Skip to content

Commit 85a950e

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

File tree

4 files changed

+384
-0
lines changed

4 files changed

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

0 commit comments

Comments
 (0)