Skip to content
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 metrics to machine and cluster controller #1736

Merged
merged 1 commit into from
Nov 12, 2019

Conversation

wfernandes
Copy link
Contributor

@wfernandes wfernandes commented Nov 7, 2019

Signed-off-by: Warren Fernandes [email protected]

What this PR does / why we need it:
This PR adds prometheus metrics to the machine and cluster controller.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Related to #1477

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Nov 7, 2019
@k8s-ci-robot k8s-ci-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Nov 7, 2019
controllers/cluster_controller.go Outdated Show resolved Hide resolved
controllers/machine_controller.go Outdated Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 8, 2019
controllers/cluster_controller.go Outdated Show resolved Hide resolved
controllers/cluster_controller.go Outdated Show resolved Hide resolved
controllers/cluster_controller.go Outdated Show resolved Hide resolved
@wfernandes
Copy link
Contributor Author

/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 8, 2019
@wfernandes wfernandes force-pushed the metrics branch 2 times, most recently from efd75fc to 661ce79 Compare November 8, 2019 22:14
Comment on lines 183 to 184
// TODO: [wfernandes] pass context here
_, err := secret.Get(r.Client, c, secret.Kubeconfig)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I noticed that secret.Get is using context.TODO instead of being passed the ctx which in most cases is available. I thought that I could make a separate refactor PR for that.

Copy link
Member

Choose a reason for hiding this comment

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

This is a good first issue for v1a3

@wfernandes
Copy link
Contributor Author

/hold cancel
@vincepri I made the changes you suggested and I think it came out well. Let me know WYT. If all looks good, I can squash the two commits.

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 8, 2019
controllers/cluster_controller.go Outdated Show resolved Hide resolved
controllers/cluster_controller.go Outdated Show resolved Hide resolved
Comment on lines 183 to 184
// TODO: [wfernandes] pass context here
_, err := secret.Get(r.Client, c, secret.Kubeconfig)
Copy link
Member

Choose a reason for hiding this comment

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

This is a good first issue for v1a3

controllers/cluster_controller.go Outdated Show resolved Hide resolved
controllers/cluster_controller.go Outdated Show resolved Hide resolved
@vincepri
Copy link
Member

/milestone v0.3.0

Copy link
Member

@vincepri vincepri left a comment

Choose a reason for hiding this comment

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

/approve
/assign @detiber

for final review/lgtm

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vincepri, wfernandes

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 /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 Nov 12, 2019
@detiber
Copy link
Member

detiber commented Nov 12, 2019

In general lgtm, but should we close #1477 with the merging of this PR? Some of the metrics it talks about are related to creation/deletion of resources.

Should we leave the issue open until we add additional metrics for the child resources we are creating as well?

@vincepri
Copy link
Member

I'd leave it open until we have a wider metrics plan

@detiber
Copy link
Member

detiber commented Nov 12, 2019

Updated the description to not close the issue.
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 12, 2019
@k8s-ci-robot k8s-ci-robot merged commit 4e80364 into kubernetes-sigs:master Nov 12, 2019
@vincepri
Copy link
Member

@wfernandes
Copy link
Contributor Author

@vincepri I will definitely do that. I was going to ask in the channel where to document these metrics. Thanks for the tip.

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. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants