forked from openshift-examples/web
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontroller-infra.yaml
More file actions
174 lines (174 loc) Β· 5.72 KB
/
controller-infra.yaml
File metadata and controls
174 lines (174 loc) Β· 5.72 KB
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
kind: Deployment
apiVersion: apps/v1
metadata:
name: kubevirt-csi-controller
# namespace: kubevirt-csi-driver
labels:
app: kubevirt-csi-driver
spec:
replicas: 1
selector:
matchLabels:
app: kubevirt-csi-driver
template:
metadata:
labels:
app: kubevirt-csi-driver
spec:
enableServiceLinks: false
serviceAccount: kubevirt-csi
priorityClassName: system-cluster-critical
nodeSelector:
node-role.kubernetes.io/control-plane: ""
tolerations:
- key: CriticalAddonsOnly
operator: Exists
- key: node-role.kubernetes.io/master
operator: Exists
effect: "NoSchedule"
containers:
- name: csi-driver
imagePullPolicy: Always
image: quay.io/kubevirt/kubevirt-csi-driver:latest
args:
- "--endpoint=$(CSI_ENDPOINT)"
- "--infra-cluster-namespace=$(INFRACLUSTER_NAMESPACE)"
- "--infra-cluster-labels=$(INFRACLUSTER_LABELS)"
- "--tenant-cluster-kubeconfig=/var/run/secrets/tenantcluster/value"
- "--run-node-service=false"
- "--run-controller-service=true"
- "--v=5"
ports:
- name: healthz
containerPort: 10301
protocol: TCP
env:
- name: CSI_ENDPOINT
value: unix:///var/lib/csi/sockets/pluginproxy/csi.sock
- name: KUBE_NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: INFRACLUSTER_NAMESPACE
valueFrom:
configMapKeyRef:
name: driver-config
key: infraClusterNamespace
- name: INFRACLUSTER_LABELS
valueFrom:
configMapKeyRef:
name: driver-config
key: infraClusterLabels
- name: INFRA_STORAGE_CLASS_ENFORCEMENT
valueFrom:
configMapKeyRef:
name: driver-config
key: infraStorageClassEnforcement
optional: true
volumeMounts:
- name: socket-dir
mountPath: /var/lib/csi/sockets/pluginproxy/
- name: tenantcluster
mountPath: "/var/run/secrets/tenantcluster"
resources:
requests:
memory: 50Mi
cpu: 10m
- name: csi-provisioner
image: quay.io/openshift/origin-csi-external-provisioner:latest
args:
- "--csi-address=$(ADDRESS)"
- "--default-fstype=ext4"
- "--kubeconfig=/var/run/secrets/tenantcluster/value"
- "--v=5"
- "--timeout=3m"
- "--retry-interval-max=1m"
env:
- name: ADDRESS
value: /var/lib/csi/sockets/pluginproxy/csi.sock
volumeMounts:
- name: socket-dir
mountPath: /var/lib/csi/sockets/pluginproxy/
- name: tenantcluster
mountPath: "/var/run/secrets/tenantcluster"
- name: csi-attacher
image: quay.io/openshift/origin-csi-external-attacher:latest
args:
- "--csi-address=$(ADDRESS)"
- "--kubeconfig=/var/run/secrets/tenantcluster/value"
- "--v=5"
- "--timeout=3m"
- "--retry-interval-max=1m"
env:
- name: ADDRESS
value: /var/lib/csi/sockets/pluginproxy/csi.sock
volumeMounts:
- name: socket-dir
mountPath: /var/lib/csi/sockets/pluginproxy/
- name: tenantcluster
mountPath: "/var/run/secrets/tenantcluster"
resources:
requests:
memory: 50Mi
cpu: 10m
- name: csi-liveness-probe
image: quay.io/openshift/origin-csi-livenessprobe:latest
args:
- "--csi-address=/csi/csi.sock"
- "--probe-timeout=3s"
- "--health-port=10301"
volumeMounts:
- name: socket-dir
mountPath: /csi
- name: tenantcluster
mountPath: "/var/run/secrets/tenantcluster"
resources:
requests:
memory: 50Mi
cpu: 10m
- name: csi-snapshotter
args:
- "--v=5"
- "--csi-address=/csi/csi.sock"
- "--kubeconfig=/var/run/secrets/tenantcluster/value"
- "--timeout=3m"
image: k8s.gcr.io/sig-storage/csi-snapshotter:v4.2.1
imagePullPolicy: IfNotPresent
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /csi
name: socket-dir
- name: tenantcluster
mountPath: "/var/run/secrets/tenantcluster"
resources:
requests:
memory: 20Mi
cpu: 10m
- name: csi-resizer
image: registry.k8s.io/sig-storage/csi-resizer:v1.13.1
args:
- "-csi-address=/csi/csi.sock"
- "-kubeconfig=/var/run/secrets/tenantcluster/value"
- "-v=5"
- "-timeout=3m"
- '-handle-volume-inuse-error=false'
volumeMounts:
- name: socket-dir
mountPath: /csi
- name: tenantcluster
mountPath: "/var/run/secrets/tenantcluster"
resources:
requests:
cpu: 10m
memory: 20Mi
securityContext:
capabilities:
drop:
- ALL
volumes:
- name: socket-dir
emptyDir: {}
- name: tenantcluster
secret:
secretName: kvcluster-kubeconfig