Documentation ¶
Overview ¶
Package aks features the AKS property provider for Fleet.
Index ¶
Constants ¶
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" )
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 ¶
func New(region *string) propertyprovider.PropertyProvider
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 ¶
func (p *PropertyProvider) Collect(_ context.Context) propertyprovider.PropertyCollectionResponse
Collect collects the properties of an AKS cluster.
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. |