Documentation ¶
Index ¶
- Constants
- func FQN(ns, n string) string
- func MetaFQN(m metav1.ObjectMeta) string
- func ResFqn(k, s string) string
- type Cluster
- type ClusterRole
- type ClusterRoleBinding
- type ConfigMap
- type DaemonSet
- type Deployment
- type Endpoints
- type HorizontalPodAutoscaler
- type Ingress
- type LimitRange
- type Namespace
- type NetworkPolicy
- type Node
- type NodesMetrics
- type PersistentVolume
- type PersistentVolumeClaim
- type Pod
- type PodDisruptionBudget
- type PodSecurityPolicy
- type PodsMetrics
- type ReplicaSet
- type Role
- type RoleBinding
- type Secret
- type Service
- type ServiceAccount
- type StatefulSet
Constants ¶
const ClusterKey = "cl"
ClusterKey tracks Cluster resource references
const ClusterRoleKey = "clusterrole"
ClusterRoleKey tracks ClusterRole resource references
const ConfigMapKey = "cm"
ConfigMapKey tracks ConfigMap resource references
const DaemonSetKey = "ds"
DaemonSetKey tracks DaemonSet resource references
const DeploymentKey = "dp"
DeploymentKey tracks Deployment resource references
const IngressKey = "ing"
IngressKey tracks Ingress resource references
const LimitRangeKey = "lr"
LimitRangeKey tracks LimitRange resource references
const NetworkPolicyKey = "np"
NetworkPolicyKey tracks NetworkPolicy resource references
const PodDisruptionBudgetKey = "pdb"
PodDisruptionBudgetKey tracks PodDisruptionBudget resource references
const PodSecurityPolicyKey = "psp"
PodSecurityPolicyKey tracks PodSecurityPolicy resource references
const ReplicaSetKey = "ds"
ReplicaSetKey tracks ReplicaSet resource references
const RoleKey = "role"
RoleKey represents a role identifier.
const SecretKey = "sec"
SecretKey tracks Secret resource references
Variables ¶
This section is empty.
Functions ¶
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
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(crs map[string]*rbacv1.ClusterRole) *ClusterRole
NewClusterRole returns a new ClusterRole cache.
func (*ClusterRole) ListClusterRoles ¶ added in v0.6.0
func (c *ClusterRole) ListClusterRoles() map[string]*rbacv1.ClusterRole
ListClusterRoles returns all available ClusterRoles on the cluster.
type ClusterRoleBinding ¶
type ClusterRoleBinding struct {
// contains filtered or unexported fields
}
ClusterRoleBinding represents ClusterRoleBinding cache.
func NewClusterRoleBinding ¶
func NewClusterRoleBinding(crbs map[string]*rbacv1.ClusterRoleBinding) *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.
func (*ClusterRoleBinding) ListClusterRoleBindings ¶
func (c *ClusterRoleBinding) ListClusterRoleBindings() map[string]*rbacv1.ClusterRoleBinding
ListClusterRoleBindings returns all available ClusterRoleBindings on the cluster.
type ConfigMap ¶
type ConfigMap struct {
// contains filtered or unexported fields
}
ConfigMap represents ConfigMap cache.
func NewConfigMap ¶
NewConfigMap returns a new ConfigMap cache.
type DaemonSet ¶ added in v0.4.0
type DaemonSet struct {
// contains filtered or unexported fields
}
DaemonSet represents DaemonSet cache.
func NewDaemonSet ¶ added in v0.4.0
NewDaemonSet returns a new DaemonSet cache.
type Deployment ¶
type Deployment struct {
// contains filtered or unexported fields
}
Deployment represents Deployment cache.
func NewDeployment ¶
func NewDeployment(dps map[string]*appsv1.Deployment) *Deployment
NewDeployment returns a new Deployment cache.
func (*Deployment) ListDeployments ¶
func (d *Deployment) ListDeployments() map[string]*appsv1.Deployment
ListDeployments returns all available Deployments on the cluster.
type Endpoints ¶
type Endpoints struct {
// contains filtered or unexported fields
}
Endpoints represents Endpoints cache.
func NewEndpoints ¶
NewEndpoints returns a new Endpoints cache.
type HorizontalPodAutoscaler ¶
type HorizontalPodAutoscaler struct {
// contains filtered or unexported fields
}
HorizontalPodAutoscaler represents a collection of HorizontalPodAutoScalers available on a cluster.
func NewHorizontalPodAutoscaler ¶
func NewHorizontalPodAutoscaler(svcs map[string]*autoscalingv1.HorizontalPodAutoscaler) *HorizontalPodAutoscaler
NewHorizontalPodAutoscaler returns a new HorizontalPodAutoScaler.
func (*HorizontalPodAutoscaler) ListHorizontalPodAutoscalers ¶
func (h *HorizontalPodAutoscaler) ListHorizontalPodAutoscalers() map[string]*autoscalingv1.HorizontalPodAutoscaler
ListHorizontalPodAutoscalers returns all available HorizontalPodAutoScalers on the cluster.
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.
func (*Ingress) IngressRefs ¶ added in v0.5.0
IngressRefs computes all ingress external references.
type LimitRange ¶ added in v0.3.10
type LimitRange struct {
// contains filtered or unexported fields
}
LimitRange represents LimitRange cache.
func NewLimitRange ¶ added in v0.3.10
func NewLimitRange(lrs map[string]*v1.LimitRange) *LimitRange
NewLimitRange returns a new LimitRange cache.
func (*LimitRange) ListLimitRanges ¶ added in v0.3.10
func (c *LimitRange) ListLimitRanges() map[string]*v1.LimitRange
ListLimitRanges returns all available LimitRanges on the cluster.
type Namespace ¶
type Namespace struct {
// contains filtered or unexported fields
}
Namespace represents a collection of Namespaces available on a cluster.
func NewNamespace ¶
NewNamespace returns a new Namespace.
func (*Namespace) ListNamespaces ¶
ListNamespaces returns all available Namespaces on the cluster.
func (*Namespace) ListNamespacesBySelector ¶ added in v0.4.0
ListNamespacesBySelector list all pods matching the given selector.
type NetworkPolicy ¶ added in v0.4.0
type NetworkPolicy struct {
// contains filtered or unexported fields
}
NetworkPolicy represents NetworkPolicy cache.
func NewNetworkPolicy ¶ added in v0.4.0
func NewNetworkPolicy(nps map[string]*nv1.NetworkPolicy) *NetworkPolicy
NewNetworkPolicy returns a new NetworkPolicy cache.
func (*NetworkPolicy) ListNetworkPolicies ¶ added in v0.4.0
func (d *NetworkPolicy) ListNetworkPolicies() map[string]*nv1.NetworkPolicy
ListNetworkPolicies returns all available NetworkPolicys on the cluster.
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
Node represents a collection of Nodes available on a cluster.
type NodesMetrics ¶
type NodesMetrics struct {
// contains filtered or unexported fields
}
NodesMetrics represents a Node metrics cache.
func NewNodesMetrics ¶
func NewNodesMetrics(mx map[string]*mv1beta1.NodeMetrics) *NodesMetrics
NewNodesMetrics returns new Node metrics cache.
func (*NodesMetrics) ListAllocatedMetrics ¶ added in v0.6.0
func (n *NodesMetrics) ListAllocatedMetrics() v1.ResourceList
ListAllocatedMetrics collects total used cpu and mem on the cluster.
func (*NodesMetrics) ListAvailableMetrics ¶ added in v0.6.0
func (n *NodesMetrics) ListAvailableMetrics(nn map[string]*v1.Node) v1.ResourceList
ListAvailableMetrics return the total cluster available cpu/mem.
func (*NodesMetrics) ListNodesMetrics ¶
func (n *NodesMetrics) ListNodesMetrics() map[string]*mv1beta1.NodeMetrics
ListNodesMetrics returns all available NodeMetrics on the cluster.
type PersistentVolume ¶
type PersistentVolume struct {
// contains filtered or unexported fields
}
PersistentVolume represents a collection of PersistentVolumes available on a cluster.
func NewPersistentVolume ¶
func NewPersistentVolume(pvs map[string]*v1.PersistentVolume) *PersistentVolume
NewPersistentVolume returns a new PersistentVolume.
func (*PersistentVolume) ListPersistentVolumes ¶
func (p *PersistentVolume) ListPersistentVolumes() map[string]*v1.PersistentVolume
ListPersistentVolumes returns all available PersistentVolumes on the cluster.
type PersistentVolumeClaim ¶
type PersistentVolumeClaim struct {
// contains filtered or unexported fields
}
PersistentVolumeClaim represents a collection of PersistentVolumeClaims available on a cluster.
func NewPersistentVolumeClaim ¶
func NewPersistentVolumeClaim(pvcs map[string]*v1.PersistentVolumeClaim) *PersistentVolumeClaim
NewPersistentVolumeClaim returns a new PersistentVolumeClaim.
func (*PersistentVolumeClaim) ListPersistentVolumeClaims ¶
func (p *PersistentVolumeClaim) ListPersistentVolumeClaims() map[string]*v1.PersistentVolumeClaim
ListPersistentVolumeClaims returns all available PersistentVolumeClaims on the cluster.
type Pod ¶
type Pod struct {
// contains filtered or unexported fields
}
Pod represents a Pod cache.
func (*Pod) ListPodsBySelector ¶
ListPodsBySelector list all pods matching the given selector.
type PodDisruptionBudget ¶ added in v0.3.10
type PodDisruptionBudget struct {
// contains filtered or unexported fields
}
PodDisruptionBudget represents PodDisruptionBudget cache.
func NewPodDisruptionBudget ¶ added in v0.3.10
func NewPodDisruptionBudget(cms map[string]*v1beta1.PodDisruptionBudget) *PodDisruptionBudget
NewPodDisruptionBudget returns a new PodDisruptionBudget cache.
func (*PodDisruptionBudget) ForLabels ¶ added in v0.3.10
func (c *PodDisruptionBudget) ForLabels(labels map[string]string) *v1beta1.PodDisruptionBudget
ForLabels returns a pdb whose selector match the given labels. Returns nil if no match.
func (*PodDisruptionBudget) ListPodDisruptionBudgets ¶ added in v0.3.10
func (c *PodDisruptionBudget) ListPodDisruptionBudgets() map[string]*v1beta1.PodDisruptionBudget
ListPodDisruptionBudgets returns all available PodDisruptionBudgets on the cluster.
type PodSecurityPolicy ¶ added in v0.4.0
type PodSecurityPolicy struct {
// contains filtered or unexported fields
}
PodSecurityPolicy represents PodSecurityPolicy cache.
func NewPodSecurityPolicy ¶ added in v0.4.0
func NewPodSecurityPolicy(psps map[string]*pv1beta1.PodSecurityPolicy) *PodSecurityPolicy
NewPodSecurityPolicy returns a new PodSecurityPolicy cache.
func (*PodSecurityPolicy) ListPodSecurityPolicies ¶ added in v0.4.0
func (p *PodSecurityPolicy) ListPodSecurityPolicies() map[string]*pv1beta1.PodSecurityPolicy
ListPodSecurityPolicies returns all available PodSecurityPolicies on the cluster.
type PodsMetrics ¶
type PodsMetrics struct {
// contains filtered or unexported fields
}
PodsMetrics represents a Pod metrics cache.
func NewPodsMetrics ¶
func NewPodsMetrics(mx map[string]*mv1beta1.PodMetrics) *PodsMetrics
NewPodsMetrics returns new Pod metrics cache.
func (*PodsMetrics) ListPodsMetrics ¶
func (p *PodsMetrics) ListPodsMetrics() map[string]*mv1beta1.PodMetrics
ListPodsMetrics returns all available PodMetrics on the cluster.
type ReplicaSet ¶ added in v0.4.0
type ReplicaSet struct {
// contains filtered or unexported fields
}
ReplicaSet represents ReplicaSet cache.
func NewReplicaSet ¶ added in v0.4.0
func NewReplicaSet(rss map[string]*appsv1.ReplicaSet) *ReplicaSet
NewReplicaSet returns a new ReplicaSet cache.
func (*ReplicaSet) ListReplicaSets ¶ added in v0.4.0
func (d *ReplicaSet) ListReplicaSets() map[string]*appsv1.ReplicaSet
ListReplicaSets returns all available ReplicaSets on the cluster.
type Role ¶ added in v0.6.0
type Role struct {
// contains filtered or unexported fields
}
Role represents Role cache.
type RoleBinding ¶
type RoleBinding struct {
// contains filtered or unexported fields
}
RoleBinding represents RoleBinding cache.
func NewRoleBinding ¶
func NewRoleBinding(rbs map[string]*rbacv1.RoleBinding) *RoleBinding
NewRoleBinding returns a new RoleBinding cache.
func (*RoleBinding) ListRoleBindings ¶
func (r *RoleBinding) ListRoleBindings() map[string]*rbacv1.RoleBinding
ListRoleBindings returns all available RoleBindings on the cluster.
func (*RoleBinding) RoleRefs ¶ added in v0.6.0
func (r *RoleBinding) RoleRefs(refs *sync.Map)
RoleRefs computes all role external references.
type Secret ¶
type Secret struct {
// contains filtered or unexported fields
}
Secret represents a collection of Secrets available on a cluster.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service represents a collection of Services available on a cluster.
func NewService ¶
NewService returns a new Service.
type ServiceAccount ¶
type ServiceAccount struct {
// contains filtered or unexported fields
}
ServiceAccount tracks serviceaccounts.
func NewServiceAccount ¶
func NewServiceAccount(sas map[string]*v1.ServiceAccount) *ServiceAccount
NewServiceAccount returns a new serviceaccount loader.
func (*ServiceAccount) ListServiceAccounts ¶
func (s *ServiceAccount) ListServiceAccounts() map[string]*v1.ServiceAccount
ListServiceAccounts list available ServiceAccounts.
func (*ServiceAccount) ServiceAccountRefs ¶
func (s *ServiceAccount) ServiceAccountRefs(refs *sync.Map)
ServiceAccountRefs computes all serviceaccount external references.
type StatefulSet ¶
type StatefulSet struct {
// contains filtered or unexported fields
}
StatefulSet represents a collection of StatefulSets available on a cluster.
func NewStatefulSet ¶
func NewStatefulSet(sts map[string]*appsv1.StatefulSet) *StatefulSet
NewStatefulSet returns a new StatefulSet.
func (*StatefulSet) ListStatefulSets ¶
func (s *StatefulSet) ListStatefulSets() map[string]*appsv1.StatefulSet
ListStatefulSets returns all available StatefulSets on the cluster.