aks

package
v0.9.0-branch-761 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package aks features the AKS property provider for Fleet.

Index

Constants

View Source
const (

	// NodeCountProperty is a property that describes the number of nodes in the cluster.
	NodeCountProperty = "kubernetes.azure.com/node-count"
	// PerCPUCoreCostProperty is a property that describes the average hourly cost of a CPU core in
	// a Kubernetes cluster.
	PerCPUCoreCostProperty = "kubernetes.azure.com/per-cpu-core-cost"
	// PerGBMemoryCostProperty is a property that describes the average cost of one GB of memory in
	// a Kubernetes cluster.
	PerGBMemoryCostProperty = "kubernetes.azure.com/per-gb-memory-cost"

	// The resource properties.
	TotalCPUCapacityProperty       = "resources.kubernetes-fleet.io/total-cpu"
	AllocatableCPUCapacityProperty = "resources.kubernetes-fleet.io/allocatable-cpu"
	AvailableCPUCapacityProperty   = "resources.kubernetes-fleet.io/available-cpu"

	TotalMemoryCapacityProperty       = "resources.kubernetes-fleet.io/total-memory"
	AllocatableMemoryCapacityProperty = "resources.kubernetes-fleet.io/allocatable-memory"
	AvailableMemoryCapacityProperty   = "resources.kubernetes-fleet.io/available-memory"

	CostPrecisionTemplate = "%.3f"
)
View Source
const (

	// PropertyCollectionSucceededConditionType is a condition type that indicates whether a
	// property collection attempt has succeeded.
	PropertyCollectionSucceededConditionType         = "AKSClusterPropertyCollectionSucceeded"
	PropertyCollectionSucceededReason                = "AllPropertiesCollectedSuccessfully"
	PropertyCollectionFailedCostErrorReason          = "FailedToCollectCosts"
	PropertyCollectionSucceededMessage               = "All properties have been collected successfully"
	PropertyCollectionFailedCostErrorMessageTemplate = "An error has occurred when collecting cost properties: %v"
)

Variables

This section is empty.

Functions

func New

New returns a new AKS property provider using the default pricing provider, which is, at this moment, an AKS Karpenter pricing client.

If the region is unspecified at the time when this function is called, the provider will attempt to auto-discover the region of its host cluster when the Start method is called.

func NewWithPricingProvider

func NewWithPricingProvider(pp trackers.PricingProvider) propertyprovider.PropertyProvider

NewWithPricingProvider returns a new AKS property provider with the given pricing provider.

This is mostly used for allow plugging in of alternate pricing providers (one that does not use the Karpenter client), and for testing purposes.

Types

type PropertyProvider

type PropertyProvider struct {
	// contains filtered or unexported fields
}

PropertyProvider is the AKS property provider for Fleet.

func (*PropertyProvider) Collect

Collect collects the properties of an AKS cluster.

func (*PropertyProvider) Start

func (p *PropertyProvider) Start(ctx context.Context, config *rest.Config) error

Start starts the AKS property provider.

Directories

Path Synopsis
Package controllers feature a number of controllers that are in use by the AKS property provider.
Package controllers feature a number of controllers that are in use by the AKS property provider.
Package trackers feature implementations that help track specific stats about Kubernetes resources, e.g., nodes and pods in the AKS property provider.
Package trackers feature implementations that help track specific stats about Kubernetes resources, e.g., nodes and pods in the AKS property provider.

Jump to

Keyboard shortcuts

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