Documentation ¶
Index ¶
- Constants
- func FQN(ns, n string) string
- func ListAvailableMetrics(db *db.DB) (v1.ResourceList, error)
- func MatchLabels(labels, sel map[string]string) bool
- func MetaFQN(m metav1.ObjectMeta) string
- func ResFqn(k, s string) string
- type Cluster
- type ClusterRole
- type ClusterRoleBinding
- type Ingress
- type Pod
- type RoleBinding
- type ServiceAccount
Constants ¶
const ( // SecretKey tracks Secret resource references SecretKey = "sec" // ClusterRoleKey tracks ClusterRole resource references ClusterRoleKey = "clusterrole" // ConfigMapKey tracks ConfigMap resource references ConfigMapKey = "cm" )
const ClusterKey = "cl"
ClusterKey tracks Cluster resource references
const IngressKey = "ing"
IngressKey tracks Ingress resource references
const RoleKey = "role"
RoleKey represents a role identifier.
Variables ¶
This section is empty.
Functions ¶
func ListAvailableMetrics ¶ added in v0.20.0
func ListAvailableMetrics(db *db.DB) (v1.ResourceList, error)
ListAvailableMetrics return the total cluster available cpu/mem.
func MatchLabels ¶ added in v0.20.0
MatchLabels check if pod labels match a selector.
func MetaFQN ¶
func MetaFQN(m metav1.ObjectMeta) string
MetaFQN returns a fully qualified resource identifier based on object meta.
Types ¶
type Cluster ¶ added in v0.4.0
type Cluster struct {
// contains filtered or unexported fields
}
Cluster represents Cluster cache.
func NewCluster ¶ added in v0.4.0
func NewCluster(v *semver.Version) *Cluster
NewCluster returns a new Cluster cache.
func (*Cluster) ListVersion ¶ added in v0.4.0
ListVersion returns cluster server version.
type ClusterRole ¶ added in v0.6.0
type ClusterRole struct {
// contains filtered or unexported fields
}
ClusterRole represents ClusterRole cache.
func NewClusterRole ¶ added in v0.6.0
func NewClusterRole(db *db.DB) *ClusterRole
NewClusterRole returns a new ClusterRole cache.
func (*ClusterRole) AggregationMatchers ¶ added in v0.21.5
func (r *ClusterRole) AggregationMatchers(refs *sync.Map)
RoleRefs computes all role external references.
type ClusterRoleBinding ¶
type ClusterRoleBinding struct {
// contains filtered or unexported fields
}
ClusterRoleBinding represents ClusterRoleBinding cache.
func NewClusterRoleBinding ¶
func NewClusterRoleBinding(db *db.DB) *ClusterRoleBinding
NewClusterRoleBinding returns a new ClusterRoleBinding cache.
func (*ClusterRoleBinding) ClusterRoleRefs ¶ added in v0.6.0
func (c *ClusterRoleBinding) ClusterRoleRefs(refs *sync.Map)
ClusterRoleRefs computes all clusterrole external references.
type Ingress ¶ added in v0.4.0
type Ingress struct {
// contains filtered or unexported fields
}
Ingress represents Ingress cache.
func NewIngress ¶ added in v0.4.0
NewIngress returns a new Ingress cache.
type Pod ¶
type Pod struct {
// contains filtered or unexported fields
}
Pod represents a Pod cache.
type RoleBinding ¶
type RoleBinding struct {
// contains filtered or unexported fields
}
RoleBinding represents RoleBinding cache.
func NewRoleBinding ¶
func NewRoleBinding(db *db.DB) *RoleBinding
NewRoleBinding returns a new RoleBinding cache.
func (*RoleBinding) RoleRefs ¶ added in v0.6.0
func (r *RoleBinding) RoleRefs(refs *sync.Map)
RoleRefs computes all role external references.
type ServiceAccount ¶
type ServiceAccount struct {
// contains filtered or unexported fields
}
ServiceAccount tracks serviceaccounts.
func NewServiceAccount ¶
func NewServiceAccount(db *db.DB) *ServiceAccount
NewServiceAccount returns a new serviceaccount loader.
func (*ServiceAccount) ServiceAccountRefs ¶
func (s *ServiceAccount) ServiceAccountRefs(refs *sync.Map) error
ServiceAccountRefs computes all serviceaccount external references.