Skip to content

Commit efd6457

Browse files
committed
change the deploy file to fit external-health-monitor
1 parent fd96151 commit efd6457

File tree

3 files changed

+48
-2
lines changed

3 files changed

+48
-2
lines changed

deploy/kubernetes-1.17/hostpath/csi-hostpath-plugin.yaml

+14-1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ spec:
3434
labels:
3535
app: csi-hostpathplugin
3636
spec:
37+
serviceAccount: csi-external-health-monitor-controller
3738
containers:
3839
- name: node-driver-registrar
3940
image: k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.0.1
@@ -59,7 +60,19 @@ spec:
5960
name: registration-dir
6061
- mountPath: /csi-data-dir
6162
name: csi-data-dir
62-
63+
- name: csi-external-health-monitor-controller
64+
image: k8s.gcr.io/sig-storage/csi-external-health-monitor-controller:v0.1.0
65+
args:
66+
- "--v=5"
67+
- "--csi-address=$(ADDRESS)"
68+
- "--leader-election"
69+
env:
70+
- name: ADDRESS
71+
value: /csi/csi.sock
72+
imagePullPolicy: "IfNotPresent"
73+
volumeMounts:
74+
- name: socket-dir
75+
mountPath: /csi
6376
- name: hostpath
6477
image: k8s.gcr.io/sig-storage/hostpathplugin:v1.4.0
6578
args:

deploy/kubernetes-1.18/hostpath/csi-hostpath-plugin.yaml

+31
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ spec:
3434
labels:
3535
app: csi-hostpathplugin
3636
spec:
37+
serviceAccount: csi-external-health-monitor-controller
3738
containers:
3839
- name: node-driver-registrar
3940
image: k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.0.1
@@ -60,6 +61,36 @@ spec:
6061
- mountPath: /csi-data-dir
6162
name: csi-data-dir
6263

64+
- name: csi-external-health-monitor-agent
65+
image: k8s.gcr.io/sig-storage/csi-external-health-monitor-agent:v0.1.0
66+
args:
67+
- "--v=5"
68+
- "--csi-address=$(ADDRESS)"
69+
env:
70+
- name: NODE_NAME
71+
valueFrom:
72+
fieldRef:
73+
fieldPath: spec.nodeName
74+
- name: ADDRESS
75+
value: /csi/csi.sock
76+
imagePullPolicy: "IfNotPresent"
77+
volumeMounts:
78+
- name: socket-dir
79+
mountPath: /csi
80+
- name: csi-external-health-monitor-controller
81+
image: k8s.gcr.io/sig-storage/csi-external-health-monitor-controller:v0.1.0
82+
args:
83+
- "--v=5"
84+
- "--csi-address=$(ADDRESS)"
85+
- "--leader-election"
86+
- "--list-volumes-interval=1m"
87+
env:
88+
- name: ADDRESS
89+
value: /csi/csi.sock
90+
imagePullPolicy: "IfNotPresent"
91+
volumeMounts:
92+
- name: socket-dir
93+
mountPath: /csi
6394
- name: hostpath
6495
image: k8s.gcr.io/sig-storage/hostpathplugin:v1.4.0
6596
args:

deploy/util/deploy-hostpath.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,8 @@ if version_gt $(rbac_version "${BASE_DIR}/hostpath/csi-hostpath-snapshotter.yaml
116116
SNAPSHOTTER_RBAC_RELATIVE_PATH="csi-snapshotter/rbac-csi-snapshotter.yaml"
117117
fi
118118

119+
CSI_EXTERNAL_HEALTH_MONITOR_RBAC_YAML="https://raw.githubusercontent.com/kubernetes-csi/external-health-monitor/$(rbac_version "${BASE_DIR}/hostpath/csi-hostpath-plugin.yaml" csi-external-health-monitor-controller false)/deploy/kubernetes/external-health-monitor-controller/rbac.yaml"
120+
: ${CSI_EXTERNAL_HEALTH_MONITOR_RBAC:=https://raw.githubusercontent.com/kubernetes-csi/external-health-monitor/$(rbac_version "${BASE_DIR}/hostpath/csi-hostpath-plugin.yaml" csi-external-health-monitor-controller "${UPDATE_RBAC_RULES}")/deploy/kubernetes/external-health-monitor-controller/rbac.yaml}
119121
CSI_PROVISIONER_RBAC_YAML="https://raw.githubusercontent.com/kubernetes-csi/external-provisioner/$(rbac_version "${BASE_DIR}/hostpath/csi-hostpath-provisioner.yaml" csi-provisioner false)/deploy/kubernetes/rbac.yaml"
120122
: ${CSI_PROVISIONER_RBAC:=https://raw.githubusercontent.com/kubernetes-csi/external-provisioner/$(rbac_version "${BASE_DIR}/hostpath/csi-hostpath-provisioner.yaml" csi-provisioner "${UPDATE_RBAC_RULES}")/deploy/kubernetes/rbac.yaml}
121123
CSI_ATTACHER_RBAC_YAML="https://raw.githubusercontent.com/kubernetes-csi/external-attacher/$(rbac_version "${BASE_DIR}/hostpath/csi-hostpath-attacher.yaml" csi-attacher false)/deploy/kubernetes/rbac.yaml"
@@ -140,7 +142,7 @@ run () {
140142

141143
# rbac rules
142144
echo "applying RBAC rules"
143-
for component in CSI_PROVISIONER CSI_ATTACHER CSI_SNAPSHOTTER CSI_RESIZER; do
145+
for component in CSI_PROVISIONER CSI_ATTACHER CSI_SNAPSHOTTER CSI_RESIZER CSI_EXTERNAL_HEALTH_MONITOR; do
144146
eval current="\${${component}_RBAC}"
145147
eval original="\${${component}_RBAC_YAML}"
146148
if [ "$current" != "$original" ]; then

0 commit comments

Comments
 (0)