Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func QueryAggCostModel ¶
func QueryAggCostModel(clientset *kubernetes.Clientset, kubecostNamespace, serviceName, window, aggregate, aggregationSubfield string, ctx context.Context) (map[string]Aggregation, error)
func QueryAllocation ¶
func QueryAllocation(clientset *kubernetes.Clientset, kubecostNamespace, serviceName, window, aggregate string, ctx context.Context) ([]map[string]kubecost.Allocation, error)
Types ¶
type Aggregation ¶
type Aggregation struct { Aggregator string `json:"aggregation"` Subfields []string `json:"subfields,omitempty"` Environment string `json:"environment"` Cluster string `json:"cluster,omitempty"` Properties *kubecost.Properties `json:"-"` CPUAllocationHourlyAverage float64 `json:"cpuAllocationAverage"` CPUAllocationVectors []*util.Vector `json:"-"` CPUAllocationTotal float64 `json:"-"` CPUCost float64 `json:"cpuCost"` CPUCostVector []*util.Vector `json:"cpuCostVector,omitempty"` CPUEfficiency float64 `json:"cpuEfficiency"` CPURequestedVectors []*util.Vector `json:"-"` CPUUsedVectors []*util.Vector `json:"-"` Efficiency float64 `json:"efficiency"` GPUAllocationHourlyAverage float64 `json:"gpuAllocationAverage"` GPUAllocationVectors []*util.Vector `json:"-"` GPUCost float64 `json:"gpuCost"` GPUCostVector []*util.Vector `json:"gpuCostVector,omitempty"` GPUAllocationTotal float64 `json:"-"` RAMAllocationHourlyAverage float64 `json:"ramAllocationAverage"` RAMAllocationVectors []*util.Vector `json:"-"` RAMAllocationTotal float64 `json:"-"` RAMCost float64 `json:"ramCost"` RAMCostVector []*util.Vector `json:"ramCostVector,omitempty"` RAMEfficiency float64 `json:"ramEfficiency"` RAMRequestedVectors []*util.Vector `json:"-"` RAMUsedVectors []*util.Vector `json:"-"` PVAllocationHourlyAverage float64 `json:"pvAllocationAverage"` PVAllocationVectors []*util.Vector `json:"-"` PVAllocationTotal float64 `json:"-"` PVCost float64 `json:"pvCost"` PVCostVector []*util.Vector `json:"pvCostVector,omitempty"` NetworkCost float64 `json:"networkCost"` NetworkCostVector []*util.Vector `json:"networkCostVector,omitempty"` TotalCost float64 `json:"totalCost"` TotalCostVector []*util.Vector `json:"totalCostVector,omitempty"` }
Hardcoded instead of imported because of dependency problems introduced when github.com/kubecost/cost-model/pkg/costmodel is imported. The breakage involves Azure's go-autorest, the azure-sdk-for-go, and k8s client-go. Basically, cost-model uses a very old version of client-go, etc. that causes a breakage.
Click to show internal directories.
Click to hide internal directories.