Versions in this module Expand all Collapse all v1 v1.5.0 Sep 23, 2019 Changes in this version + const NodeRoleLabelPrefix + func GetContainersByNode(pods []kapi.Pod) map[string]int + func RangePods(pods []kapi.Pod, fn func(kapi.Pod) bool) error + type Container struct + Cluster string + Image string + Limits *ContainerResources + Name string + Namespace string + Node string + Pod string + Requests *ContainerResources + func GetContainers(pods []kapi.Pod, namespace *string, pod *string, container *string) ([]*Container, error) + type ContainerResources struct + CPU int + Memory int + type ContainerResourcesRequirements struct + Limits RequestLimit + Name string + Requests RequestLimit + type Kube struct + ClientBatch *batch.BatchV1beta1Client + ClientV1Beta2 *beta2client.AppsV1beta2Client + Clientset *kubernetes.Clientset + func InitKubernetes(args map[string]interface{}, client *client.Client) (*Kube, error) + func (kube *Kube) GetCronJobs() (*kbeta1.CronJobList, error) + func (kube *Kube) GetDaemonSets() (*kbeta2.DaemonSetList, error) + func (kube *Kube) GetDeployments() (*kbeta2.DeploymentList, error) + func (kube *Kube) GetLimitRanges() (*kv1.LimitRangeList, error) + func (kube *Kube) GetNodes() (*kv1.NodeList, error) + func (kube *Kube) GetPods() (*kv1.PodList, error) + func (kube *Kube) GetReplicaSets() (*kbeta2.ReplicaSetList, error) + func (kube *Kube) GetReplicationControllers() (*kv1.ReplicationControllerList, error) + func (kube *Kube) GetResources() (pods []kv1.Pod, limitRanges []kv1.LimitRange, resources []Resource, ...) + func (kube *Kube) GetStatefulSet(namespace, name string) (*v1.StatefulSet, error) + func (kube *Kube) GetStatefulSets() (*kbeta2.StatefulSetList, error) + func (kube *Kube) SetResources(kind string, name string, namespace string, totalResources TotalResources) (skipped bool, err error) + type Node struct + Allocatable NodeCapacity + Capacity NodeCapacity + ContainerList []*Container + Containers int + ID uuid.UUID + IP string + InstanceSize string + InstanceType string + KubeletPort int32 + Name string + Provider string + Region string + Roles string + func AddContainerListToNodes(nodes []Node, pods []kapi.Pod, namespace *string, pod *string, ...) []Node + func GetNodes(nodes []kapi.Node) []Node + func UpdateNodesContainers(nodes []Node, containers map[string]int) []Node + type NodeCapacity struct + CPU int + Memory int + Pods int + StorageEphemeral int + func GetNodeCapacity(resources kapi.ResourceList) NodeCapacity + type RawResources struct + CronJobList *kbeta1.CronJobList + DaemonSetList *kbeta2.DaemonSetList + DeploymentList *kbeta2.DeploymentList + LimitRangeList *kv1.LimitRangeList + PodList *kv1.PodList + ReplicaSetList *kbeta2.ReplicaSetList + StatefulSetList *kbeta2.StatefulSetList + type RequestLimit struct + CPU *int64 + Memory *int64 + type Resource struct + Annotations map[string]string + Containers []kv1.Container + Kind string + Name string + Namespace string + PodRegexp *regexp.Regexp + ReplicasStatus proto.ReplicasStatus + type TotalResources struct + Containers []ContainerResourcesRequirements + Replicas *int Other modules containing this package github.com/MagalixCorp/magalix-agent/v2 github.com/MagalixCorp/magalix-agent/v3