densify

package
v0.0.0-...-ab80ba3 Latest Latest
Warning

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

Go to latest
Published: May 4, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetInsight

func GetInsight(cluster string, namespace string, objType string, objName string, containerName string) (string, error)

GetInsight gets an insight from densify based on the keys cluster, namespace, objType, objName and containerName

func Initialize

func Initialize(create bool) error

Initialize will initilize the densify secrets k8s object, if it doesn't exist in the current-context.

Types

type Insight

type Insight struct {
	Container       string  `json:"container"`
	RecommFirstSeen int64   `json:"recommFirstSeen"`
	Cluster         string  `json:"cluster"`
	HostName        string  `json:"hostName,omitempty"`
	PredictedUptime float64 `json:"predictedUptime,omitempty"`
	ControllerType  string  `json:"controllerType"`
	DisplayName     string  `json:"displayName"`
	RecommLastSeen  int64   `json:"recommLastSeen"`
	EntityID        string  `json:"entityId"`
	PodService      string  `json:"podService"`
	AuditInfo       struct {
		DataCollection struct {
			DateFirstAudited int64 `json:"dateFirstAudited"`
			AuditCount       int   `json:"auditCount"`
			DateLastAudited  int64 `json:"dateLastAudited"`
		} `json:"dataCollection"`
		WorkloadDataLast30 struct {
			TotalDays int   `json:"totalDays"`
			SeenDays  int   `json:"seenDays"`
			FirstDate int64 `json:"firstDate"`
			LastDate  int64 `json:"lastDate"`
		} `json:"workloadDataLast30"`
	} `json:"auditInfo,omitempty"`
	RecommendedCPULimit   int    `json:"recommendedCpuLimit,omitempty"`
	RecommendedMemRequest int    `json:"recommendedMemRequest,omitempty"`
	CurrentCount          int    `json:"currentCount"`
	RecommSeenCount       int    `json:"recommSeenCount"`
	Namespace             string `json:"namespace"`
	RecommendedMemLimit   int    `json:"recommendedMemLimit,omitempty"`
	RecommendationType    string `json:"recommendationType"`
	RecommendedCPURequest int    `json:"recommendedCpuRequest,omitempty"`
	CurrentMemLimit       int    `json:"currentMemLimit,omitempty"`
	CurrentMemRequest     int    `json:"currentMemRequest,omitempty"`
	CurrentCPULimit       int    `json:"currentCpuLimit,omitempty"`
	CurrentCPURequest     int    `json:"currentCpuRequest,omitempty"`
}

Insight this struct holds a recommendation

Jump to

Keyboard shortcuts

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