Add new prometheus metric for orphaned ingress (#8230)

* Add new metric for orhaned ingress

* Fix const labels

* Fix after rebase
This commit is contained in:
Makhonin Alexey 2023-01-16 16:22:51 +04:00 committed by GitHub
parent dbe88c55a3
commit 39b5ce844b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 67 additions and 7 deletions

View file

@ -43,6 +43,8 @@ type Collector interface {
IncCheckCount(string, string)
IncCheckErrorCount(string, string)
IncOrphanIngress(string, string, string)
DecOrphanIngress(string, string, string)
RemoveMetrics(ingresses, endpoints, certificates []string)
@ -181,6 +183,14 @@ func (c *collector) SetSSLInfo(servers []*ingress.Server) {
c.ingressController.SetSSLInfo(servers)
}
func (c *collector) IncOrphanIngress(namespace string, name string, orphanityType string) {
c.ingressController.IncOrphanIngress(namespace, name, orphanityType)
}
func (c *collector) DecOrphanIngress(namespace string, name string, orphanityType string) {
c.ingressController.DecOrphanIngress(namespace, name, orphanityType)
}
func (c *collector) SetHosts(hosts sets.String) {
c.socket.SetHosts(hosts)
}