Skip to content

Commit 70fccab

Browse files
rsienkorahulait
authored andcommitted
Expose Linode Client Prometheus metrics
Add `--authorization-always-allow-paths="/metrics"` to command line to allow scraping these metrics. In addition to Linode Client metrics, standard controller and worqueue metrics are visible by default. To disambiguate CCM node controller work queue name, it's explicitly named "ccm_node". That is, "node", "service" are upstream work queues of k8s cloud-provider service controller and "ccm_node" is the work queue of Linode CCM node controller. Fixes #296
1 parent 8d34ded commit 70fccab

File tree

9 files changed

+532
-14
lines changed

9 files changed

+532
-14
lines changed

cloud/linode/client/client.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package client
22

33
//go:generate go run github.com/golang/mock/mockgen -destination mocks/mock_client.go -package mocks github.com/linode/linode-cloud-controller-manager/cloud/linode/client Client
4+
//go:generate go run github.com/hexdigest/gowrap/cmd/gowrap gen -g -p github.com/linode/linode-cloud-controller-manager/cloud/linode/client -i Client -t ../../../hack/templates/prometheus.go.gotpl -o client_with_metrics.go -l ""
45

56
import (
67
"context"
@@ -10,6 +11,7 @@ import (
1011
"os"
1112
"time"
1213

14+
_ "github.com/hexdigest/gowrap"
1315
"github.com/linode/linodego"
1416
"k8s.io/klog/v2"
1517
)

0 commit comments

Comments
 (0)