Skip to content

Commit aa19fd2

Browse files
committed
cleanup: remove deprecated liveness driver and metrics
Signed-off-by: Rohan Satkar <[email protected]>
1 parent fb4fb8f commit aa19fd2

File tree

18 files changed

+6
-370
lines changed

18 files changed

+6
-370
lines changed

api/deploy/ocp/scc.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ allowHostDirVolumePlugin: true
1212
priority:
1313
# SYS_ADMIN is needed for rbd to execute rbd map command
1414
allowedCapabilities: ["SYS_ADMIN"]
15-
# Needed as we run liveness container on daemonset pods
16-
allowHostPorts: true
1715
# Needed as we are setting this in RBD plugin pod
1816
allowHostPID: true
1917
# Required for encryption

charts/ceph-csi-cephfs/templates/nodeplugin-daemonset.yaml

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -166,37 +166,6 @@ spec:
166166
mountPath: /registration
167167
resources:
168168
{{ toYaml .Values.nodeplugin.registrar.resources | indent 12 }}
169-
{{- if .Values.nodeplugin.httpMetrics.enabled }}
170-
- name: liveness-prometheus
171-
securityContext:
172-
privileged: true
173-
allowPrivilegeEscalation: true
174-
image: "{{ .Values.nodeplugin.plugin.image.repository }}:{{ .Values.nodeplugin.plugin.image.tag }}"
175-
imagePullPolicy: {{ .Values.nodeplugin.plugin.image.pullPolicy }}
176-
args:
177-
- "--type=liveness"
178-
- "--endpoint=$(CSI_ENDPOINT)"
179-
- "--metricsport={{ .Values.nodeplugin.httpMetrics.containerPort }}"
180-
- "--metricspath=/metrics"
181-
- "--polltime=60s"
182-
- "--timeout=3s"
183-
env:
184-
- name: CSI_ENDPOINT
185-
value: "unix:///csi/{{ .Values.pluginSocketFile }}"
186-
- name: POD_IP
187-
valueFrom:
188-
fieldRef:
189-
fieldPath: status.podIP
190-
ports:
191-
- containerPort: {{ .Values.nodeplugin.httpMetrics.containerPort }}
192-
name: metrics
193-
protocol: TCP
194-
volumeMounts:
195-
- name: socket-dir
196-
mountPath: /csi
197-
resources:
198-
{{ toYaml .Values.nodeplugin.plugin.resources | indent 12 }}
199-
{{- end }}
200169
volumes:
201170
- name: socket-dir
202171
hostPath:

charts/ceph-csi-cephfs/templates/provisioner-deployment.yaml

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -283,34 +283,6 @@ spec:
283283
mountPath: /csi
284284
resources:
285285
{{ toYaml .Values.provisioner.resizer.resources | indent 12 }}
286-
{{- end }}
287-
{{- if .Values.provisioner.httpMetrics.enabled }}
288-
- name: liveness-prometheus
289-
image: "{{ .Values.nodeplugin.plugin.image.repository }}:{{ .Values.nodeplugin.plugin.image.tag }}"
290-
imagePullPolicy: {{ .Values.nodeplugin.plugin.image.pullPolicy }}
291-
args:
292-
- "--type=liveness"
293-
- "--endpoint=$(CSI_ENDPOINT)"
294-
- "--metricsport={{ .Values.provisioner.httpMetrics.containerPort }}"
295-
- "--metricspath=/metrics"
296-
- "--polltime=60s"
297-
- "--timeout=3s"
298-
env:
299-
- name: CSI_ENDPOINT
300-
value: "unix:///csi/{{ .Values.provisionerSocketFile }}"
301-
- name: POD_IP
302-
valueFrom:
303-
fieldRef:
304-
fieldPath: status.podIP
305-
ports:
306-
- containerPort: {{ .Values.provisioner.httpMetrics.containerPort }}
307-
name: metrics
308-
protocol: TCP
309-
volumeMounts:
310-
- name: socket-dir
311-
mountPath: /csi
312-
resources:
313-
{{ toYaml .Values.nodeplugin.plugin.resources | indent 12 }}
314286
{{- end }}
315287
volumes:
316288
- name: socket-dir

charts/ceph-csi-rbd/templates/nodeplugin-daemonset.yaml

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -171,37 +171,6 @@ spec:
171171
mountPath: /registration
172172
resources:
173173
{{ toYaml .Values.nodeplugin.registrar.resources | indent 12 }}
174-
{{- if .Values.nodeplugin.httpMetrics.enabled }}
175-
- name: liveness-prometheus
176-
securityContext:
177-
privileged: true
178-
allowPrivilegeEscalation: true
179-
image: "{{ .Values.nodeplugin.plugin.image.repository }}:{{ .Values.nodeplugin.plugin.image.tag }}"
180-
imagePullPolicy: {{ .Values.nodeplugin.plugin.image.pullPolicy }}
181-
args:
182-
- "--type=liveness"
183-
- "--endpoint=$(CSI_ENDPOINT)"
184-
- "--metricsport={{ .Values.nodeplugin.httpMetrics.containerPort }}"
185-
- "--metricspath=/metrics"
186-
- "--polltime=60s"
187-
- "--timeout=3s"
188-
env:
189-
- name: CSI_ENDPOINT
190-
value: "unix:///csi/{{ .Values.pluginSocketFile }}"
191-
- name: POD_IP
192-
valueFrom:
193-
fieldRef:
194-
fieldPath: status.podIP
195-
ports:
196-
- containerPort: {{ .Values.nodeplugin.httpMetrics.containerPort }}
197-
name: metrics
198-
protocol: TCP
199-
volumeMounts:
200-
- name: socket-dir
201-
mountPath: /csi
202-
resources:
203-
{{ toYaml .Values.nodeplugin.plugin.resources | indent 12 }}
204-
{{- end }}
205174
volumes:
206175
- name: socket-dir
207176
hostPath:

charts/ceph-csi-rbd/templates/provisioner-deployment.yaml

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -329,34 +329,6 @@ spec:
329329
mountPath: /etc/ceph/
330330
resources:
331331
{{ toYaml .Values.nodeplugin.plugin.resources | indent 12 }}
332-
{{- end }}
333-
{{- if .Values.provisioner.httpMetrics.enabled }}
334-
- name: liveness-prometheus
335-
image: "{{ .Values.nodeplugin.plugin.image.repository }}:{{ .Values.nodeplugin.plugin.image.tag }}"
336-
imagePullPolicy: {{ .Values.nodeplugin.plugin.image.pullPolicy }}
337-
args:
338-
- "--type=liveness"
339-
- "--endpoint=$(CSI_ENDPOINT)"
340-
- "--metricsport={{ .Values.provisioner.httpMetrics.containerPort }}"
341-
- "--metricspath=/metrics"
342-
- "--polltime=60s"
343-
- "--timeout=3s"
344-
env:
345-
- name: CSI_ENDPOINT
346-
value: "unix:///csi/{{ .Values.provisionerSocketFile }}"
347-
- name: POD_IP
348-
valueFrom:
349-
fieldRef:
350-
fieldPath: status.podIP
351-
ports:
352-
- containerPort: {{ .Values.provisioner.httpMetrics.containerPort }}
353-
name: metrics
354-
protocol: TCP
355-
volumeMounts:
356-
- name: socket-dir
357-
mountPath: /csi
358-
resources:
359-
{{ toYaml .Values.nodeplugin.plugin.resources | indent 12 }}
360332
{{- end }}
361333
volumes:
362334
- name: socket-dir

cmd/cephcsi.go

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ import (
3131
"github.com/ceph/ceph-csi/internal/controller"
3232
"github.com/ceph/ceph-csi/internal/controller/persistentvolume"
3333
"github.com/ceph/ceph-csi/internal/controller/volumegroup"
34-
"github.com/ceph/ceph-csi/internal/liveness"
3534
nfsdriver "github.com/ceph/ceph-csi/internal/nfs/driver"
3635
nvmeofdriver "github.com/ceph/ceph-csi/internal/nvmeof/driver"
3736
rbddriver "github.com/ceph/ceph-csi/internal/rbd/driver"
@@ -45,7 +44,6 @@ const (
4544
cephFSDefaultName = "cephfs.csi.ceph.com"
4645
nfsDefaultName = "nfs.csi.ceph.com"
4746
nvmeofDefaultName = "nvmeof.csi.ceph.com"
48-
livenessDefaultName = "liveness.csi.ceph.com"
4947

5048
pollTime = 60 // seconds
5149
probeTimeout = 3 // seconds
@@ -61,7 +59,7 @@ var conf util.Config
6159

6260
func init() {
6361
// common flags
64-
flag.StringVar(&conf.Vtype, "type", "", "driver type [rbd|cephfs|nfs|nvmeof|liveness|controller]")
62+
flag.StringVar(&conf.Vtype, "type", "", "driver type [rbd|cephfs|nfs|nvmeof|controller]")
6563
flag.StringVar(&conf.Endpoint, "endpoint", "unix:///tmp/csi.sock", "CSI endpoint")
6664
flag.StringVar(&conf.DriverName, "drivername", "", "name of the driver")
6765
flag.StringVar(&conf.DriverNamespace, "drivernamespace", defaultNS, "namespace in which driver is deployed")
@@ -181,8 +179,6 @@ func getDriverName() string {
181179
return nfsDefaultName
182180
case util.NVMeoFType:
183181
return nvmeofDefaultName
184-
case util.LivenessType:
185-
return livenessDefaultName
186182
default:
187183
return ""
188184
}
@@ -227,7 +223,7 @@ func main() {
227223
// set the PID limit (for native Ceph threads) after conf.AutoMaxProcs
228224
setPIDLimit(&conf)
229225

230-
if conf.EnableProfiling || conf.Vtype == util.LivenessType {
226+
if conf.EnableProfiling {
231227
// validate metrics endpoint
232228
conf.MetricsIP = os.Getenv("POD_IP")
233229

@@ -264,8 +260,6 @@ func main() {
264260
case util.NVMeoFType:
265261
driver := nvmeofdriver.NewDriver()
266262
driver.Run(&conf)
267-
case util.LivenessType:
268-
liveness.Run(&conf)
269263

270264
case util.ControllerType:
271265
cfg := controller.Config{

deploy/cephfs/kubernetes/csi-cephfsplugin-provisioner.yaml

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -193,30 +193,6 @@ spec:
193193
volumeMounts:
194194
- name: socket-dir
195195
mountPath: /csi
196-
- name: liveness-prometheus
197-
image: quay.io/cephcsi/cephcsi:canary
198-
args:
199-
- "--type=liveness"
200-
- "--endpoint=$(CSI_ENDPOINT)"
201-
- "--metricsport=8681"
202-
- "--metricspath=/metrics"
203-
- "--polltime=60s"
204-
- "--timeout=3s"
205-
env:
206-
- name: CSI_ENDPOINT
207-
value: unix:///csi/csi-provisioner.sock
208-
- name: POD_IP
209-
valueFrom:
210-
fieldRef:
211-
fieldPath: status.podIP
212-
ports:
213-
- containerPort: 8681
214-
name: http-metrics
215-
protocol: TCP
216-
volumeMounts:
217-
- name: socket-dir
218-
mountPath: /csi
219-
imagePullPolicy: "IfNotPresent"
220196
volumes:
221197
- name: socket-dir
222198
emptyDir: {

deploy/cephfs/kubernetes/csi-cephfsplugin.yaml

Lines changed: 1 addition & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -122,29 +122,6 @@ spec:
122122
mountPath: /csi
123123
- name: registration-dir
124124
mountPath: /registration
125-
- name: liveness-prometheus
126-
securityContext:
127-
privileged: true
128-
allowPrivilegeEscalation: true
129-
image: quay.io/cephcsi/cephcsi:canary
130-
args:
131-
- "--type=liveness"
132-
- "--endpoint=$(CSI_ENDPOINT)"
133-
- "--metricsport=8681"
134-
- "--metricspath=/metrics"
135-
- "--polltime=60s"
136-
- "--timeout=3s"
137-
env:
138-
- name: CSI_ENDPOINT
139-
value: unix:///csi/csi.sock
140-
- name: POD_IP
141-
valueFrom:
142-
fieldRef:
143-
fieldPath: status.podIP
144-
volumeMounts:
145-
- name: socket-dir
146-
mountPath: /csi
147-
imagePullPolicy: "IfNotPresent"
148125
volumes:
149126
- name: socket-dir
150127
hostPath:
@@ -193,20 +170,4 @@ spec:
193170
type: DirectoryOrCreate
194171
- name: ceph-csi-encryption-kms-config
195172
configMap:
196-
name: ceph-csi-encryption-kms-config
197-
---
198-
# This is a service to expose the liveness metrics
199-
apiVersion: v1
200-
kind: Service
201-
metadata:
202-
name: csi-metrics-cephfsplugin
203-
labels:
204-
app: csi-metrics
205-
spec:
206-
ports:
207-
- name: http-metrics
208-
port: 8080
209-
protocol: TCP
210-
targetPort: 8681
211-
selector:
212-
app: csi-cephfsplugin
173+
name: ceph-csi-encryption-kms-config

deploy/nfs/kubernetes/csi-nfsplugin-provisioner.yaml

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,4 @@
11
---
2-
kind: Service
3-
apiVersion: v1
4-
metadata:
5-
name: csi-nfsplugin-provisioner
6-
labels:
7-
app: csi-metrics
8-
spec:
9-
selector:
10-
app: csi-nfsplugin-provisioner
11-
ports:
12-
- name: http-metrics
13-
port: 8080
14-
protocol: TCP
15-
targetPort: 8682
16-
---
172
apiVersion: apps/v1
183
kind: Deployment
194
metadata:
@@ -147,30 +132,6 @@ spec:
147132
volumeMounts:
148133
- name: socket-dir
149134
mountPath: /csi
150-
- name: liveness-prometheus
151-
image: quay.io/cephcsi/cephcsi:canary
152-
args:
153-
- "--type=liveness"
154-
- "--endpoint=$(CSI_ENDPOINT)"
155-
- "--metricsport=8682"
156-
- "--metricspath=/metrics"
157-
- "--polltime=60s"
158-
- "--timeout=3s"
159-
env:
160-
- name: CSI_ENDPOINT
161-
value: unix:///csi/csi-provisioner.sock
162-
- name: POD_IP
163-
valueFrom:
164-
fieldRef:
165-
fieldPath: status.podIP
166-
ports:
167-
- containerPort: 8682
168-
name: http-metrics
169-
protocol: TCP
170-
volumeMounts:
171-
- name: socket-dir
172-
mountPath: /csi
173-
imagePullPolicy: "IfNotPresent"
174135
serviceAccountName: nfs-csi-provisioner
175136
volumes:
176137
- emptyDir:

deploy/rbd/kubernetes/csi-rbdplugin-provisioner.yaml

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,3 @@
1-
---
2-
kind: Service
3-
apiVersion: v1
4-
metadata:
5-
name: csi-rbdplugin-provisioner
6-
# replace with non-default namespace name
7-
namespace: default
8-
labels:
9-
app: csi-metrics
10-
spec:
11-
selector:
12-
app: csi-rbdplugin-provisioner
13-
ports:
14-
- name: http-metrics
15-
port: 8080
16-
protocol: TCP
17-
targetPort: 8680
18-
191
---
202
kind: Deployment
213
apiVersion: apps/v1
@@ -231,30 +213,6 @@ spec:
231213
mountPath: /tmp/csi/keys
232214
- name: ceph-config
233215
mountPath: /etc/ceph/
234-
- name: liveness-prometheus
235-
image: quay.io/cephcsi/cephcsi:canary
236-
args:
237-
- "--type=liveness"
238-
- "--endpoint=$(CSI_ENDPOINT)"
239-
- "--metricsport=8680"
240-
- "--metricspath=/metrics"
241-
- "--polltime=60s"
242-
- "--timeout=3s"
243-
env:
244-
- name: CSI_ENDPOINT
245-
value: unix:///csi/csi-provisioner.sock
246-
- name: POD_IP
247-
valueFrom:
248-
fieldRef:
249-
fieldPath: status.podIP
250-
ports:
251-
- containerPort: 8680
252-
name: http-metrics
253-
protocol: TCP
254-
volumeMounts:
255-
- name: socket-dir
256-
mountPath: /csi
257-
imagePullPolicy: "IfNotPresent"
258216
volumes:
259217
- name: host-dev
260218
hostPath:

0 commit comments

Comments
 (0)