Documentation ¶
Index ¶
- func FetchComponentStatuses(clientset *kubernetes.Clientset) ([]v1.ComponentStatus, error)
- func FetchEndpoints(clientset *kubernetes.Clientset, names []NamespaceName) (map[NamespaceName]v1.Endpoints, error)
- func FetchImages(ec2client *ec2.EC2, instances []ec2.Instance) ([]*ec2.Image, error)
- func FetchInstances(ec2client *ec2.EC2, nodes []v1.Node) ([]ec2.Instance, error)
- func FetchNodes(clientset *kubernetes.Clientset) ([]v1.Node, error)
- func FetchPods(clientset *kubernetes.Clientset) ([]v1.Pod, error)
- func LeaderHolderIdentity(ep v1.Endpoints) (string, error)
- type AwsData
- type ComponentStatus
- type ComponentStatusSortByName
- type DB
- type DefaultSort
- type KubernetesData
- type NamespaceName
- type NodeTable
- func (nt *NodeTable) ByAwsID(id string) (*NodeTableRow, int, bool)
- func (nt *NodeTable) ByName(name string) (*NodeTableRow, int, bool)
- func (nt *NodeTable) Insert(row *NodeTableRow) int
- func (nt *NodeTable) Sort()
- func (nt *NodeTable) WithRowAtAwsID(id string, f func(*NodeTableRow))
- func (nt *NodeTable) WithRowAtName(name string, f func(*NodeTableRow))
- type NodeTableRow
- type PodCounts
- type Snapshot
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FetchComponentStatuses ¶
func FetchComponentStatuses(clientset *kubernetes.Clientset) ([]v1.ComponentStatus, error)
func FetchEndpoints ¶
func FetchEndpoints(clientset *kubernetes.Clientset, names []NamespaceName) (map[NamespaceName]v1.Endpoints, error)
FetchEndpoints requests the given endpoints.
func FetchImages ¶
FetchImages fetches ec2 images used by the given instances.
func FetchInstances ¶
FetchInstances gets the AWS instances references by the given nodes. It also extracts the tag KubernetesCluster from the resulting instances, and fetches all instances with the same KubernetesCluster tag, returning a merged list (without duplicates).
func FetchNodes ¶
func FetchNodes(clientset *kubernetes.Clientset) ([]v1.Node, error)
FetchNodes requests all nodes and returns the items without list metadata.
Types ¶
type ComponentStatus ¶
type ComponentStatusSortByName ¶
type ComponentStatusSortByName []ComponentStatus
func (ComponentStatusSortByName) Len ¶
func (a ComponentStatusSortByName) Len() int
Len implements sort.Interface
func (ComponentStatusSortByName) Less ¶
func (a ComponentStatusSortByName) Less(i, j int) bool
Less implements sort.Interface, sorting by role, aws state, name
func (ComponentStatusSortByName) Swap ¶
func (a ComponentStatusSortByName) Swap(i, j int)
Swap implements sort.Interface
type DB ¶
type DB struct { Snapshots <-chan Snapshot // contains filtered or unexported fields }
func (*DB) Kubernetes ¶
func (db *DB) Kubernetes() chan<- KubernetesData
type DefaultSort ¶
type DefaultSort []*NodeTableRow
func (DefaultSort) Less ¶
func (rows DefaultSort) Less(i, j int) bool
Less implements sort.Interface, sorting by role, aws state, name
type KubernetesData ¶
type KubernetesData struct { ComponentStatuses []v1.ComponentStatus Nodes []v1.Node Pods []v1.Pod Endpoints map[NamespaceName]v1.Endpoints }
func FetchKubernetes ¶
func FetchKubernetes(clientset *kubernetes.Clientset) (KubernetesData, error)
type NamespaceName ¶
type NodeTable ¶
type NodeTable struct { Rows []*NodeTableRow // contains filtered or unexported fields }
func NewNodeTable ¶
func NewNodeTable() *NodeTable
func (*NodeTable) Insert ¶
func (nt *NodeTable) Insert(row *NodeTableRow) int
Insert appends a row to the table and returns the index of the newly inserted node.
func (*NodeTable) WithRowAtAwsID ¶
func (nt *NodeTable) WithRowAtAwsID(id string, f func(*NodeTableRow))
func (*NodeTable) WithRowAtName ¶
func (nt *NodeTable) WithRowAtName(name string, f func(*NodeTableRow))
type NodeTableRow ¶
type NodeTableRow struct { IsMaster bool IsControllerManagerLeader bool IsSchedulerLeader bool IsCordoned bool Name string CreatedAt time.Time PodCounts PodCounts PodsPendingCount int PodsRunningCount int PodsSucceededCount int PodsFailedCount int PodsUnknownCount int KubeletVersion string AwsID string // k8s external id, also in aws ImageID string ImageVersion string AwsState string KubernetesCluster string // aws tag }