metrics

package
v0.0.0-...-326e4c8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 13, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// RBACClusterwidePermissions for cluster-wide permissions
	RBACClusterwidePermissions = prometheus.NewGaugeVec(prometheus.GaugeOpts{
		Name: "rbac_permissions_operator_cluster_permission",
		Help: "Configured permissions in the cluster-wide scope",
	}, []string{
		"subject_name",
		"subject_permission_name",
		"cluster_permission_name",
		"state",
	})

	// RBACNamespacePermissions for per-namespace permissions
	RBACNamespacePermissions = prometheus.NewGaugeVec(prometheus.GaugeOpts{
		Name: "rbac_permissions_operator_namespace_permission",
		Help: "Configured permissions in a per-namespace scope",
	}, []string{
		"subject_name",
		"subject_permission_name",
		"cluster_role_name",
		"namespace_allow",
		"namespace_deny",
		"allow_first",
		"state",
	})

	// MetricsList all metrics exported by this package
	MetricsList = []prometheus.Collector{
		RBACClusterwidePermissions,
		RBACNamespacePermissions,
	}
)

Functions

func AddPrometheusMetric

func AddPrometheusMetric(gp *managedv1alpha1.SubjectPermission)

AddPrometheusMetric - Helper function to add both clusterwide and namespace permission metrics

func DeletePrometheusMetric

func DeletePrometheusMetric(gp *managedv1alpha1.SubjectPermission)

DeletePrometheusMetric - Helper function to delete both clusterwide and namespace permission metrics

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL