File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ import (
3030 "github.com/apache/apisix-ingress-controller/pkg/apisix"
3131 "github.com/apache/apisix-ingress-controller/pkg/config"
3232 "github.com/apache/apisix-ingress-controller/pkg/log"
33+ "github.com/apache/apisix-ingress-controller/pkg/metrics"
3334 "github.com/apache/apisix-ingress-controller/pkg/types"
3435)
3536
@@ -81,9 +82,10 @@ func NewServer(cfg *config.Config) (*Server, error) {
8182 admission := gin .New ()
8283 admission .Use (gin .Recovery (), gin .Logger ())
8384 apirouter .MountWebhooks (admission , & apisix.ClusterOptions {
84- Name : cfg .APISIX .DefaultClusterName ,
85- AdminKey : cfg .APISIX .DefaultClusterAdminKey ,
86- BaseURL : cfg .APISIX .DefaultClusterBaseURL ,
85+ Name : cfg .APISIX .DefaultClusterName ,
86+ AdminKey : cfg .APISIX .DefaultClusterAdminKey ,
87+ BaseURL : cfg .APISIX .DefaultClusterBaseURL ,
88+ MetricsCollector : metrics .NewPrometheusCollector (),
8789 })
8890
8991 srv .admissionServer = & http.Server {
You can’t perform that action at this time.
0 commit comments