Skip to content

Cherry-picks of #409 and #439: Adding --http-endpoint to snapshot components#511

Merged
k8s-ci-robot merged 2 commits intokubernetes-csi:release-3.1from
chrishenzie:release-3.1-http-endpoint
May 3, 2021
Merged

Cherry-picks of #409 and #439: Adding --http-endpoint to snapshot components#511
k8s-ci-robot merged 2 commits intokubernetes-csi:release-3.1from
chrishenzie:release-3.1-http-endpoint

Conversation

@chrishenzie
Copy link
Contributor

What type of PR is this?

/kind feature

What this PR does / why we need it:
This PR contains cherry-picks of #409 and #439, which each provide an --http-endpoint flag for the snapshot-controller and csi-snapshotter.

This is already present in v4; backporting so v3 users can make use of leader election health checks and have a consistent --http-endpoint flag across the snapshot-controller and csi-snapshotter.

Does this PR introduce a user-facing change?:

The `--http-endpoint` and `--metrics-path` flags have been added to support metrics for the snapshot-controller. To enable metrics, the user must configure a `--metrics-path` such as `:9102`. The default value for `--metrics-path` is the empty string, meaning this feature is disabled by default. The default value for `--metrics-path` is `/metrics`.
Added leader election health check at the metrics port + path "/healthz/leader-election".
klog/v2 is used for logging
The `--metrics-address` flag is deprecated and replaced by `http-endpoint`, which enables handlers from both metrics manager and leader election health check.

/assign @xing-yang

I copied over the release notes from the two PRs.

ggriffiths and others added 2 commits May 1, 2021 09:17
Signed-off-by: Grant Griffiths <grant@portworx.com>
@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels May 1, 2021
@k8s-ci-robot k8s-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label May 1, 2021
metricsManager.SetDriverName(driverName)
go func() {
klog.Infof("ServeMux listening at %q", addr)
err := http.ListenAndServe(*metricsAddress, mux)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The following PR should be cherry-picked as well:
#497

It's fine to submit a follow-up for that.

@xing-yang
Copy link
Collaborator

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 3, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chrishenzie, xing-yang

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 3, 2021
@k8s-ci-robot k8s-ci-robot merged commit f63ca22 into kubernetes-csi:release-3.1 May 3, 2021
@chrishenzie chrishenzie deleted the release-3.1-http-endpoint branch May 3, 2021 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants