From bcd646ee5529767c7352d3731df106445dd265fd Mon Sep 17 00:00:00 2001 From: Madhu Rajanna Date: Tue, 31 Mar 2020 11:29:29 +0530 Subject: [PATCH] Deprecate grpc metrics in ceph-csi As kubernetes CSI sidecar is exposing the GRPC mertics we can make use of the same in ceph-csi we dont need to expose our own. update: #881 Signed-off-by: Madhu Rajanna --- .../templates/nodeplugin-daemonset.yaml | 5 -- .../templates/nodeplugin-grpc-service.yaml | 41 ------------ .../templates/provisioner-deployment.yaml | 5 -- .../templates/provisioner-grpc-service.yaml | 41 ------------ charts/ceph-csi-cephfs/values.yaml | 62 ------------------- .../templates/nodeplugin-daemonset.yaml | 5 -- .../templates/nodeplugin-grpc-service.yaml | 41 ------------ .../templates/provisioner-deployment.yaml | 5 -- .../templates/provisioner-grpc-service.yaml | 41 ------------ charts/ceph-csi-rbd/values.yaml | 62 ------------------- cmd/cephcsi.go | 4 +- .../csi-cephfsplugin-provisioner.yaml | 7 --- .../cephfs/kubernetes/csi-cephfsplugin.yaml | 9 +-- .../kubernetes/csi-rbdplugin-provisioner.yaml | 7 --- deploy/rbd/kubernetes/csi-rbdplugin.yaml | 9 +-- docs/deploy-cephfs.md | 6 +- docs/deploy-rbd.md | 6 +- docs/metrics.md | 14 ----- examples/service-monitor.yaml | 3 - pkg/cephfs/driver.go | 1 + pkg/rbd/driver.go | 1 + 21 files changed, 12 insertions(+), 363 deletions(-) delete mode 100644 charts/ceph-csi-cephfs/templates/nodeplugin-grpc-service.yaml delete mode 100644 charts/ceph-csi-cephfs/templates/provisioner-grpc-service.yaml delete mode 100644 charts/ceph-csi-rbd/templates/nodeplugin-grpc-service.yaml delete mode 100644 charts/ceph-csi-rbd/templates/provisioner-grpc-service.yaml diff --git a/charts/ceph-csi-cephfs/templates/nodeplugin-daemonset.yaml b/charts/ceph-csi-cephfs/templates/nodeplugin-daemonset.yaml index 9c14132d8..ad75700e2 100644 --- a/charts/ceph-csi-cephfs/templates/nodeplugin-daemonset.yaml +++ b/charts/ceph-csi-cephfs/templates/nodeplugin-daemonset.yaml @@ -76,11 +76,6 @@ spec: - "--type=cephfs" - "--nodeserver=true" - "--pidlimit=-1" -{{- if .Values.nodeplugin.grpcMetrics.enabled }} - - "--metricsport={{ .Values.nodeplugin.grpcMetrics.containerPort }}" - - "--metricspath=/metrics" - - "--enablegrpcmetrics=true" -{{- end }} {{- if .Values.nodeplugin.forcecephkernelclient }} - "--forcecephkernelclient={{ .Values.nodeplugin.forcecephkernelclient }}" {{- end }} diff --git a/charts/ceph-csi-cephfs/templates/nodeplugin-grpc-service.yaml b/charts/ceph-csi-cephfs/templates/nodeplugin-grpc-service.yaml deleted file mode 100644 index 6a2b8b344..000000000 --- a/charts/ceph-csi-cephfs/templates/nodeplugin-grpc-service.yaml +++ /dev/null @@ -1,41 +0,0 @@ -{{- if .Values.nodeplugin.grpcMetrics.service.enabled -}} -apiVersion: v1 -kind: Service -metadata: -{{- if .Values.nodeplugin.grpcMetrics.service.annotations }} - annotations: -{{ toYaml .Values.nodeplugin.grpcMetrics.service.annotations | indent 4 }} -{{- end }} - name: {{ include "ceph-csi-cephfs.nodeplugin.fullname" . }}-grpc-metrics - namespace: {{ .Release.Namespace }} - labels: - app: {{ include "ceph-csi-cephfs.fullname" . }} - chart: {{ include "ceph-csi-cephfs.chart" . }} - component: {{ .Values.nodeplugin.name }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -spec: -{{- if .Values.nodeplugin.grpcMetrics.service.clusterIP }} - clusterIP: "{{ .Values.nodeplugin.grpcMetrics.service.clusterIP }}" -{{- end }} -{{- if .Values.nodeplugin.grpcMetrics.service.externalIPs }} - externalIPs: -{{ toYaml .Values.nodeplugin.grpcMetrics.service.externalIPs | indent 4 }} -{{- end }} -{{- if .Values.nodeplugin.grpcMetrics.service.loadBalancerIP }} - loadBalancerIP: "{{ .Values.nodeplugin.grpcMetrics.service.loadBalancerIP }}" -{{- end }} -{{- if .Values.nodeplugin.grpcMetrics.service.loadBalancerSourceRanges }} - loadBalancerSourceRanges: -{{ toYaml .Values.nodeplugin.grpcMetrics.service.loadBalancerSourceRanges | indent 4 }} -{{- end }} - ports: - - name: grpc-metrics - port: {{ .Values.nodeplugin.grpcMetrics.service.servicePort }} - targetPort: {{ .Values.nodeplugin.grpcMetrics.containerPort }} - selector: - app: {{ include "ceph-csi-cephfs.name" . }} - component: {{ .Values.nodeplugin.name }} - release: {{ .Release.Name }} - type: "{{ .Values.nodeplugin.grpcMetrics.service.type }}" -{{- end -}} diff --git a/charts/ceph-csi-cephfs/templates/provisioner-deployment.yaml b/charts/ceph-csi-cephfs/templates/provisioner-deployment.yaml index 19086a693..615a77fb4 100644 --- a/charts/ceph-csi-cephfs/templates/provisioner-deployment.yaml +++ b/charts/ceph-csi-cephfs/templates/provisioner-deployment.yaml @@ -90,11 +90,6 @@ spec: - "--type=cephfs" - "--controllerserver=true" - "--pidlimit=-1" -{{- if .Values.provisioner.grpcMetrics.enabled }} - - "--metricsport={{ .Values.nodeplugin.grpcMetrics.containerPort }}" - - "--metricspath=/metrics" - - "--enablegrpcmetrics=true" -{{- end }} - "--endpoint=$(CSI_ENDPOINT)" - "--v=5" - "--drivername=$(DRIVER_NAME)" diff --git a/charts/ceph-csi-cephfs/templates/provisioner-grpc-service.yaml b/charts/ceph-csi-cephfs/templates/provisioner-grpc-service.yaml deleted file mode 100644 index eacb88875..000000000 --- a/charts/ceph-csi-cephfs/templates/provisioner-grpc-service.yaml +++ /dev/null @@ -1,41 +0,0 @@ -{{- if .Values.provisioner.grpcMetrics.service.enabled -}} -apiVersion: v1 -kind: Service -metadata: -{{- if .Values.provisioner.grpcMetrics.service.annotations }} - annotations: -{{ toYaml .Values.provisioner.grpcMetrics.service.annotations | indent 4 }} -{{- end }} - name: {{ include "ceph-csi-cephfs.provisioner.fullname" . }}-grpc-metrics - namespace: {{ .Release.Namespace }} - labels: - app: {{ include "ceph-csi-cephfs.fullname" . }} - chart: {{ include "ceph-csi-cephfs.chart" . }} - component: {{ .Values.provisioner.name }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -spec: -{{- if .Values.provisioner.grpcMetrics.service.clusterIP }} - clusterIP: "{{ .Values.provisioner.grpcMetrics.service.clusterIP }}" -{{- end }} -{{- if .Values.provisioner.grpcMetrics.service.externalIPs }} - externalIPs: -{{ toYaml .Values.provisioner.grpcMetrics.service.externalIPs | indent 4 }} -{{- end }} -{{- if .Values.provisioner.grpcMetrics.service.loadBalancerIP }} - loadBalancerIP: "{{ .Values.provisioner.grpcMetrics.service.loadBalancerIP }}" -{{- end }} -{{- if .Values.provisioner.grpcMetrics.service.loadBalancerSourceRanges }} - loadBalancerSourceRanges: -{{ toYaml .Values.provisioner.grpcMetrics.service.loadBalancerSourceRanges | indent 4 }} -{{- end }} - ports: - - name: grpc-metrics - port: {{ .Values.provisioner.grpcMetrics.service.servicePort }} - targetPort: {{ .Values.provisioner.grpcMetrics.containerPort }} - selector: - app: {{ include "ceph-csi-cephfs.name" . }} - component: {{ .Values.provisioner.name }} - release: {{ .Release.Name }} - type: "{{ .Values.provisioner.grpcMetrics.service.type }}" -{{- end -}} diff --git a/charts/ceph-csi-cephfs/values.yaml b/charts/ceph-csi-cephfs/values.yaml index 077b6f864..2dee13414 100644 --- a/charts/ceph-csi-cephfs/values.yaml +++ b/charts/ceph-csi-cephfs/values.yaml @@ -63,37 +63,6 @@ nodeplugin: loadBalancerIP: "" loadBalancerSourceRanges: [] - grpcMetrics: - # Metrics only available for cephcis/cephsi => 1.2.0 - # Specifies whether grpc metrics should be exposed - enabled: true - # The port of the container to expose the metrics - containerPort: 8091 - - service: - # Specifies whether a service should be created for the metrics - enabled: true - # The port to use for the service - servicePort: 8090 - type: ClusterIP - - # Annotations for the service - # Example: - # annotations: - # prometheus.io/scrape: "true" - # prometheus.io/port: "9090" - annotations: {} - - clusterIP: "" - - ## List of IP addresses at which the stats-exporter service is available - ## Ref: https://kubernetes.io/docs/user-guide/services/#external-ips - ## - externalIPs: [] - - loadBalancerIP: "" - loadBalancerSourceRanges: [] - registrar: image: repository: quay.io/k8scsi/csi-node-driver-registrar @@ -160,37 +129,6 @@ provisioner: loadBalancerIP: "" loadBalancerSourceRanges: [] - grpcMetrics: - # Metrics only available for cephcsi/cephcsi => 1.2.0 - # Specifies whether grpc metrics should be exposed - enabled: true - # The port of the container to expose the metrics - containerPort: 8091 - - service: - # Specifies whether a service should be created for the metrics - enabled: true - # The port to use for the service - servicePort: 8090 - type: ClusterIP - - # Annotations for the service - # Example: - # annotations: - # prometheus.io/scrape: "true" - # prometheus.io/port: "9090" - annotations: {} - - clusterIP: "" - - ## List of IP addresses at which the stats-exporter service is available - ## Ref: https://kubernetes.io/docs/user-guide/services/#external-ips - ## - externalIPs: [] - - loadBalancerIP: "" - loadBalancerSourceRanges: [] - provisioner: image: repository: quay.io/k8scsi/csi-provisioner diff --git a/charts/ceph-csi-rbd/templates/nodeplugin-daemonset.yaml b/charts/ceph-csi-rbd/templates/nodeplugin-daemonset.yaml index f19292642..4eadae442 100644 --- a/charts/ceph-csi-rbd/templates/nodeplugin-daemonset.yaml +++ b/charts/ceph-csi-rbd/templates/nodeplugin-daemonset.yaml @@ -77,11 +77,6 @@ spec: - "--type=rbd" - "--nodeserver=true" - "--pidlimit=-1" -{{- if .Values.nodeplugin.grpcMetrics.enabled }} - - "--metricsport={{ .Values.nodeplugin.grpcMetrics.containerPort }}" - - "--metricspath=/metrics" - - "--enablegrpcmetrics=true" -{{- end }} - "--endpoint=$(CSI_ENDPOINT)" - "--v=5" - "--drivername=$(DRIVER_NAME)" diff --git a/charts/ceph-csi-rbd/templates/nodeplugin-grpc-service.yaml b/charts/ceph-csi-rbd/templates/nodeplugin-grpc-service.yaml deleted file mode 100644 index 39e9cf984..000000000 --- a/charts/ceph-csi-rbd/templates/nodeplugin-grpc-service.yaml +++ /dev/null @@ -1,41 +0,0 @@ -{{- if .Values.nodeplugin.grpcMetrics.service.enabled -}} -apiVersion: v1 -kind: Service -metadata: -{{- if .Values.nodeplugin.grpcMetrics.service.annotations }} - annotations: -{{ toYaml .Values.nodeplugin.grpcMetrics.service.annotations | indent 4 }} -{{- end }} - name: {{ include "ceph-csi-rbd.nodeplugin.fullname" . }}-grpc-metrics - namespace: {{ .Release.Namespace }} - labels: - app: {{ include "ceph-csi-rbd.fullname" . }} - chart: {{ include "ceph-csi-rbd.chart" . }} - component: {{ .Values.nodeplugin.name }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -spec: -{{- if .Values.nodeplugin.grpcMetrics.service.clusterIP }} - clusterIP: "{{ .Values.nodeplugin.grpcMetrics.service.clusterIP }}" -{{- end }} -{{- if .Values.nodeplugin.grpcMetrics.service.externalIPs }} - externalIPs: -{{ toYaml .Values.nodeplugin.grpcMetrics.service.externalIPs | indent 4 }} -{{- end }} -{{- if .Values.nodeplugin.grpcMetrics.service.loadBalancerIP }} - loadBalancerIP: "{{ .Values.nodeplugin.grpcMetrics.service.loadBalancerIP }}" -{{- end }} -{{- if .Values.nodeplugin.grpcMetrics.service.loadBalancerSourceRanges }} - loadBalancerSourceRanges: -{{ toYaml .Values.nodeplugin.grpcMetrics.service.loadBalancerSourceRanges | indent 4 }} -{{- end }} - ports: - - name: grpc-metrics - port: {{ .Values.nodeplugin.grpcMetrics.service.servicePort }} - targetPort: {{ .Values.nodeplugin.grpcMetrics.containerPort }} - selector: - app: {{ include "ceph-csi-rbd.name" . }} - component: {{ .Values.nodeplugin.name }} - release: {{ .Release.Name }} - type: "{{ .Values.nodeplugin.grpcMetrics.service.type }}" -{{- end -}} diff --git a/charts/ceph-csi-rbd/templates/provisioner-deployment.yaml b/charts/ceph-csi-rbd/templates/provisioner-deployment.yaml index 04026fc37..243e997f5 100644 --- a/charts/ceph-csi-rbd/templates/provisioner-deployment.yaml +++ b/charts/ceph-csi-rbd/templates/provisioner-deployment.yaml @@ -106,11 +106,6 @@ spec: - "--type=rbd" - "--controllerserver=true" - "--pidlimit=-1" -{{- if .Values.provisioner.grpcMetrics.enabled }} - - "--metricsport={{ .Values.nodeplugin.grpcMetrics.containerPort }}" - - "--metricspath=/metrics" - - "--enablegrpcmetrics=true" -{{- end }} - "--endpoint=$(CSI_ENDPOINT)" - "--v=5" - "--drivername=$(DRIVER_NAME)" diff --git a/charts/ceph-csi-rbd/templates/provisioner-grpc-service.yaml b/charts/ceph-csi-rbd/templates/provisioner-grpc-service.yaml deleted file mode 100644 index cb0c2aaff..000000000 --- a/charts/ceph-csi-rbd/templates/provisioner-grpc-service.yaml +++ /dev/null @@ -1,41 +0,0 @@ -{{- if .Values.provisioner.grpcMetrics.service.enabled -}} -apiVersion: v1 -kind: Service -metadata: -{{- if .Values.provisioner.grpcMetrics.service.annotations }} - annotations: -{{ toYaml .Values.provisioner.grpcMetrics.service.annotations | indent 4 }} -{{- end }} - name: {{ include "ceph-csi-rbd.provisioner.fullname" . }}-grpc-metrics - namespace: {{ .Release.Namespace }} - labels: - app: {{ include "ceph-csi-rbd.fullname" . }} - chart: {{ include "ceph-csi-rbd.chart" . }} - component: {{ .Values.provisioner.name }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -spec: -{{- if .Values.provisioner.grpcMetrics.service.clusterIP }} - clusterIP: "{{ .Values.provisioner.grpcMetrics.service.clusterIP }}" -{{- end }} -{{- if .Values.provisioner.grpcMetrics.service.externalIPs }} - externalIPs: -{{ toYaml .Values.provisioner.grpcMetrics.service.externalIPs | indent 4 }} -{{- end }} -{{- if .Values.provisioner.grpcMetrics.service.loadBalancerIP }} - loadBalancerIP: "{{ .Values.provisioner.grpcMetrics.service.loadBalancerIP }}" -{{- end }} -{{- if .Values.provisioner.grpcMetrics.service.loadBalancerSourceRanges }} - loadBalancerSourceRanges: -{{ toYaml .Values.provisioner.grpcMetrics.service.loadBalancerSourceRanges | indent 4 }} -{{- end }} - ports: - - name: grpc-metrics - port: {{ .Values.provisioner.grpcMetrics.service.servicePort }} - targetPort: {{ .Values.provisioner.grpcMetrics.containerPort }} - selector: - app: {{ include "ceph-csi-rbd.name" . }} - component: {{ .Values.provisioner.name }} - release: {{ .Release.Name }} - type: "{{ .Values.provisioner.grpcMetrics.service.type }}" -{{- end -}} diff --git a/charts/ceph-csi-rbd/values.yaml b/charts/ceph-csi-rbd/values.yaml index 9f00d14cb..9d3b24926 100644 --- a/charts/ceph-csi-rbd/values.yaml +++ b/charts/ceph-csi-rbd/values.yaml @@ -77,37 +77,6 @@ nodeplugin: loadBalancerIP: "" loadBalancerSourceRanges: [] - grpcMetrics: - # Metrics only available for cephcsi/cephcsi => 1.2.0 - # Specifies whether grpc metrics should be exposed - enabled: true - # The port of the container to expose the metrics - containerPort: 8090 - - service: - # Specifies whether a service should be created for the metrics - enabled: true - # The port to use for the service - servicePort: 8090 - type: ClusterIP - - # Annotations for the service - # Example: - # annotations: - # prometheus.io/scrape: "true" - # prometheus.io/port: "8090" - annotations: {} - - clusterIP: "" - - ## List of IP addresses at which the stats-exporter service is available - ## Ref: https://kubernetes.io/docs/user-guide/services/#external-ips - ## - externalIPs: [] - - loadBalancerIP: "" - loadBalancerSourceRanges: [] - registrar: image: repository: quay.io/k8scsi/csi-node-driver-registrar @@ -170,37 +139,6 @@ provisioner: loadBalancerIP: "" loadBalancerSourceRanges: [] - grpcMetrics: - # Metrics only available for cephcis/cephsi => 1.2.0 - # Specifies whether grpc metrics should be exposed - enabled: true - # The port of the container to expose the metrics - containerPort: 8090 - - service: - # Specifies whether a service should be created for the metrics - enabled: true - # The port to use for the service - servicePort: 8090 - type: ClusterIP - - # Annotations for the service - # Example: - # annotations: - # prometheus.io/scrape: "true" - # prometheus.io/port: "8090" - annotations: {} - - clusterIP: "" - - ## List of IP addresses at which the stats-exporter service is available - ## Ref: https://kubernetes.io/docs/user-guide/services/#external-ips - ## - externalIPs: [] - - loadBalancerIP: "" - loadBalancerSourceRanges: [] - provisioner: image: repository: quay.io/k8scsi/csi-provisioner diff --git a/cmd/cephcsi.go b/cmd/cephcsi.go index 10e16bc0a..83e8986ed 100644 --- a/cmd/cephcsi.go +++ b/cmd/cephcsi.go @@ -70,9 +70,9 @@ func init() { flag.DurationVar(&conf.PollTime, "polltime", time.Second*60, "time interval in seconds between each poll") flag.DurationVar(&conf.PoolTimeout, "timeout", time.Second*3, "probe timeout in seconds") - flag.BoolVar(&conf.EnableGRPCMetrics, "enablegrpcmetrics", false, "enable grpc metrics") + flag.BoolVar(&conf.EnableGRPCMetrics, "enablegrpcmetrics", false, "[DEPRECATED] enable grpc metrics") flag.StringVar(&conf.HistogramOption, "histogramoption", "0.5,2,6", - "Histogram option for grpc metrics, should be comma separated value, ex:= 0.5,2,6 where start=0.5 factor=2, count=6") + "[DEPRECATED] Histogram option for grpc metrics, should be comma separated value, ex:= 0.5,2,6 where start=0.5 factor=2, count=6") flag.BoolVar(&conf.Version, "version", false, "Print cephcsi version information") diff --git a/deploy/cephfs/kubernetes/csi-cephfsplugin-provisioner.yaml b/deploy/cephfs/kubernetes/csi-cephfsplugin-provisioner.yaml index 77e29f88f..dd28d4ba5 100644 --- a/deploy/cephfs/kubernetes/csi-cephfsplugin-provisioner.yaml +++ b/deploy/cephfs/kubernetes/csi-cephfsplugin-provisioner.yaml @@ -13,10 +13,6 @@ spec: port: 8080 protocol: TCP targetPort: 8681 - - name: grpc-metrics - port: 8090 - protocol: TCP - targetPort: 8091 --- kind: Deployment @@ -94,9 +90,6 @@ spec: - "--drivername=cephfs.csi.ceph.com" - "--metadatastorage=k8s_configmap" - "--pidlimit=-1" - - "--metricsport=8091" - - "--metricspath=/metrics" - - "--enablegrpcmetrics=false" env: - name: POD_IP valueFrom: diff --git a/deploy/cephfs/kubernetes/csi-cephfsplugin.yaml b/deploy/cephfs/kubernetes/csi-cephfsplugin.yaml index 8cf067f9e..cdc851038 100644 --- a/deploy/cephfs/kubernetes/csi-cephfsplugin.yaml +++ b/deploy/cephfs/kubernetes/csi-cephfsplugin.yaml @@ -63,9 +63,6 @@ spec: - "--v=5" - "--drivername=cephfs.csi.ceph.com" - "--metadatastorage=k8s_configmap" - - "--metricsport=8090" - - "--metricspath=/metrics" - - "--enablegrpcmetrics=false" env: - name: POD_IP valueFrom: @@ -163,7 +160,7 @@ spec: medium: "Memory" } --- -# This is a service to expose the liveness and grpc metrics +# This is a service to expose the liveness metrics apiVersion: v1 kind: Service metadata: @@ -176,9 +173,5 @@ spec: port: 8080 protocol: TCP targetPort: 8681 - - name: grpc-metrics - port: 8090 - protocol: TCP - targetPort: 8091 selector: app: csi-cephfsplugin diff --git a/deploy/rbd/kubernetes/csi-rbdplugin-provisioner.yaml b/deploy/rbd/kubernetes/csi-rbdplugin-provisioner.yaml index 263458452..2ed89b700 100644 --- a/deploy/rbd/kubernetes/csi-rbdplugin-provisioner.yaml +++ b/deploy/rbd/kubernetes/csi-rbdplugin-provisioner.yaml @@ -13,10 +13,6 @@ spec: port: 8080 protocol: TCP targetPort: 8680 - - name: grpc-metrics - port: 8090 - protocol: TCP - targetPort: 8090 --- kind: Deployment @@ -113,9 +109,6 @@ spec: - "--v=5" - "--drivername=rbd.csi.ceph.com" - "--pidlimit=-1" - - "--metricsport=8090" - - "--metricspath=/metrics" - - "--enablegrpcmetrics=false" env: - name: POD_IP valueFrom: diff --git a/deploy/rbd/kubernetes/csi-rbdplugin.yaml b/deploy/rbd/kubernetes/csi-rbdplugin.yaml index 9c1abda29..71dc47fea 100644 --- a/deploy/rbd/kubernetes/csi-rbdplugin.yaml +++ b/deploy/rbd/kubernetes/csi-rbdplugin.yaml @@ -63,9 +63,6 @@ spec: - "--endpoint=$(CSI_ENDPOINT)" - "--v=5" - "--drivername=rbd.csi.ceph.com" - - "--metricsport=8090" - - "--metricspath=/metrics" - - "--enablegrpcmetrics=false" env: - name: POD_IP valueFrom: @@ -168,7 +165,7 @@ spec: medium: "Memory" } --- -# This is a service to expose the liveness and grpc metrics +# This is a service to expose the liveness metrics apiVersion: v1 kind: Service metadata: @@ -181,9 +178,5 @@ spec: port: 8080 protocol: TCP targetPort: 8680 - - name: grpc-metrics - port: 8090 - protocol: TCP - targetPort: 8090 selector: app: csi-rbdplugin diff --git a/docs/deploy-cephfs.md b/docs/deploy-cephfs.md index aa2d072d8..64c0ee825 100644 --- a/docs/deploy-cephfs.md +++ b/docs/deploy-cephfs.md @@ -53,12 +53,12 @@ that should be resolved in v14.2.3. | `--pluginpath` | "/var/lib/kubelet/plugins/" | The location of cephcsi plugin on host | | `--metadatastorage` | _empty_ | Points to where older (1.0.0 or older plugin versions) metadata about provisioned volumes are kept, as file or in as k8s configmap (`node` or `k8s_configmap` respectively) | | `--pidlimit` | _0_ | Configure the PID limit in cgroups. The container runtime can restrict the number of processes/tasks which can cause problems while provisioning (or deleting) a large number of volumes. A value of `-1` configures the limit to the maximum, `0` does not configure limits at all. | -| `--metricsport` | `8080` | TCP port for /grpc metrics requests | +| `--metricsport` | `8080` | TCP port for liveness metrics requests | | `--metricspath` | `/metrics` | Path of prometheus endpoint where metrics will be available | -| `--enablegrpcmetrics` | `false` | Enable grpc metrics collection and start prometheus server | +| `--enablegrpcmetrics` | `false` | [Deprecated] Enable grpc metrics collection and start prometheus server | | `--polltime` | `60s` | Time interval in between each poll | | `--timeout` | `3s` | Probe timeout in seconds | -| `--histogramoption` | `0.5,2,6` | Histogram option for grpc metrics, should be comma separated value (ex:= "0.5,2,6" where start=0.5 factor=2, count=6) | +| `--histogramoption` | `0.5,2,6` | [Deprecated] Histogram option for grpc metrics, should be comma separated value (ex:= "0.5,2,6" where start=0.5 factor=2, count=6) | | `--forcecephkernelclient` | `false` | Force enabling Ceph Kernel clients for mounting on kernels < 4.17 | **NOTE:** The parameter `-forcecephkernelclient` enables the Kernel diff --git a/docs/deploy-rbd.md b/docs/deploy-rbd.md index 3e58169e8..99426aff6 100644 --- a/docs/deploy-rbd.md +++ b/docs/deploy-rbd.md @@ -35,12 +35,12 @@ make image-cephcsi | `--instanceid` | "default" | Unique ID distinguishing this instance of Ceph CSI among other instances, when sharing Ceph clusters across CSI instances for provisioning | | `--metadatastorage` | _empty_ | Points to where legacy (1.0.0 or older plugin versions) metadata about provisioned volumes are kept, as file or in as k8s configmap (`node` or `k8s_configmap` respectively) | | `--pidlimit` | _0_ | Configure the PID limit in cgroups. The container runtime can restrict the number of processes/tasks which can cause problems while provisioning (or deleting) a large number of volumes. A value of `-1` configures the limit to the maximum, `0` does not configure limits at all. | -| `--metricsport` | `8080` | TCP port for liveness/grpc metrics requests | +| `--metricsport` | `8080` | TCP port for liveness metrics requests | | `--metricspath` | `"/metrics"` | Path of prometheus endpoint where metrics will be available | -| `--enablegrpcmetrics` | `false` | Enable grpc metrics collection and start prometheus server | +| `--enablegrpcmetrics` | `false` | [Deprecated] Enable grpc metrics collection and start prometheus server | | `--polltime` | `"60s"` | Time interval in between each poll | | `--timeout` | `"3s"` | Probe timeout in seconds | -| `--histogramoption` | `0.5,2,6` | Histogram option for grpc metrics, should be comma separated value (ex:= "0.5,2,6" where start=0.5 factor=2, count=6) | +| `--histogramoption` | `0.5,2,6` | [Deprecated] Histogram option for grpc metrics, should be comma separated value (ex:= "0.5,2,6" where start=0.5 factor=2, count=6) | **Available volume parameters:** diff --git a/docs/metrics.md b/docs/metrics.md index a71244beb..e0a2e4e7f 100644 --- a/docs/metrics.md +++ b/docs/metrics.md @@ -2,7 +2,6 @@ - [Metrics](#metrics) - [Liveness](#liveness) - - [GRPC metrics](#grpc-metrics) ## Liveness @@ -34,16 +33,3 @@ ports will be used for additional CSI pods. Note: You may need to open the ports used in your firewall depending on how you cluster is setup. - -## GRPC metrics - -grpc metrics are intended to be collected by prometheus but can be accesesed -through a GET request to a specific pod ip. - -Each CSI pod has a service to expose the endpoint to prometheus. By default rbd -pods run on port 8090 and cephfs 8091. -These can be changed if desired or if multiple ceph clusters are deployed more -ports will be used for additional CSI pods. - -Note: You may need to open the ports used in your firewall depending on how you -cluster is setup. diff --git a/examples/service-monitor.yaml b/examples/service-monitor.yaml index 842aa8094..d2dd35520 100644 --- a/examples/service-monitor.yaml +++ b/examples/service-monitor.yaml @@ -20,6 +20,3 @@ spec: - port: http-metrics path: /metrics interval: 5s - - port: grpc-metrics - path: /metrics - interval: 5s diff --git a/pkg/cephfs/driver.go b/pkg/cephfs/driver.go index b609e03de..27995057d 100644 --- a/pkg/cephfs/driver.go +++ b/pkg/cephfs/driver.go @@ -151,6 +151,7 @@ func (fs *Driver) Run(conf *util.Config, cachePersister util.CachePersister) { server := csicommon.NewNonBlockingGRPCServer() server.Start(conf.Endpoint, conf.HistogramOption, fs.is, fs.cs, fs.ns, conf.EnableGRPCMetrics) if conf.EnableGRPCMetrics { + klog.Warning("EnableGRPCMetrics is deprecated") go util.StartMetricsServer(conf) } server.Wait() diff --git a/pkg/rbd/driver.go b/pkg/rbd/driver.go index 89118ff59..00952da56 100644 --- a/pkg/rbd/driver.go +++ b/pkg/rbd/driver.go @@ -154,6 +154,7 @@ func (r *Driver) Run(conf *util.Config, cachePersister util.CachePersister) { s := csicommon.NewNonBlockingGRPCServer() s.Start(conf.Endpoint, conf.HistogramOption, r.ids, r.cs, r.ns, conf.EnableGRPCMetrics) if conf.EnableGRPCMetrics { + klog.Warning("EnableGRPCMetrics is deprecated") go util.StartMetricsServer(conf) } s.Wait()