filters package - sigs.k8s.io/controller-runtime/pkg/metrics/filters - Go Packages (original) (raw)

This section is empty.

This section is empty.

WithAuthenticationAndAuthorization provides a metrics.Filter for authentication and authorization. Metrics will be authenticated (via TokenReviews) and authorized (via SubjectAccessReviews) with the kube-apiserver. For the authentication and authorization the controller needs a ClusterRole with the following rules: * apiGroups: authentication.k8s.io, resources: tokenreviews, verbs: create * apiGroups: authorization.k8s.io, resources: subjectaccessreviews, verbs: create

To scrape metrics e.g. via Prometheus the client needs a ClusterRole with the following rule: * nonResourceURLs: "/metrics", verbs: get

Note: Please note that configuring this metrics provider will introduce a dependency to "k8s.io/apiserver" to your go module.

This section is empty.