-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
feature: added AdmissionController metrics #7711
Conversation
@fblgit: This issue is currently awaiting triage. If Ingress contributors determines this is a relevant issue, they will accept it by applying the The Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Hi @fblgit. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@rikatz first basic instrumentation for the admission controller as promised. Do let me know if there is anything else missing for this one. |
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.
/assign
/ok-to-test |
internal/ingress/metric/main.go
Outdated
@@ -130,6 +136,7 @@ func (c *collector) RemoveMetrics(ingresses, hosts []string) { | |||
func (c *collector) Start() { | |||
c.registry.MustRegister(c.nginxStatus) | |||
c.registry.MustRegister(c.nginxProcess) | |||
c.registry.MustRegister(c.admissionController) |
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 for the sake of saving a bit of CPU, can we check if Admission is configured before registering?
you can do something like
if n.cfg.ValidationWebhook != ""
somewhere, just so you can just register and start the admission controller
Or you can verify this earlier, like in line 96 and then check here if c.admissionController != nil :)
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.
ok, sounds fair. let me fix these 3 things
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.
the object is too large, just passed the string of the ValidationWebhook for this use-case into Start/Stop
@fblgit PR looks great. Left some comment just so we just collect the metrics if the validationWebhook is enabled (we can save just tiny CPU, but it still is CPU) and also a nit about the header Thanks! |
/assign |
04b0973
to
bdb721d
Compare
@rikatz all yours, should be good now. sorry for the delay, had a hell of a week. thank you |
/label tide/merge-method-squash |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: fblgit, rikatz 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 |
* feature: added AdmissionController metrics * fix: flag control on admissionCollector * fix: admission collector disclaimer year and linting
What this PR does / why we need it:
Adds AdmissionController basic instrumentation to show:
Types of changes
Which issue/s this PR fixes
How Has This Been Tested?
Checklist: