Skip to content

Commit 5161ed2

Browse files
ivanmatmatioktalz
authored andcommitted
MINOR: add prometheus endpoint for ingress controller
1 parent 91a5c0d commit 5161ed2

File tree

5 files changed

+190
-15
lines changed

5 files changed

+190
-15
lines changed

controller/utils/flags.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,5 @@ type OSArgs struct { //nolint:maligned
9999
RuntimeDir string `long:"runtime-dir" description:"path to HAProxy runtime directory. NOTE: works only in External mode"`
100100
DisableServiceExternalName bool `long:"disable-service-external-name" description:"disable forwarding to ExternalName Services due to CVE-2021-25740"`
101101
UseWiths6Overlay bool `long:"with-s6-overlay" description:"use s6 overlay to start/stpop/reload HAProxy"`
102+
PromotheusPort int64 `long:"enable-prometheus-port" description:"port to listen on for Prometheus metrics"`
102103
}

go.mod

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ require (
99
github.com/haproxytech/config-parser/v4 v4.0.0-rc2.0.20211021093817-f9021b6ca61c
1010
github.com/jessevdk/go-flags v1.4.0
1111
github.com/pires/go-proxyproto v0.6.1
12+
github.com/prometheus/client_golang v1.12.1
1213
github.com/stretchr/testify v1.7.0
1314
k8s.io/api v0.22.2
1415
k8s.io/apimachinery v0.22.2
@@ -19,6 +20,8 @@ require (
1920
github.com/PuerkitoBio/purell v1.1.1 // indirect
2021
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
2122
github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496 // indirect
23+
github.com/beorn7/perks v1.0.1 // indirect
24+
github.com/cespare/xxhash/v2 v2.1.2 // indirect
2225
github.com/davecgh/go-spew v1.1.1 // indirect
2326
github.com/evanphx/json-patch v4.11.0+incompatible // indirect
2427
github.com/go-logr/logr v0.4.0 // indirect
@@ -42,23 +45,27 @@ require (
4245
github.com/googleapis/gnostic v0.5.5 // indirect
4346
github.com/haproxytech/go-logger v1.0.0 // indirect
4447
github.com/imdario/mergo v0.3.5 // indirect
45-
github.com/json-iterator/go v1.1.11 // indirect
48+
github.com/json-iterator/go v1.1.12 // indirect
4649
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
4750
github.com/mailru/easyjson v0.7.1 // indirect
51+
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
4852
github.com/mitchellh/mapstructure v1.2.2 // indirect
4953
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
50-
github.com/modern-go/reflect2 v1.0.1 // indirect
54+
github.com/modern-go/reflect2 v1.0.2 // indirect
5155
github.com/pkg/errors v0.9.1 // indirect
5256
github.com/pmezard/go-difflib v1.0.0 // indirect
57+
github.com/prometheus/client_model v0.2.0 // indirect
58+
github.com/prometheus/common v0.32.1 // indirect
59+
github.com/prometheus/procfs v0.7.3 // indirect
5360
github.com/spf13/pflag v1.0.5 // indirect
5461
go.mongodb.org/mongo-driver v1.5.1 // indirect
55-
golang.org/x/net v0.0.0-20210520170846-37e1c6afe023 // indirect
56-
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d // indirect
57-
golang.org/x/sys v0.0.0-20210817190340-bfb29a6856f2 // indirect
62+
golang.org/x/net v0.0.0-20210525063256-abc453219eb5 // indirect
63+
golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c // indirect
64+
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9 // indirect
5865
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d // indirect
5966
golang.org/x/text v0.3.6 // indirect
6067
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect
61-
google.golang.org/appengine v1.6.5 // indirect
68+
google.golang.org/appengine v1.6.6 // indirect
6269
google.golang.org/protobuf v1.26.0 // indirect
6370
gopkg.in/inf.v0 v0.9.1 // indirect
6471
gopkg.in/yaml.v2 v2.4.0 // indirect

0 commit comments

Comments
 (0)