Repository: kubernetes-csi/external-snapshotter
Pull request #569 (2021-08-04 03:24:47)

Add process_start_time_seconds metric
<!--  Thanks for sending a pull request!  Here are some tips for you:

1. If this is your first time, please read our contributor guidelines: https://git.k8s.io/community/contributors/guide#your-first-contribution and developer guide https://git.k8s.io/community/contributors/devel/development.md#development-guide
2. Follow the instructions for writing a release note: https://git.k8s.io/community/contributors/guide/release-notes.md
3. If the PR is unfinished, see how to mark it: https://git.k8s.io/community/contributors/guide/pull-requests.md#marking-unfinished-pull-requests
-->

**What type of PR is this?**
> Uncomment only one ` /kind <>` line, hit enter to put that in a new line, and remove leading whitespaces from that line:
>
> /kind api-change
/kind bug
> /kind cleanup
> /kind design
> /kind documentation
> /kind failing-test
> /kind feature
> /kind flake

**What this PR does / why we need it**:
process_start_time metric needs to be initialized for cummulative latency metric.

**Which issue(s) this PR fixes**:
<!--
*Automatically closes linked issue when PR is merged.
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
_If PR is about `failing-tests or flakes`, please post the related issues/tests in a comment and do not use `Fixes`_*
-->
Fixes #

**Special notes for your reviewer**:
The component-base [v0.22.0-rc.0](https://github.com/kubernetes-csi/external-snapshotter/blob/master/go.mod#L41)
contains the [bug-fix](https://github.com/kubernetes/component-base/commit/791c326f981f31f14efdfd177a9a869f01038f1a) for [RegisterProcessStartTime](https://github.com/kubernetes-csi/external-snapshotter/blob/master/vendor/k8s.io/component-base/metrics/processstarttime.go#L37).


**Does this PR introduce a user-facing change?**:
<!--
If no, just write "NONE" in the release-note block below.
If yes, a release note is required:
Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required".
-->
```release-note
Add process_start_time_seconds metric
```


k8s-ci-robot: [APPROVALNOTIFIER] This PR is **NOT APPROVED**

This pull-request has been approved by: *<a href="https://github.com/kubernetes-csi/external-snapshotter/pull/569#" title="Author self-approved">saikat-royc</a>*
To complete the [pull request process](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process), please assign **msau42** after the PR has been reviewed.
You can assign the PR to them by writing `/assign @msau42` in a comment when ready.

The full list of commands accepted by this bot can be found [here](https://go.k8s.io/bot-commands?repo=kubernetes-csi%2Fexternal-snapshotter).

<details open>
Needs approval from an approver in each of these files:

- **[OWNERS](https://github.com/kubernetes-csi/external-snapshotter/blob/master/OWNERS)**

Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
</details>
<!-- META={"approvers":["msau42"]} -->
saikat-royc: /assign @Jiawei0227 @pohly 
k8s-ci-robot: @saikat-royc: The following test **failed**, say `/retest` to rerun all failed tests or `/retest-required` to rerun all mandatory failed tests:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
pull-kubernetes-csi-external-snapshotter-1-20-on-kubernetes-1-20 | 94214d69e763be9fa6b47aacb147d3e2b0523dae | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-csi_external-snapshotter/569/pull-kubernetes-csi-external-snapshotter-1-20-on-kubernetes-1-20/1422760403489787904) | `/test pull-kubernetes-csi-external-snapshotter-1-20-on-kubernetes-1-20`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-csi&repo=external-snapshotter&pr=569). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3Asaikat-royc). Please help us cut down on flakes by [linking to](https://git.k8s.io/community/contributors/devel/sig-testing/flaky-tests.md#filing-issues-for-flaky-tests) an [open issue](https://github.com/kubernetes-csi/external-snapshotter/issues?q=is:issue+is:open) when you hit one in your PR.

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
xing-yang: /assign @ggriffiths 
xing-yang: /retest
ggriffiths: I think the snapshot tests have been flaking, that is unrelated.

/test pull-kubernetes-csi-external-snapshotter-1-20-on-kubernetes-1-20

Patch:
diff --git a/README.md b/README.md
index 2b36e4c4d..2f66267a2 100644
--- a/README.md
+++ b/README.md
@@ -22,9 +22,9 @@ This information reflects the head of this branch.
 
 | Minimum CSI Version                                                                | Recommended CSI Version                                                                | Container Image             | [Min K8s Version](https://kubernetes-csi.github.io/docs/kubernetes-compatibility.html#minimum-version) | [Recommended K8s Version](https://kubernetes-csi.github.io/docs/project-policies.html#recommended-version) |
 | ------------------------------------------------------------------------------------------ | ----------------------------| --------------- | --------------- |  --------------- |
-| [CSI Spec v1.0.0](https://github.com/container-storage-interface/spec/releases/tag/v1.0.0) | [CSI Spec v1.5.0](https://github.com/container-storage-interface/spec/releases/tag/v1.5.0) | k8s.gcr.io/sig-storage/csi-snapshotter | 1.20         | 1.20         |
-| [CSI Spec v1.0.0](https://github.com/container-storage-interface/spec/releases/tag/v1.0.0) | [CSI Spec v1.5.0](https://github.com/container-storage-interface/spec/releases/tag/v1.5.0) | k8s.gcr.io/sig-storage/snapshot-controller  | 1.20     | 1.20         |
-| [CSI Spec v1.0.0](https://github.com/container-storage-interface/spec/releases/tag/v1.0.0) | [CSI Spec v1.5.0](https://github.com/container-storage-interface/spec/releases/tag/v1.5.0) | k8s.gcr.io/sig-storage/snapshot-validation-webhook  | 1.20     | 1.20         |
+| [CSI Spec v1.0.0](https://github.com/container-storage-interface/spec/releases/tag/v1.0.0) | [CSI Spec v1.4.0](https://github.com/container-storage-interface/spec/releases/tag/v1.4.0) | k8s.gcr.io/sig-storage/csi-snapshotter | 1.20         | 1.20         |
+| [CSI Spec v1.0.0](https://github.com/container-storage-interface/spec/releases/tag/v1.0.0) | [CSI Spec v1.4.0](https://github.com/container-storage-interface/spec/releases/tag/v1.4.0) | k8s.gcr.io/sig-storage/snapshot-controller  | 1.20     | 1.20         |
+| [CSI Spec v1.0.0](https://github.com/container-storage-interface/spec/releases/tag/v1.0.0) | [CSI Spec v1.4.0](https://github.com/container-storage-interface/spec/releases/tag/v1.4.0) | k8s.gcr.io/sig-storage/snapshot-validation-webhook  | 1.20     | 1.20         |
 
 Note: snapshot-controller, snapshot-validation-webhook, csi-snapshotter v4.1 requires v1 snapshot CRDs to be installed, but it serves both v1 and v1beta1 snapshot objects. Storage version is changed from v1beta1 to v1 in 4.1.0 so v1beta1 is deprecated and will be removed in a future release.
 
diff --git a/go.mod b/go.mod
index 266d15322..559bfc070 100644
--- a/go.mod
+++ b/go.mod
@@ -11,7 +11,7 @@ require (
 	github.com/imdario/mergo v0.3.11 // indirect
 	github.com/kubernetes-csi/csi-lib-utils v0.9.0
 	github.com/kubernetes-csi/csi-test/v4 v4.0.2
-	github.com/kubernetes-csi/external-snapshotter/client/v4 v4.1.0
+	github.com/kubernetes-csi/external-snapshotter/client/v4 v4.0.0
 	github.com/prometheus/client_golang v1.11.0
 	github.com/prometheus/client_model v0.2.0
 	github.com/prometheus/common v0.26.0
@@ -19,38 +19,38 @@ require (
 	golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5 // indirect
 	google.golang.org/appengine v1.6.7 // indirect
 	google.golang.org/grpc v1.38.0
-	k8s.io/api v0.22.0
-	k8s.io/apimachinery v0.22.0
-	k8s.io/client-go v0.22.0
-	k8s.io/component-base v0.22.0
+	k8s.io/api v0.22.0-rc.0
+	k8s.io/apimachinery v0.22.0-rc.0
+	k8s.io/client-go v0.22.0-rc.0
+	k8s.io/component-base v0.22.0-rc.0
 	k8s.io/klog/v2 v2.9.0
 	k8s.io/kubernetes v1.21.0
 )
 
 replace (
 	github.com/kubernetes-csi/external-snapshotter/client/v4 => ./client
-	k8s.io/api => k8s.io/api v0.22.0
-	k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.22.0
-	k8s.io/apimachinery => k8s.io/apimachinery v0.22.0
-	k8s.io/apiserver => k8s.io/apiserver v0.22.0
-	k8s.io/cli-runtime => k8s.io/cli-runtime v0.22.0
-	k8s.io/client-go => k8s.io/client-go v0.22.0
-	k8s.io/cloud-provider => k8s.io/cloud-provider v0.22.0
-	k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.22.0
-	k8s.io/code-generator => k8s.io/code-generator v0.22.0
-	k8s.io/component-base => k8s.io/component-base v0.22.0
-	k8s.io/component-helpers => k8s.io/component-helpers v0.22.0
-	k8s.io/controller-manager => k8s.io/controller-manager v0.22.0
-	k8s.io/cri-api => k8s.io/cri-api v0.22.0
-	k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.22.0
-	k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.22.0
-	k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.22.0
-	k8s.io/kube-proxy => k8s.io/kube-proxy v0.22.0
-	k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.22.0
-	k8s.io/kubectl => k8s.io/kubectl v0.22.0
-	k8s.io/kubelet => k8s.io/kubelet v0.22.0
-	k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.22.0
-	k8s.io/metrics => k8s.io/metrics v0.22.0
-	k8s.io/mount-utils => k8s.io/mount-utils v0.22.0
-	k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.22.0
+	k8s.io/api => k8s.io/api v0.22.0-rc.0
+	k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.22.0-rc.0
+	k8s.io/apimachinery => k8s.io/apimachinery v0.22.0-rc.0
+	k8s.io/apiserver => k8s.io/apiserver v0.22.0-rc.0
+	k8s.io/cli-runtime => k8s.io/cli-runtime v0.22.0-rc.0
+	k8s.io/client-go => k8s.io/client-go v0.22.0-rc.0
+	k8s.io/cloud-provider => k8s.io/cloud-provider v0.22.0-rc.0
+	k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.22.0-rc.0
+	k8s.io/code-generator => k8s.io/code-generator v0.22.0-rc.0
+	k8s.io/component-base => k8s.io/component-base v0.22.0-rc.0
+	k8s.io/component-helpers => k8s.io/component-helpers v0.22.0-rc.0
+	k8s.io/controller-manager => k8s.io/controller-manager v0.22.0-rc.0
+	k8s.io/cri-api => k8s.io/cri-api v0.22.0-rc.0
+	k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.22.0-rc.0
+	k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.22.0-rc.0
+	k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.22.0-rc.0
+	k8s.io/kube-proxy => k8s.io/kube-proxy v0.22.0-rc.0
+	k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.22.0-rc.0
+	k8s.io/kubectl => k8s.io/kubectl v0.22.0-rc.0
+	k8s.io/kubelet => k8s.io/kubelet v0.22.0-rc.0
+	k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.22.0-rc.0
+	k8s.io/metrics => k8s.io/metrics v0.22.0-rc.0
+	k8s.io/mount-utils => k8s.io/mount-utils v0.22.0-rc.0
+	k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.22.0-rc.0
 )
diff --git a/go.sum b/go.sum
index 14d8e4027..b195494f5 100644
--- a/go.sum
+++ b/go.sum
@@ -545,7 +545,6 @@ github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMB
 github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
 github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88=
 github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
-github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
 github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
 github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
 github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM=
@@ -854,9 +853,8 @@ golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxb
 golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
 golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
 golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
+golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba h1:O8mE0/t419eoIwhTFpKVkHiTs/Igowgfkj25AcZrtiE=
 golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
-golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac h1:7zkz7BUtwNFFqcowJ+RIgu2MaV/MapERkDIy+mwPyjs=
-golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
 golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
 golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
 golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
@@ -1064,24 +1062,24 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh
 honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
 honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
 honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
-k8s.io/api v0.22.0 h1:elCpMZ9UE8dLdYxr55E06TmSeji9I3KH494qH70/y+c=
-k8s.io/api v0.22.0/go.mod h1:0AoXXqst47OI/L0oGKq9DG61dvGRPXs7X4/B7KyjBCU=
-k8s.io/apiextensions-apiserver v0.22.0/go.mod h1:+9w/QQC/lwH2qTbpqndXXjwBgidlSmytvIUww16UACE=
-k8s.io/apimachinery v0.22.0 h1:CqH/BdNAzZl+sr3tc0D3VsK3u6ARVSo3GWyLmfIjbP0=
-k8s.io/apimachinery v0.22.0/go.mod h1:O3oNtNadZdeOMxHFVxOreoznohCpy0z6mocxbZr7oJ0=
-k8s.io/apiserver v0.22.0/go.mod h1:04kaIEzIQrTGJ5syLppQWvpkLJXQtJECHmae+ZGc/nc=
-k8s.io/cli-runtime v0.22.0/go.mod h1:An6zELQ7udUI0GaXvkuMqyopPA14dIgNqpH8cZu1vig=
-k8s.io/client-go v0.22.0 h1:sD6o9O6tCwUKCENw8v+HFsuAbq2jCu8cWC61/ydwA50=
-k8s.io/client-go v0.22.0/go.mod h1:GUjIuXR5PiEv/RVK5OODUsm6eZk7wtSWZSaSJbpFdGg=
-k8s.io/cloud-provider v0.22.0/go.mod h1:UsQNOxrStwOXoDfVNgEbKgcQt2BYuHGKobixm0zKTis=
-k8s.io/cluster-bootstrap v0.22.0/go.mod h1:VeZXiGfH+yfnC2KtvkSwNTAqahg6yiCV/szbWpoI+3k=
-k8s.io/code-generator v0.22.0/go.mod h1:eV77Y09IopzeXOJzndrDyCI88UBok2h6WxAlBwpxa+o=
-k8s.io/component-base v0.22.0 h1:ZTmX8hUqH9T9gc0mM42O+KDgtwTYbVTt2MwmLP0eK8A=
-k8s.io/component-base v0.22.0/go.mod h1:SXj6Z+V6P6GsBhHZVbWCw9hFjUdUYnJerlhhPnYCBCg=
-k8s.io/component-helpers v0.22.0/go.mod h1:YNIbQI59ayNiU8JHlPIxVkOUYycbKhk5Niy0pcyJOEY=
-k8s.io/controller-manager v0.22.0/go.mod h1:KCFcmFIjh512sVIm1EhAPJ+4miASDvbZA5eO/2nbr2M=
-k8s.io/cri-api v0.22.0/go.mod h1:mj5DGUtElRyErU5AZ8EM0ahxbElYsaLAMTPhLPQ40Eg=
-k8s.io/csi-translation-lib v0.22.0/go.mod h1:wb6bRqDth2jcHfty7mLdQc7nfknHhIkAlAZgSgplXhc=
+k8s.io/api v0.22.0-rc.0 h1:LcnCE0nmb2CVpvmlbHkIzjZUHcVpSoNcn8mJkIo4FoQ=
+k8s.io/api v0.22.0-rc.0/go.mod h1:EUcKB6RvpW74HMRUSSNwpUzrIHBdGT1FeAvOV+txic0=
+k8s.io/apiextensions-apiserver v0.22.0-rc.0/go.mod h1:KSr+2VJ6ye8Fy50q7xHZ/Tw8vrRII82KIKbz9eUFmeo=
+k8s.io/apimachinery v0.22.0-rc.0 h1:boMGWXiuYJl4sAEMTEyWJtX4VLEPf0LZ0nUh+vNALIg=
+k8s.io/apimachinery v0.22.0-rc.0/go.mod h1:O3oNtNadZdeOMxHFVxOreoznohCpy0z6mocxbZr7oJ0=
+k8s.io/apiserver v0.22.0-rc.0/go.mod h1:1AfFSkRbaPVFzfSIWd0m/onp49mmAOqXR9qrLJFixlw=
+k8s.io/cli-runtime v0.22.0-rc.0/go.mod h1:M/w0bryClqcYKNQ5ofMMNDJE1r5rvYaAj8GswxUNUJY=
+k8s.io/client-go v0.22.0-rc.0 h1:cxBtvZ9fH5teKp7OG3XX9YPprBqaPsmr9J24E6KqBiI=
+k8s.io/client-go v0.22.0-rc.0/go.mod h1:BZGppBKJh4UtgDZcIIh6vHJsJ1iZiXS7EwKZYWhyklo=
+k8s.io/cloud-provider v0.22.0-rc.0/go.mod h1:qgUpDsv2QmnKdVsZFSJWPvDnX8omjus7e0gY2KplDHk=
+k8s.io/cluster-bootstrap v0.22.0-rc.0/go.mod h1:H2JCqUWDe95ASKhudnPxwpRriNt5fIOrQi3c2KxMQrk=
+k8s.io/code-generator v0.22.0-rc.0/go.mod h1:eV77Y09IopzeXOJzndrDyCI88UBok2h6WxAlBwpxa+o=
+k8s.io/component-base v0.22.0-rc.0 h1:OOlymSTskXPEp9ie03pzN5HFzPtTxA7BAO3z/1vXHtk=
+k8s.io/component-base v0.22.0-rc.0/go.mod h1:DKSub/kewg24bK+3ZJ/csu86fSBYpGdYk837eCTvEKg=
+k8s.io/component-helpers v0.22.0-rc.0/go.mod h1:CFwkAFLr2SPaUETDC9OCWFuWEfpIlqfPPNJqUqJCpcM=
+k8s.io/controller-manager v0.22.0-rc.0/go.mod h1:qDAMaqIz2xikFvX/1pL24H7vES7rSw/8gu+9ggb5KDI=
+k8s.io/cri-api v0.22.0-rc.0/go.mod h1:mj5DGUtElRyErU5AZ8EM0ahxbElYsaLAMTPhLPQ40Eg=
+k8s.io/csi-translation-lib v0.22.0-rc.0/go.mod h1:zHbb9uwzlX2fPxNlETNMomnxebPvDa2/r421MbA2IGk=
 k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
 k8s.io/gengo v0.0.0-20201214224949-b6c5ce23f027/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E=
 k8s.io/heapster v1.2.0-beta.1/go.mod h1:h1uhptVXMwC8xtZBYsPXKVi8fpdlYkTs6k949KozGrM=
@@ -1092,21 +1090,21 @@ k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y=
 k8s.io/klog/v2 v2.8.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec=
 k8s.io/klog/v2 v2.9.0 h1:D7HV+n1V57XeZ0m6tdRkfknthUaM06VFbWldOFh8kzM=
 k8s.io/klog/v2 v2.9.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec=
-k8s.io/kube-aggregator v0.22.0/go.mod h1:zHTepg0Q4tKzru7Pwg1QYHWrU/wrvIXM8hUdDAH66qg=
-k8s.io/kube-controller-manager v0.22.0/go.mod h1:E/EYMoCj8bbPRmu19JF4B9QLyQL8Tywg+9Q/rg+F80U=
+k8s.io/kube-aggregator v0.22.0-rc.0/go.mod h1:g0xtiBSsbMKvewN7xR/Icib4TrHxtvrJcHtYvFsgw7k=
+k8s.io/kube-controller-manager v0.22.0-rc.0/go.mod h1:ZchhI8OeVsVKb0H6mhidYTdj7ZaXGHm/PHMN0iqrfCE=
 k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7/go.mod h1:wXW5VT87nVfh/iLV8FpR2uDvrFyomxbtb1KivDbvPTE=
 k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e h1:KLHHjkdQFomZy8+06csTWZ0m1343QqxZhR2LJ1OxCYM=
 k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw=
-k8s.io/kube-proxy v0.22.0/go.mod h1:2ckKSCr8kZ0kNNCgxM7lt0g5CAaY767djotK4AEFPmI=
-k8s.io/kube-scheduler v0.22.0/go.mod h1:n6tdYAiaoqXGLazCwIpOEg42qby0VMDs1KmN4DjQf50=
-k8s.io/kubectl v0.22.0/go.mod h1:eeuP92uZbVL2UnOaf0nj9OjtI0hi/nekHU+0isURer0=
-k8s.io/kubelet v0.22.0/go.mod h1:CMdsuh9OFgbpeE+n46GpVMDecLlI0HxSRHMoNrTmJk4=
+k8s.io/kube-proxy v0.22.0-rc.0/go.mod h1:3DEWLh9S8n8guxNJ7EaUu70+JLtU8QfyRtsy/DXPmvU=
+k8s.io/kube-scheduler v0.22.0-rc.0/go.mod h1:Yo/C7dRWhZtbnsIOwfb6015GvH+Tg9hpmlhvBUocUfc=
+k8s.io/kubectl v0.22.0-rc.0/go.mod h1:7/NjJzIH3rgPmfO9C8V3u/yIKeJdK7ptpFbPWQGKYas=
+k8s.io/kubelet v0.22.0-rc.0/go.mod h1:Fn1EtVFPh8IGix/PMKQ9cyCih3Fx0OYn4rDsTzCSa6w=
 k8s.io/kubernetes v1.21.0 h1:LUUQgdFsKB+wVgKPUapmXjkvvJHSLN53CuQwre4c+mM=
 k8s.io/kubernetes v1.21.0/go.mod h1:Yx6XZ8zalyqEk7but+j4+5SvLzdyH1eeqZ4cwO+5dD4=
-k8s.io/legacy-cloud-providers v0.22.0/go.mod h1:2tKlbeA9r0OYnBHyqHcnO1EoAeqYXw2IZH99DYwwErM=
-k8s.io/metrics v0.22.0/go.mod h1:eYnwafAUNLLpVmY/msoq0RKIKH5C4TzfjKnMZ0Xrt3A=
-k8s.io/mount-utils v0.22.0/go.mod h1:gUi5ht+05KHYc/vJ9q9wbvG3MCYBeOsB5FdTyM60Pzo=
-k8s.io/sample-apiserver v0.22.0/go.mod h1:Bkl0f9E1Moxwjvqct7kzDlTvNUTavsworU5FTPlVooA=
+k8s.io/legacy-cloud-providers v0.22.0-rc.0/go.mod h1:fOyxuQanqiXuBQVWsSxM8n76gyYGHF/woiwAPWDCA5U=
+k8s.io/metrics v0.22.0-rc.0/go.mod h1:bBRVf/lv8c0H1KVceeriQxn9myZaQFWQUONhKs0p+kY=
+k8s.io/mount-utils v0.22.0-rc.0/go.mod h1:gUi5ht+05KHYc/vJ9q9wbvG3MCYBeOsB5FdTyM60Pzo=
+k8s.io/sample-apiserver v0.22.0-rc.0/go.mod h1:R0rb4qpxHuRoJagv2OJjOMekpvEeoRJjyOwF0T9h5S0=
 k8s.io/system-validators v1.4.0/go.mod h1:bPldcLgkIUK22ALflnsXk8pvkTEndYdNuaHH6gRrl0Q=
 k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
 k8s.io/utils v0.0.0-20210707171843-4b05e18ac7d9 h1:imL9YgXQ9p7xmPzHFm/vVd/cF78jad+n4wK1ABwYtMM=
@@ -1120,7 +1118,7 @@ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8
 rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4=
 rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
 rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
-sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.22/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg=
+sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.21/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg=
 sigs.k8s.io/kustomize/api v0.8.11/go.mod h1:a77Ls36JdfCWojpUqR6m60pdGY1AYFix4AH83nJtY1g=
 sigs.k8s.io/kustomize/cmd/config v0.9.13/go.mod h1:7547FLF8W/lTaDf0BDqFTbZxM9zqwEJqCKN9sSR0xSs=
 sigs.k8s.io/kustomize/kustomize/v4 v4.2.0/go.mod h1:MOkR6fmhwG7hEDRXBYELTi5GSFcLwfqwzTRHW3kv5go=
diff --git a/pkg/metrics/metrics.go b/pkg/metrics/metrics.go
index 84adc67b3..92bb07364 100644
--- a/pkg/metrics/metrics.go
+++ b/pkg/metrics/metrics.go
@@ -111,6 +111,9 @@ type MetricsManager interface {
 	// status - the operation status, if not specified, i.e., status == nil, an
 	//          "Unknown" status of the passed-in operation is assumed.
 	RecordMetrics(op OperationKey, status OperationStatus, driverName string)
+
+	// GetRegistry() returns the metrics.KubeRegistry used by this metrics manager.
+	GetRegistry() k8smetrics.KubeRegistry
 }
 
 // OperationKey is a structure which holds information to
@@ -265,6 +268,7 @@ func (opMgr *operationMetricsManager) recordCancelMetric(val OperationValue, key
 
 func (opMgr *operationMetricsManager) init() {
 	opMgr.registry = k8smetrics.NewKubeRegistry()
+	k8smetrics.RegisterProcessStartTime(opMgr.registry.Register)
 	opMgr.opLatencyMetrics = k8smetrics.NewHistogramVec(
 		&k8smetrics.HistogramOpts{
 			Subsystem: subSystem,
@@ -327,6 +331,10 @@ func (opMgr *operationMetricsManager) StartMetricsEndpoint(pattern, addr string,
 	return srv, nil
 }
 
+func (opMgr *operationMetricsManager) GetRegistry() k8smetrics.KubeRegistry {
+	return opMgr.registry
+}
+
 // snapshotProvisionType represents which kind of snapshot a metric is
 type snapshotProvisionType string
 
diff --git a/vendor/golang.org/x/time/rate/rate.go b/vendor/golang.org/x/time/rate/rate.go
index 0cfcc8463..a98fe7782 100644
--- a/vendor/golang.org/x/time/rate/rate.go
+++ b/vendor/golang.org/x/time/rate/rate.go
@@ -145,6 +145,7 @@ func (r *Reservation) DelayFrom(now time.Time) time.Duration {
 // Cancel is shorthand for CancelAt(time.Now()).
 func (r *Reservation) Cancel() {
 	r.CancelAt(time.Now())
+	return
 }
 
 // CancelAt indicates that the reservation holder will not perform the reserved action
@@ -185,6 +186,8 @@ func (r *Reservation) CancelAt(now time.Time) {
 			r.lim.lastEvent = prevEvent
 		}
 	}
+
+	return
 }
 
 // Reserve is shorthand for ReserveN(time.Now(), 1).
@@ -364,13 +367,20 @@ func (lim *Limiter) advance(now time.Time) (newNow time.Time, newLast time.Time,
 		last = now
 	}
 
-	// Calculate the new number of tokens, due to time that passed.
+	// Avoid making delta overflow below when last is very old.
+	maxElapsed := lim.limit.durationFromTokens(float64(lim.burst) - lim.tokens)
 	elapsed := now.Sub(last)
+	if elapsed > maxElapsed {
+		elapsed = maxElapsed
+	}
+
+	// Calculate the new number of tokens, due to time that passed.
 	delta := lim.limit.tokensFromDuration(elapsed)
 	tokens := lim.tokens + delta
 	if burst := float64(lim.burst); tokens > burst {
 		tokens = burst
 	}
+
 	return now, last, tokens
 }
 
@@ -378,11 +388,15 @@ func (lim *Limiter) advance(now time.Time) (newNow time.Time, newLast time.Time,
 // of time it takes to accumulate them at a rate of limit tokens per second.
 func (limit Limit) durationFromTokens(tokens float64) time.Duration {
 	seconds := tokens / float64(limit)
-	return time.Duration(float64(time.Second) * seconds)
+	return time.Nanosecond * time.Duration(1e9*seconds)
 }
 
 // tokensFromDuration is a unit conversion function from a time duration to the number of tokens
 // which could be accumulated during that duration at a rate of limit tokens per second.
 func (limit Limit) tokensFromDuration(d time.Duration) float64 {
-	return d.Seconds() * float64(limit)
+	// Split the integer and fractional parts ourself to minimize rounding errors.
+	// See golang.org/issues/34861.
+	sec := float64(d/time.Second) * float64(limit)
+	nsec := float64(d%time.Second) * float64(limit)
+	return sec + nsec/1e9
 }
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 3b1c02bb1..98a3931f7 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -67,7 +67,7 @@ github.com/kubernetes-csi/csi-lib-utils/rpc
 ## explicit
 github.com/kubernetes-csi/csi-test/v4/driver
 github.com/kubernetes-csi/csi-test/v4/utils
-# github.com/kubernetes-csi/external-snapshotter/client/v4 v4.1.0 => ./client
+# github.com/kubernetes-csi/external-snapshotter/client/v4 v4.0.0 => ./client
 ## explicit
 github.com/kubernetes-csi/external-snapshotter/client/v4/apis/volumesnapshot/v1
 github.com/kubernetes-csi/external-snapshotter/client/v4/apis/volumesnapshot/v1beta1
@@ -140,7 +140,7 @@ golang.org/x/text/secure/bidirule
 golang.org/x/text/transform
 golang.org/x/text/unicode/bidi
 golang.org/x/text/unicode/norm
-# golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac
+# golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba
 golang.org/x/time/rate
 # google.golang.org/appengine v1.6.7
 ## explicit
@@ -239,7 +239,7 @@ gopkg.in/inf.v0
 gopkg.in/yaml.v2
 # gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b
 gopkg.in/yaml.v3
-# k8s.io/api v0.22.0 => k8s.io/api v0.22.0
+# k8s.io/api v0.22.0-rc.0 => k8s.io/api v0.22.0-rc.0
 ## explicit
 k8s.io/api/admission/v1
 k8s.io/api/admission/v1beta1
@@ -286,7 +286,7 @@ k8s.io/api/scheduling/v1beta1
 k8s.io/api/storage/v1
 k8s.io/api/storage/v1alpha1
 k8s.io/api/storage/v1beta1
-# k8s.io/apimachinery v0.22.0 => k8s.io/apimachinery v0.22.0
+# k8s.io/apimachinery v0.22.0-rc.0 => k8s.io/apimachinery v0.22.0-rc.0
 ## explicit
 k8s.io/apimachinery/pkg/api/apitesting/fuzzer
 k8s.io/apimachinery/pkg/api/errors
@@ -332,7 +332,7 @@ k8s.io/apimachinery/pkg/version
 k8s.io/apimachinery/pkg/watch
 k8s.io/apimachinery/third_party/forked/golang/json
 k8s.io/apimachinery/third_party/forked/golang/reflect
-# k8s.io/client-go v0.22.0 => k8s.io/client-go v0.22.0
+# k8s.io/client-go v0.22.0-rc.0 => k8s.io/client-go v0.22.0-rc.0
 ## explicit
 k8s.io/client-go/applyconfigurations/admissionregistration/v1
 k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1
@@ -595,7 +595,7 @@ k8s.io/client-go/util/flowcontrol
 k8s.io/client-go/util/homedir
 k8s.io/client-go/util/keyutil
 k8s.io/client-go/util/workqueue
-# k8s.io/component-base v0.22.0 => k8s.io/component-base v0.22.0
+# k8s.io/component-base v0.22.0-rc.0 => k8s.io/component-base v0.22.0-rc.0
 ## explicit
 k8s.io/component-base/metrics
 k8s.io/component-base/version
@@ -621,27 +621,27 @@ sigs.k8s.io/structured-merge-diff/v4/value
 # sigs.k8s.io/yaml v1.2.0
 sigs.k8s.io/yaml
 # github.com/kubernetes-csi/external-snapshotter/client/v4 => ./client
-# k8s.io/api => k8s.io/api v0.22.0
-# k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.22.0
-# k8s.io/apimachinery => k8s.io/apimachinery v0.22.0
-# k8s.io/apiserver => k8s.io/apiserver v0.22.0
-# k8s.io/cli-runtime => k8s.io/cli-runtime v0.22.0
-# k8s.io/client-go => k8s.io/client-go v0.22.0
-# k8s.io/cloud-provider => k8s.io/cloud-provider v0.22.0
-# k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.22.0
-# k8s.io/code-generator => k8s.io/code-generator v0.22.0
-# k8s.io/component-base => k8s.io/component-base v0.22.0
-# k8s.io/component-helpers => k8s.io/component-helpers v0.22.0
-# k8s.io/controller-manager => k8s.io/controller-manager v0.22.0
-# k8s.io/cri-api => k8s.io/cri-api v0.22.0
-# k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.22.0
-# k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.22.0
-# k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.22.0
-# k8s.io/kube-proxy => k8s.io/kube-proxy v0.22.0
-# k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.22.0
-# k8s.io/kubectl => k8s.io/kubectl v0.22.0
-# k8s.io/kubelet => k8s.io/kubelet v0.22.0
-# k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.22.0
-# k8s.io/metrics => k8s.io/metrics v0.22.0
-# k8s.io/mount-utils => k8s.io/mount-utils v0.22.0
-# k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.22.0
+# k8s.io/api => k8s.io/api v0.22.0-rc.0
+# k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.22.0-rc.0
+# k8s.io/apimachinery => k8s.io/apimachinery v0.22.0-rc.0
+# k8s.io/apiserver => k8s.io/apiserver v0.22.0-rc.0
+# k8s.io/cli-runtime => k8s.io/cli-runtime v0.22.0-rc.0
+# k8s.io/client-go => k8s.io/client-go v0.22.0-rc.0
+# k8s.io/cloud-provider => k8s.io/cloud-provider v0.22.0-rc.0
+# k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.22.0-rc.0
+# k8s.io/code-generator => k8s.io/code-generator v0.22.0-rc.0
+# k8s.io/component-base => k8s.io/component-base v0.22.0-rc.0
+# k8s.io/component-helpers => k8s.io/component-helpers v0.22.0-rc.0
+# k8s.io/controller-manager => k8s.io/controller-manager v0.22.0-rc.0
+# k8s.io/cri-api => k8s.io/cri-api v0.22.0-rc.0
+# k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.22.0-rc.0
+# k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.22.0-rc.0
+# k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.22.0-rc.0
+# k8s.io/kube-proxy => k8s.io/kube-proxy v0.22.0-rc.0
+# k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.22.0-rc.0
+# k8s.io/kubectl => k8s.io/kubectl v0.22.0-rc.0
+# k8s.io/kubelet => k8s.io/kubelet v0.22.0-rc.0
+# k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.22.0-rc.0
+# k8s.io/metrics => k8s.io/metrics v0.22.0-rc.0
+# k8s.io/mount-utils => k8s.io/mount-utils v0.22.0-rc.0
+# k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.22.0-rc.0


Test patch:
diff --git a/pkg/metrics/metrics_test.go b/pkg/metrics/metrics_test.go
index e19892dac..c16fe971e 100644
--- a/pkg/metrics/metrics_test.go
+++ b/pkg/metrics/metrics_test.go
@@ -44,8 +44,9 @@ var (
 )
 
 const (
-	httpPattern = "/metrics"
-	addr        = "localhost:0"
+	httpPattern            = "/metrics"
+	addr                   = "localhost:0"
+	processStartTimeMetric = "process_start_time_seconds"
 )
 
 type fakeOpStatus struct {
@@ -707,3 +708,24 @@ func containsMetrics(expectedMfs, gotMfs []*cmg.MetricFamily) bool {
 
 	return true
 }
+
+func TestProcessStartTimeMetricExist(t *testing.T) {
+	mgr, wg, srv := initMgr()
+	defer shutdown(srv, wg)
+	metricsFamilies, err := mgr.GetRegistry().Gather()
+	if err != nil {
+		t.Fatalf("Error fetching metrics: %v", err)
+	}
+
+	for _, metricsFamily := range metricsFamilies {
+		if metricsFamily.GetName() == processStartTimeMetric {
+			return
+		}
+		m := metricsFamily.GetMetric()
+		if m[0].GetGauge().GetValue() <= 0 {
+			t.Fatalf("Expected non zero timestamp for process start time")
+		}
+	}
+
+	t.Fatalf("Metrics does not contain %v. Scraped content: %v", processStartTimeMetric, metricsFamilies)
+}