clusterstatus

package
v4.2.151+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ContainerTime is the time that container information is saved to the measurement
	ContainerTime containerTag = "time"
	// ContainerNamespace is the container namespace
	ContainerNamespace containerTag = "namespace"
	// ContainerPodName is the name of pod that container is running in
	ContainerPodName containerTag = "pod_name"
	// ContainerAlamedaScalerNamespace is the namespace of AlamedaScaler that container belongs to
	ContainerAlamedaScalerNamespace containerTag = "alameda_scaler_namespace"
	// ContainerAlamedaScalerName is the name of AlamedaScaler that container belongs to
	ContainerAlamedaScalerName containerTag = "alameda_scaler_name"
	// ContainerNodeName is the name of node that container is running in
	ContainerNodeName containerTag = "node_name"
	// ContainerName is the container name
	ContainerName      containerTag = "name"
	ContainerAppName   containerTag = "app_name"
	ContainerAppPartOf containerTag = "app_part_of"

	// ContainerPodPhase is a label for the condition of a pod at the current time
	ContainerPodPhase containerField = "pod_phase"
	// ContainerPodMessage is a human readable message indicating details about why the pod is in this condition
	ContainerPodMessage containerField = "pod_message"
	// ContainerPodReason is a brief CamelCase message indicating details about why the pod is in this state
	ContainerPodReason containerField = "pod_reason"
	// ContainerStatusWaitingReason is a brief reason the container is not yet running
	ContainerStatusWaitingReason containerField = "status_waiting_reason"
	// ContainerStatusWaitingMessage is a message regarding why the container is not yet running
	ContainerStatusWaitingMessage containerField = "status_waiting_message"
	// ContainerStatusRunningStartedAt is a time at which the container was last (re-)started
	ContainerStatusRunningStartedAt containerField = "status_running_start_at"
	// ContainerStatusTerminatedExitCode is a exit status from the last termination of the container
	ContainerStatusTerminatedExitCode containerField = "status_terminated_exit_code"
	// ContainerStatusTerminatedReason is a brief reason from the last termination of the container
	ContainerStatusTerminatedReason containerField = "status_terminated_reason"
	// ContainerStatusTerminatedMessage is a message regarding the last termination of the container
	ContainerStatusTerminatedMessage containerField = "status_terminated_message"
	// ContainerStatusTerminatedStartedAt is a time at which previous execution of the container started
	ContainerStatusTerminatedStartedAt containerField = "status_terminated_started_at"
	// ContainerStatusTerminatedFinishedAt is a time at which the container last terminated
	ContainerStatusTerminatedFinishedAt containerField = "status_terminated_finished_at"
	// ContainerLastTerminationStatusWaitingReason is a last termination brief reason the container is not yet running
	ContainerLastTerminationStatusWaitingReason containerField = "last_termination_status_waiting_reason"
	// ContainerLastTerminationStatusWaitingMessage is a last termination message regarding why the container is not yet running
	ContainerLastTerminationStatusWaitingMessage containerField = "last_termination_status_waiting_message"
	// ContainerLastTerminationStatusRunningStartedAt is a last termination time at which the container was last (re-)started
	ContainerLastTerminationStatusRunningStartedAt containerField = "last_termination_status_running_start_at"
	// ContainerLastTerminationStatusTerminatedExitCode is a last termination exit status from the last termination of the container
	ContainerLastTerminationStatusTerminatedExitCode containerField = "last_termination_status_terminated_exit_code"
	// ContainerLastTerminationStatusTerminatedReason is a last termination brief reason from the last termination of the container
	ContainerLastTerminationStatusTerminatedReason containerField = "last_termination_status_terminated_reason"
	// ContainerLastTerminationStatusTerminatedMessage is a last termination message regarding the last termination of the container
	ContainerLastTerminationStatusTerminatedMessage containerField = "last_termination_status_terminated_message"
	// ContainerLastTerminationStatusTerminatedStartedAt is a last termination time at which previous execution of the container started
	ContainerLastTerminationStatusTerminatedStartedAt containerField = "last_termination_status_terminated_started_at"
	// ContainerLastTerminationStatusTerminatedFinishedAt is a last termination time at which the container last terminated
	ContainerLastTerminationStatusTerminatedFinishedAt containerField = "last_termination_status_terminated_finished_at"
	// ContainerRestartCount is the number of times the container has been restarted
	ContainerRestartCount containerField = "restart_count"
	// ContainerResourceRequestCPU is CPU request of the container
	ContainerResourceRequestCPU containerField = "resource_request_cpu"
	// ContainerResourceRequestMemory is memory request of the container
	ContainerResourceRequestMemory containerField = "resource_request_memroy"
	// ContainerResourceLimitCPU is CPU limit of the container
	ContainerResourceLimitCPU containerField = "resource_limit_cpu"
	// ContainerResourceLimitMemory is memory limit of the container
	ContainerResourceLimitMemory containerField = "resource_limit_memory"
	// ContainerPolicy is the prediction policy of container
	ContainerPolicy containerField = "policy"
	// ContainerPodCreateTime is the creation time of pod
	ContainerPodCreateTime containerField = "pod_create_time"
	// ContainerResourceLink is the resource link of pod
	ContainerResourceLink containerField = "resource_link"
	// ContainerTopControllerName is top controller name of the pod
	ContainerTopControllerName containerField = "top_controller_name"
	// ContainerTopControllerKind is top controller kind of the pod
	ContainerTopControllerKind containerField = "top_controller_kind"
	// ContainerTpoControllerReplicas is the number of replicas of container
	ContainerTpoControllerReplicas containerField = "top_controller_replicas"
	// ContainerUsedRecommendationID is the recommendation id that the pod applied
	ContainerUsedRecommendationID containerField = "used_recommendation_id"
	ContainerEnableVPA            containerField = "enable_VPA"
	ContainerEnableHPA            containerField = "enable_HPA"
)
View Source
const (
	ControllerTime           controllerTag = "time"
	ControllerNamespace      controllerTag = "namespace"
	ControllerName           controllerTag = "name"
	ControllerOwnerNamespace controllerTag = "owner_namespace"
	ControllerOwnerName      controllerTag = "owner_name"

	ControllerKind            controllerField = "kind"
	ControllerOwnerKind       controllerField = "owner_kind"
	ControllerReplicas        controllerField = "replicas"
	ControllerEnableExecution controllerField = "enable_execution"
	ControllerPolicy          controllerField = "policy"
	ControllerSpecReplicas    controllerField = "spec_replicas"
)
View Source
const (
	// NodeTime is the time node information is inserted to databse
	NodeTime nodeTag = "time"
	// NodeName is the name of node
	NodeName nodeTag = "name"

	// NodeGroup is node group name
	NodeGroup nodeField = "group"
	// NodeInCluster is the state node is in cluster or not
	NodeInCluster nodeField = "in_cluster"
	// NodeCPUCores is the amount of cores in node
	NodeCPUCores nodeField = "node_cpu_cores"
	// NodeMemoryBytes is the amount of momory bytes in node
	NodeMemoryBytes nodeField = "node_memory_bytes"

	NodeCreateTime nodeField = "create_time"
)

Variables

View Source
var (
	// ControllerTags is list of tags of alameda_controller_recommendation measurement
	ControllerTags = []controllerTag{
		ControllerTime,
		ControllerNamespace,
		ControllerName,
		ControllerOwnerNamespace,
		ControllerOwnerName,
	}
	// ControllerFields is list of fields of alameda_controller_recommendation measurement
	ControllerFields = []controllerField{
		ControllerKind,
		ControllerOwnerKind,
		ControllerReplicas,
		ControllerEnableExecution,
		ControllerPolicy,
	}
)
View Source
var (
	// NodeTags list tags of node measurement
	NodeTags = []nodeTag{NodeTime, NodeName}
	// NodeFields list fields of node measurement
	NodeFields = []nodeField{NodeGroup, NodeInCluster}
)

Functions

This section is empty.

Types

type ContainerEntity

type ContainerEntity struct {
	Time                                      time.Time
	Namespace                                 *string
	PodName                                   *string
	PodPhase                                  *string
	PodMessage                                *string
	PodReason                                 *string
	AlamedaScalerNamespace                    *string
	AlamedaScalerName                         *string
	NodeName                                  *string
	Name                                      *string
	AppName                                   *string
	AppPartOf                                 *string
	StatusWaitingReason                       *string
	StatusWaitingMessage                      *string
	StatusRunningStartedAt                    *int64
	StatusTerminatedExitCode                  *int32
	StatusTerminatedReason                    *string
	StatusTerminatedMessage                   *string
	StatusTerminatedStartedAt                 *int64
	StatusTerminatedFinishedAt                *int64
	LastTerminationStatusWaitingReason        *string
	LastTerminationStatusWaitingMessage       *string
	LastTerminationStatusRunningStartedAt     *int64
	LastTerminationStatusTerminatedExitCode   *int32
	LastTerminationStatusTerminatedReason     *string
	LastTerminationStatusTerminatedMessage    *string
	LastTerminationStatusTerminatedStartedAt  *int64
	LastTerminationStatusTerminatedFinishedAt *int64
	RestartCount                              *int32
	ResourceRequestCPU                        *float64
	ResourceRequestMemory                     *int64
	ResourceLimitCPU                          *float64
	ResourceLimitMemory                       *int64
	Policy                                    *string
	PodCreatedTime                            *int64
	ResourceLink                              *string
	TopControllerName                         *string
	TopControllerKind                         *string
	TpoControllerReplicas                     *int32
	UsedRecommendationID                      *string
	EnableVPA                                 *bool
	EnableHPA                                 *bool
}

ContainerEntity Entity in database

func NewContainerEntityFromMap

func NewContainerEntityFromMap(data map[string]string) ContainerEntity

NewContainerEntityFromMap Build entity from map

func (ContainerEntity) InfluxDBPoint

func (e ContainerEntity) InfluxDBPoint(measurementName string) (*influxdb_client.Point, error)

type NodeEntity added in v0.3.0

type NodeEntity struct {
	Time        time.Time
	Name        *string
	NodeGroup   *string
	IsInCluster *bool
	CPUCores    *int64
	MemoryBytes *int64
	CreatedTime *int64
}

NodeEntity is entity in database

func NewNodeEntityFromMap added in v0.3.0

func NewNodeEntityFromMap(data map[string]string) NodeEntity

NewNodeEntityFromMap Build entity from map

func (NodeEntity) BuildDatahubNode added in v0.3.0

func (e NodeEntity) BuildDatahubNode() *datahub_v1alpha1.Node

func (NodeEntity) InfluxDBPoint added in v0.3.0

func (e NodeEntity) InfluxDBPoint(measurementName string) (*influxdb_client.Point, error)

Jump to

Keyboard shortcuts

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