cloud: enable prometheus server
This makes cloud components start a Prometheus server on a separate port
(:4243 by default) using either gRPC TLS credentials or plain HTTP.
The Prometheus server currently only export the standard Go/Process
metrics that the default Prometheus library exports.
Change-Id: I9f2ae20c34446c0e10a946d4a93251764f5d2fce
Reviewed-on: https://review.monogon.dev/c/monogon/+/1599
Reviewed-by: Leopold Schabel <leo@monogon.tech>
Tested-by: Jenkins CI
diff --git a/cloud/shepherd/equinix/manager/server/main.go b/cloud/shepherd/equinix/manager/server/main.go
index faf84f1..14b94bc 100644
--- a/cloud/shepherd/equinix/manager/server/main.go
+++ b/cloud/shepherd/equinix/manager/server/main.go
@@ -60,6 +60,7 @@
flag.Parse()
ctx := clicontext.WithInterrupt(context.Background())
+ c.Component.StartPrometheus(ctx)
if c.API.APIKey == "" || c.API.User == "" {
klog.Exitf("-equinix_api_username and -equinix_api_key must be set")