forked from kubernetes-csi/external-provisioner
-
Notifications
You must be signed in to change notification settings - Fork 0
/
storage-capacity.yaml
57 lines (56 loc) · 1.63 KB
/
storage-capacity.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# This YAML file demonstrates how to enable the
# storage capacity feature when deploying the
# external provisioner, in this example together
# with the mock CSI driver.
#
# It depends on the RBAC definitions from rbac.yaml.
---
kind: Deployment
apiVersion: apps/v1
metadata:
name: csi-provisioner
spec:
replicas: 3
selector:
matchLabels:
app: csi-provisioner
template:
metadata:
labels:
app: csi-provisioner
spec:
serviceAccount: csi-provisioner
containers:
- name: csi-provisioner
image: registry.k8s.io/sig-storage/csi-provisioner:v3.3.0
args:
- "--csi-address=$(ADDRESS)"
- "--leader-election"
- "--enable-capacity"
- "--capacity-ownerref-level=2"
env:
- name: ADDRESS
value: /var/lib/csi/sockets/pluginproxy/mock.socket
- name: NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
imagePullPolicy: "IfNotPresent"
volumeMounts:
- name: socket-dir
mountPath: /var/lib/csi/sockets/pluginproxy/
- name: mock-driver
image: quay.io/k8scsi/mock-driver:canary
env:
- name: CSI_ENDPOINT
value: /var/lib/csi/sockets/pluginproxy/mock.socket
volumeMounts:
- name: socket-dir
mountPath: /var/lib/csi/sockets/pluginproxy/
volumes:
- name: socket-dir
emptyDir: