Skip to content
This repository was archived by the owner on Oct 22, 2024. It is now read-only.

Commit 4a70dae

Browse files
committed
csi-lib-utils v0.9.0
The new release adds support for process_start_time, which we don't need and don't want because we already get it through the Prometheus Golang collector. Worse, if we keep it enabled in the metrics manager, then metrics collection fails because the two definitions are slightly different, which Prometheus treats as an error.
1 parent fba7b1a commit 4a70dae

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ require (
2121
github.com/grpc-ecosystem/go-grpc-middleware v1.1.0 // indirect
2222
github.com/grpc-ecosystem/grpc-gateway v1.12.1 // indirect
2323
github.com/imdario/mergo v0.3.11 // indirect
24-
github.com/kubernetes-csi/csi-lib-utils v0.8.1
24+
github.com/kubernetes-csi/csi-lib-utils v0.9.0
2525
github.com/kubernetes-csi/csi-test/v3 v3.1.1
2626
github.com/nxadm/tail v1.4.5 // indirect
2727
github.com/onsi/ginkgo v1.14.1

go.sum

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -447,8 +447,8 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
447447
github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA=
448448
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
449449
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
450-
github.com/kubernetes-csi/csi-lib-utils v0.8.1 h1:DHFs4MgzjSGF/FH95TEdLVa7R1CCi9UJ76jTUPO8iF0=
451-
github.com/kubernetes-csi/csi-lib-utils v0.8.1/go.mod h1:FZflf0cCYlCquPQxVHa6Tyy0i/so6VAZTiEVK1do7CU=
450+
github.com/kubernetes-csi/csi-lib-utils v0.9.0 h1:TbuDmxoVqM+fvVkzG/7sShyX/8jUln0ElLHuETcsQJI=
451+
github.com/kubernetes-csi/csi-lib-utils v0.9.0/go.mod h1:8E2jVUX9j3QgspwHXa6LwyN7IHQDjW9jX3kwoWnSC+M=
452452
github.com/kubernetes-csi/csi-test/v3 v3.1.1 h1:mFxPbUf7pti663WTCsfaT3YRPVIzy0yLx8HWbVKfN4I=
453453
github.com/kubernetes-csi/csi-test/v3 v3.1.1/go.mod h1:UWxYP5cDlD6iSNVKEiLFqfJnJinuhtI7MLt61rQQOfI=
454454
github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k=
@@ -1097,8 +1097,6 @@ k8s.io/csi-translation-lib v0.19.0/go.mod h1:zGS1YqV8U2So/t4Hz8SoRXMx5y5/KSKnA6B
10971097
k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
10981098
k8s.io/gengo v0.0.0-20200428234225-8167cfdcfc14/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
10991099
k8s.io/heapster v1.2.0-beta.1/go.mod h1:h1uhptVXMwC8xtZBYsPXKVi8fpdlYkTs6k949KozGrM=
1100-
k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8=
1101-
k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I=
11021100
k8s.io/klog/v2 v2.0.0 h1:Foj74zO6RbjjP4hBEKjnYtjjAhGg4jNynUdYF6fJrok=
11031101
k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE=
11041102
k8s.io/klog/v2 v2.2.0 h1:XRvcwJozkgZ1UQJmfMGpvRthQHOvihEhYtDfAaxMz/A=

pkg/pmem-csi-driver/pmem-csi-driver.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,10 @@ func (csid *csiDriver) Run() error {
309309

310310
// On the csi.sock endpoint we gather statistics for incoming
311311
// CSI method calls like any other CSI driver.
312-
cmm := metrics.NewCSIMetricsManagerForPlugin(csid.cfg.DriverName)
312+
cmm := metrics.NewCSIMetricsManagerWithOptions(csid.cfg.DriverName,
313+
metrics.WithProcessStartTime(false),
314+
metrics.WithSubsystem(metrics.SubsystemPlugin),
315+
)
313316
csid.gatherers = append(csid.gatherers, cmm.GetRegistry())
314317

315318
switch csid.cfg.Mode {
@@ -346,6 +349,7 @@ func (csid *csiDriver) Run() error {
346349
// corresponding client calls use "pmem_csi_controller" with
347350
// a tag that identifies the node that is being called.
348351
cmmInternal := metrics.NewCSIMetricsManagerWithOptions(csid.cfg.DriverName,
352+
metrics.WithProcessStartTime(false),
349353
metrics.WithSubsystem("pmem_csi_node"),
350354
// Always add the instance label to allow correlating with
351355
// the controller calls.

pkg/registryserver/registryserver.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ func New(tlsConfig *tls.Config, driverName string) *RegistryServer {
8080
nodeClients: map[string]*NodeInfo{},
8181
listeners: map[RegistryListener]struct{}{},
8282
cmm: metrics.NewCSIMetricsManagerWithOptions(driverName,
83+
metrics.WithProcessStartTime(false),
8384
metrics.WithSubsystem("pmem_csi_controller"),
8485
metrics.WithLabelNames(NodeLabel),
8586
),

0 commit comments

Comments
 (0)