feature: added AdmissionController metrics (#7711)

* feature: added AdmissionController metrics

* fix: flag control on admissionCollector

* fix: admission collector disclaimer year and linting
This commit is contained in:
FBLGit 2021-11-03 01:54:34 +08:00 committed by GitHub
parent 43c22c4914
commit a5bab6a715
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 333 additions and 14 deletions

View file

@ -138,7 +138,9 @@ func main() {
klog.Fatalf("Error creating prometheus collector: %v", err)
}
}
mc.Start()
// Pass the ValidationWebhook status to determine if we need to start the collector
// for the admissionWebhook
mc.Start(conf.ValidationWebhook)
if conf.EnableProfiling {
go registerProfiler()