-
Notifications
You must be signed in to change notification settings - Fork 346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add prometheus metrics to CSI external-provisioner using new csi-lib-utils library #388
Add prometheus metrics to CSI external-provisioner using new csi-lib-utils library #388
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: saad-ali The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
c9af6a7
to
65ebb2a
Compare
@@ -68,6 +69,9 @@ var ( | |||
leaderElectionNamespace = flag.String("leader-election-namespace", "", "Namespace where the leader election resource lives. Defaults to the pod namespace if not set.") | |||
strictTopology = flag.Bool("strict-topology", false, "Passes only selected node topology to CreateVolume Request, unlike default behavior of passing aggregated cluster topologies that match with topology keys of the selected node.") | |||
|
|||
metricsAddress = flag.String("metrics-address", "", "The TCP network address address where the prometheus metrics endpoint will listen (example: `:8080`). The default is empty string, which means metrics endpoint is disabled.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also update README.md with these new options?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do.
go.mod
Outdated
k8s.io/klog v1.0.0 | ||
k8s.io/kubernetes v1.14.0 | ||
sigs.k8s.io/sig-storage-lib-external-provisioner v4.0.1+incompatible | ||
) | ||
|
||
replace k8s.io/api => k8s.io/api v0.0.0-20190918195907-bd6ac527cfd2 | ||
replace k8s.io/api => k8s.io/api v0.17.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Were these forced overrides or automatic? I'm wondering if we can actually remove most of these replace statements now that most of the repos have switched to semantic versioning.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Automatic via go-get-kubernetes.sh
I'll do some clean up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering if we can actually remove most of these replace statements now that most of the repos have switched to semantic versioning.
We can't, because the semantic versioning for Kubernetes components is too weak: go get -u ./...
for updating to the latest "minor and patch upgrades" of other dependencies would also update all Kubernetes components if we removed the replace statements. This is bad because there's no guarantee that 0.18.0 is really API compatible with 0.17.0. I think it's better to update Kubernetes via the script and use go get -u ./...
for the rest.
65ebb2a
to
701a7f3
Compare
Feedback addressed. PTAL |
README.md
Outdated
@@ -61,6 +61,10 @@ Note that the external-provisioner does not scale with more replicas. Only one e | |||
|
|||
* `--worker-threads <num>`: Number of simultaneously running `ControllerCreateVolume` and `ControllerDeleteVolume` operations. Default value is `100`. | |||
|
|||
* `metrics-address`: The TCP network address address where the prometheus metrics endpoint will run (example: `:8080` which corresponds to port 8080 on local host). The default is empty string, which means metrics endpoint is disabled. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add "--" similar to the other options
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
701a7f3
to
6975c89
Compare
Feedback addressed PTAL |
Change Kubernetes dependency to v1.17.0 Update external-snapshotter to head (for 1.17.0 compatability) Change csi-lib-utils to v0.7.0
6975c89
to
e73400e
Compare
Rebased to official 0.7.0 csi-lib-utils release. |
/lgtm |
…go_modules/google.golang.org/grpc-1.51.0 Bump google.golang.org/grpc from 1.50.1 to 1.51.0
What type of PR is this?
/kind feature
What this PR does / why we need it:
This PR adds metrics to the external-provisioner CSI gRPC calls:
csi_sidecar_operations_seconds
[ALPHA] Container Storage Interface operation duration with gRPC error code status totalWhich issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: