Documentation ¶
Overview ¶
+k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:defaulter-gen=TypeMeta +groupName=karpenter.azure.com
Index ¶
Constants ¶
const ( Ubuntu2204ImageFamily = "Ubuntu2204" AzureLinuxImageFamily = "AzureLinux" )
const Group = "karpenter.azure.com"
Variables ¶
var ( AzureToKubeArchitectures = map[string]string{ "x64": corev1beta1.ArchitectureAmd64, "Arm64": corev1beta1.ArchitectureArm64, } RestrictedLabelDomains = []string{ Group, } RestrictedLabels = sets.New( LabelSKUHyperVGeneration, ) AllowUndefinedLabels = func(options scheduling.CompatabilityOptions) scheduling.CompatabilityOptions { options.AllowUndefined = corev1beta1.WellKnownLabels.Union(RestrictedLabels) return options } // alternative zone label for Machine (the standard one is protected for AKS nodes) AlternativeLabelTopologyZone = Group + "/zone" HyperVGenerationV1 = "1" HyperVGenerationV2 = "2" ManufacturerNvidia = "nvidia" LabelSKUName = Group + "/sku-name" // Standard_A1_v2 LabelSKUFamily = Group + "/sku-family" // A LabelSKUVersion = Group + "/sku-version" // numerical (without v), with 1 backfilled LabelSKUCPU = Group + "/sku-cpu" // sku.vCPUs LabelSKUMemory = Group + "/sku-memory" // sku.MemoryGB LabelSKUAccelerator = Group + "/sku-accelerator" // selected capabilities (from additive features in VM size name, or from SKU capabilities) // https://learn.microsoft.com/en-us/azure/virtual-machines/vm-naming-conventions LabelSKUConfidential = Group + "/sku-confidential" // c LabelSKUIsolatedSize = Group + "/sku-isolated-size" // i LabelSKUAcceleratedNetworking = Group + "/sku-networking-accelerated" // sku.AcceleratedNetworkingEnabled LabelSKUStoragePremiumCapable = Group + "/sku-storage-premium-capable" // sku.IsPremiumIO LabelSKUStorageCacheSize = Group + "/sku-storage-cache-size" // sku.CachedDiskBytes LabelSKUStorageTempMaxSize = Group + "/sku-storage-temp-maxsize" // sku.MaxResourceVolumeMB LabelSKUStorageEphemeralOSMaxSize = Group + "/sku-storage-ephemeralos-maxsize" // calculated as max(sku.CachedDiskBytes, sku.MaxResourceVolumeMB) LabelSKUEncryptionAtHostSupported = Group + "/sku-encryptionathost-capable" // sku.EncryptionAtHostSupported // GPU labels LabelSKUGPUName = Group + "/sku-gpu-name" // ie GPU Accelerator type we parse from vmSize LabelSKUGPUManufacturer = Group + "/sku-gpu-manufacturer" // ie NVIDIA, AMD, etc LabelSKUGPUCount = Group + "/sku-gpu-count" // ie 16, 32, etc // Internal/restricted labels LabelSKUHyperVGeneration = Group + "/sku-hyperv-generation" // sku.HyperVGenerations // AKS labels AKSLabelDomain = "kubernetes.azure.com" AKSLabelCluster = AKSLabelDomain + "/cluster" SkuFeatureToLabel = map[rune]string{ 'c': LabelSKUConfidential, 'i': LabelSKUIsolatedSize, } )
var ( SchemeGroupVersion = schema.GroupVersion{Group: Group, Version: "v1alpha2"} SchemeBuilder = runtime.NewSchemeBuilder(func(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &AKSNodeClass{}, &AKSNodeClassList{}, ) metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil }) )
var (
AnnotationInPlaceUpdateHash = Group + "/in-place-update-hash"
)
Annotations
Functions ¶
This section is empty.
Types ¶
type AKSNodeClass ¶
type AKSNodeClass struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec AKSNodeClassSpec `json:"spec,omitempty"` Status AKSNodeClassStatus `json:"status,omitempty"` }
AKSNodeClass is the Schema for the AKSNodeClass API +kubebuilder:object:root=true +kubebuilder:resource:path=aksnodeclasses,scope=Cluster,categories=karpenter,shortName={aksnc,aksncs} +kubebuilder:subresource:status
func (*AKSNodeClass) DeepCopy ¶
func (in *AKSNodeClass) DeepCopy() *AKSNodeClass
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AKSNodeClass.
func (*AKSNodeClass) DeepCopyInto ¶
func (in *AKSNodeClass) DeepCopyInto(out *AKSNodeClass)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AKSNodeClass) DeepCopyObject ¶
func (in *AKSNodeClass) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*AKSNodeClass) Hash ¶
func (in *AKSNodeClass) Hash() string
type AKSNodeClassList ¶
type AKSNodeClassList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []AKSNodeClass `json:"items"` }
AKSNodeClassList contains a list of AKSNodeClass +kubebuilder:object:root=true
func (*AKSNodeClassList) DeepCopy ¶
func (in *AKSNodeClassList) DeepCopy() *AKSNodeClassList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AKSNodeClassList.
func (*AKSNodeClassList) DeepCopyInto ¶
func (in *AKSNodeClassList) DeepCopyInto(out *AKSNodeClassList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AKSNodeClassList) DeepCopyObject ¶
func (in *AKSNodeClassList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type AKSNodeClassSpec ¶
type AKSNodeClassSpec struct { // +kubebuilder:default=128 // +kubebuilder:validation:Minimum=100 // osDiskSizeGB is the size of the OS disk in GB. OSDiskSizeGB *int32 `json:"osDiskSizeGB,omitempty"` // ImageID is the ID of the image that instances use. // Not exposed in the API yet ImageID *string `json:"-"` // ImageFamily is the image family that instances use. // +kubebuilder:default=Ubuntu2204 // +kubebuilder:validation:Enum:={Ubuntu2204,AzureLinux} ImageFamily *string `json:"imageFamily,omitempty"` // ImageVersion is the image version that instances use. // +optional ImageVersion *string `json:"imageVersion,omitempty"` // Tags to be applied on Azure resources like instances. // +optional Tags map[string]string `json:"tags,omitempty"` }
AKSNodeClassSpec is the top level specification for the AKS Karpenter Provider. This will contain configuration necessary to launch instances in AKS.
func (*AKSNodeClassSpec) DeepCopy ¶
func (in *AKSNodeClassSpec) DeepCopy() *AKSNodeClassSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AKSNodeClassSpec.
func (*AKSNodeClassSpec) DeepCopyInto ¶
func (in *AKSNodeClassSpec) DeepCopyInto(out *AKSNodeClassSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AKSNodeClassSpec) GetImageVersion ¶
func (in *AKSNodeClassSpec) GetImageVersion() string
type AKSNodeClassStatus ¶
type AKSNodeClassStatus struct { }
AKSNodeClassStatus contains the resolved state of the AKSNodeClass
func (*AKSNodeClassStatus) DeepCopy ¶
func (in *AKSNodeClassStatus) DeepCopy() *AKSNodeClassStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AKSNodeClassStatus.
func (*AKSNodeClassStatus) DeepCopyInto ¶
func (in *AKSNodeClassStatus) DeepCopyInto(out *AKSNodeClassStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Image ¶
type Image struct { // ID of the image // +required ID string `json:"id"` // Requirements of the image to be utilized on an instance type // +required Requirements []v1.NodeSelectorRequirement `json:"requirements"` }
Image contains resolved image selector values utilized for node launch
func (*Image) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Image.
func (*Image) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.