-
Notifications
You must be signed in to change notification settings - Fork 160
Emit GKE PDCSI component version metric #719
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
Emit GKE PDCSI component version metric #719
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: saikat-royc 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 |
26c0e8b
to
43b5384
Compare
/retest |
Can I ask what is benefit of adding this version through metrics? I think we have other ways to get the component version number through GKE |
I remember in GKE we have add_on_* something and that will contain the component versions. |
GKE is moving to a different component release pipeline which changes how versions are exported. |
43b5384
to
e4c88e3
Compare
|
||
// InitializeHttpHandler sets up a server and creates a handler for metrics. | ||
func (mm *metricsManager) InitializeHttpHandler(address, path string) { | ||
mux := http.NewServeMux() |
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.
Just a note that a mux is only necessary if there are multiple handlers, so here either this or the previous version of this code would work
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.
Keeping mux for future proofing?
e4c88e3
to
6c7d43b
Compare
/retest |
/lgtm |
What type of PR is this?
What this PR does / why we need it:
This PR enables the gce-pd-driver container to emit 'component_version' metric. This metric will be emitted only by the controller driver gce-pd-driver container, when the env
GKE_PDCSI_VERSION
is setup in the driver manifest.In GKE the env variable would be populated from metadata annotations (which is automatically populated for GKE pod). This metric will enable GroupBy queries on PDCSI component version
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Tested locally as follows:
sample patch:
Does this PR introduce a user-facing change?: