azure

package
v0.10.4 Latest Latest
Warning

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

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

Documentation

Overview

Package azure features the Azure property provider for Fleet.

Index

Constants

View Source
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"
)
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 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

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 Azure property provider.

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.

Jump to

Keyboard shortcuts

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