Documentation ¶
Overview ¶
Package azure features the Azure property provider for Fleet.
Index ¶
Constants ¶
const ( // 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" 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 Azure 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 Azure 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 Azure 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 Azure property provider.
|
Package controllers feature a number of controllers that are in use by the Azure property provider. |
Package trackers feature implementations that help track specific stats about Kubernetes resources, e.g., nodes and pods in the Azure property provider.
|
Package trackers feature implementations that help track specific stats about Kubernetes resources, e.g., nodes and pods in the Azure property provider. |