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

Commit

Permalink
csi-lib-utils v0.9.0
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
pohly committed Nov 23, 2020
1 parent fba7b1a commit 4a70dae
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ require (
github.com/grpc-ecosystem/go-grpc-middleware v1.1.0 // indirect
github.com/grpc-ecosystem/grpc-gateway v1.12.1 // indirect
github.com/imdario/mergo v0.3.11 // indirect
github.com/kubernetes-csi/csi-lib-utils v0.8.1
github.com/kubernetes-csi/csi-lib-utils v0.9.0
github.com/kubernetes-csi/csi-test/v3 v3.1.1
github.com/nxadm/tail v1.4.5 // indirect
github.com/onsi/ginkgo v1.14.1
Expand Down
6 changes: 2 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -447,8 +447,8 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA=
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kubernetes-csi/csi-lib-utils v0.8.1 h1:DHFs4MgzjSGF/FH95TEdLVa7R1CCi9UJ76jTUPO8iF0=
github.com/kubernetes-csi/csi-lib-utils v0.8.1/go.mod h1:FZflf0cCYlCquPQxVHa6Tyy0i/so6VAZTiEVK1do7CU=
github.com/kubernetes-csi/csi-lib-utils v0.9.0 h1:TbuDmxoVqM+fvVkzG/7sShyX/8jUln0ElLHuETcsQJI=
github.com/kubernetes-csi/csi-lib-utils v0.9.0/go.mod h1:8E2jVUX9j3QgspwHXa6LwyN7IHQDjW9jX3kwoWnSC+M=
github.com/kubernetes-csi/csi-test/v3 v3.1.1 h1:mFxPbUf7pti663WTCsfaT3YRPVIzy0yLx8HWbVKfN4I=
github.com/kubernetes-csi/csi-test/v3 v3.1.1/go.mod h1:UWxYP5cDlD6iSNVKEiLFqfJnJinuhtI7MLt61rQQOfI=
github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k=
Expand Down Expand Up @@ -1097,8 +1097,6 @@ k8s.io/csi-translation-lib v0.19.0/go.mod h1:zGS1YqV8U2So/t4Hz8SoRXMx5y5/KSKnA6B
k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
k8s.io/gengo v0.0.0-20200428234225-8167cfdcfc14/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
k8s.io/heapster v1.2.0-beta.1/go.mod h1:h1uhptVXMwC8xtZBYsPXKVi8fpdlYkTs6k949KozGrM=
k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8=
k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I=
k8s.io/klog/v2 v2.0.0 h1:Foj74zO6RbjjP4hBEKjnYtjjAhGg4jNynUdYF6fJrok=
k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE=
k8s.io/klog/v2 v2.2.0 h1:XRvcwJozkgZ1UQJmfMGpvRthQHOvihEhYtDfAaxMz/A=
Expand Down
6 changes: 5 additions & 1 deletion pkg/pmem-csi-driver/pmem-csi-driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,10 @@ func (csid *csiDriver) Run() error {

// On the csi.sock endpoint we gather statistics for incoming
// CSI method calls like any other CSI driver.
cmm := metrics.NewCSIMetricsManagerForPlugin(csid.cfg.DriverName)
cmm := metrics.NewCSIMetricsManagerWithOptions(csid.cfg.DriverName,
metrics.WithProcessStartTime(false),
metrics.WithSubsystem(metrics.SubsystemPlugin),
)
csid.gatherers = append(csid.gatherers, cmm.GetRegistry())

switch csid.cfg.Mode {
Expand Down Expand Up @@ -346,6 +349,7 @@ func (csid *csiDriver) Run() error {
// corresponding client calls use "pmem_csi_controller" with
// a tag that identifies the node that is being called.
cmmInternal := metrics.NewCSIMetricsManagerWithOptions(csid.cfg.DriverName,
metrics.WithProcessStartTime(false),
metrics.WithSubsystem("pmem_csi_node"),
// Always add the instance label to allow correlating with
// the controller calls.
Expand Down
1 change: 1 addition & 0 deletions pkg/registryserver/registryserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ func New(tlsConfig *tls.Config, driverName string) *RegistryServer {
nodeClients: map[string]*NodeInfo{},
listeners: map[RegistryListener]struct{}{},
cmm: metrics.NewCSIMetricsManagerWithOptions(driverName,
metrics.WithProcessStartTime(false),
metrics.WithSubsystem("pmem_csi_controller"),
metrics.WithLabelNames(NodeLabel),
),
Expand Down

0 comments on commit 4a70dae

Please sign in to comment.