imagefamily

package
v1.6.8 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2026 License: Apache-2.0, Apache-2.0 Imports: 43 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AzureLinuxGen2ImageDefinition      = "V2gen2"
	AzureLinuxGen1ImageDefinition      = "V2"
	AzureLinuxGen2ArmImageDefinition   = "V2gen2arm64"
	AzureLinux2Gen2FIPSImageDefinition = "V2gen2fips"
	AzureLinux2Gen1FIPSImageDefinition = "V2fips"
)
View Source
const (
	AzureLinux3Gen2ImageDefinition          = "V3gen2"
	AzureLinux3Gen1ImageDefinition          = "V3"
	AzureLinux3Gen2ArmImageDefinition       = "V3gen2arm64"
	AzureLinux3Gen2FIPSImageDefinition      = "V3gen2fips"
	AzureLinux3Gen1FIPSImageDefinition      = "V3fips"
	AzureLinux3Gen2Arm64FIPSImageDefinition = "V3gen2arm64fips"
)
View Source
const (
	AKSUbuntuPublicGalleryURL     = "AKSUbuntu-38d80f77-467a-481f-a8d4-09b6d4220bd2"
	AKSAzureLinuxPublicGalleryURL = "AKSAzureLinux-f7c7cda5-1c9a-4bdc-a222-9614c968580b"

	AKSUbuntuResourceGroup     = "AKS-Ubuntu"
	AKSAzureLinuxResourceGroup = "AKS-AzureLinux"

	AKSUbuntuGalleryName     = "AKSUbuntu"
	AKSAzureLinuxGalleryName = "AKSAzureLinux"
)
View Source
const (
	ImageExpirationInterval    = time.Hour * 24 * 3
	ImageCacheCleaningInterval = time.Hour * 1
)
View Source
const (
	Ubuntu2004Gen2FIPSImageDefinition = "2004gen2fipscontainerd"
	Ubuntu2004Gen1FIPSImageDefinition = "2004fipscontainerd"
)
View Source
const (
	Ubuntu2204Gen2ImageDefinition    = "2204gen2containerd"
	Ubuntu2204Gen1ImageDefinition    = "2204containerd"
	Ubuntu2204Gen2ArmImageDefinition = "2204gen2arm64containerd"
)
View Source
const (
	Ubuntu2404Gen2ImageDefinition    = "2404gen2containerd"
	Ubuntu2404Gen1ImageDefinition    = "2404containerd"
	Ubuntu2404Gen2ArmImageDefinition = "2404gen2arm64containerd"
)

Variables

This section is empty.

Functions

func BuildImageIDCIG added in v0.7.1

func BuildImageIDCIG(publicGalleryURL, communityImageName, imageVersion string) string

BuildImageIDCIG builds a Community Image Gallery image ID

func BuildImageIDSIG added in v1.6.3

func BuildImageIDSIG(subscriptionID, resourceGroup, galleryName, imageDefinition, imageVersion string) string

BuildImageIDSIG builds a Shared Image Gallery image ID

func FilteredNodeImages added in v0.7.1

func FilteredNodeImages(nodeImageVersions []types.NodeImageVersion) []types.NodeImageVersion

FilteredNodeImages filters on two conditions 1. The image is the latest version for the given OS and SKU 2. the image belongs to a supported gallery(AKS Ubuntu or Azure Linux)

func NewDefaultResolver added in v0.7.5

func NewDefaultResolver(_ client.Client, imageProvider *provider, instanceTypeProvider instancetype.Provider, nodeBootstrappingClient types.NodeBootstrappingAPI) *defaultResolver

NewDefaultResolver constructs a new launch template Resolver

func NewProvider

func NewProvider(versionsClient types.CommunityGalleryImageVersionsAPI, location, subscription string, nodeImageVersionsClient types.NodeImageVersionsAPI, nodeImagesCache *cache.Cache) *provider

func UseAzureLinux3 added in v1.5.0

func UseAzureLinux3(kubernetesVersion string) bool

UseAzureLinux3 checks if the Kubernetes version is 1.32.0 or higher, which is when Azure Linux 3 support starts

func UseUbuntu2404 added in v1.6.3

func UseUbuntu2404(kubernetesVersion string) bool

UseUbuntu2404 is when AKS starts defaulting support for Ubuntu2404

Types

type AzureLinux

type AzureLinux struct {
	Options *parameters.StaticParameters
}

func (AzureLinux) CustomScriptsNodeBootstrapping added in v0.6.1

func (u AzureLinux) CustomScriptsNodeBootstrapping(
	kubeletConfig *bootstrap.KubeletConfiguration,
	taints []v1.Taint,
	startupTaints []v1.Taint,
	labels map[string]string,
	instanceType *cloudprovider.InstanceType,
	imageDistro string,
	storageProfile string,
	nodeBootstrappingClient types.NodeBootstrappingAPI,
	fipsMode *v1beta1.FIPSMode,
	localDNS *v1beta1.LocalDNS,
) customscriptsbootstrap.Bootstrapper

UserData returns the default userdata script for the image Family

func (AzureLinux) DefaultImages

func (u AzureLinux) DefaultImages(useSIG bool, fipsMode *v1beta1.FIPSMode) []types.DefaultImageOutput

func (AzureLinux) Name

func (u AzureLinux) Name() string

func (AzureLinux) ScriptlessCustomData added in v0.6.1

func (u AzureLinux) ScriptlessCustomData(
	kubeletConfig *bootstrap.KubeletConfiguration,
	taints []v1.Taint,
	labels map[string]string,
	caBundle *string,
	_ *cloudprovider.InstanceType,
) bootstrap.Bootstrapper

UserData returns the default userdata script for the image Family

type AzureLinux3 added in v1.5.0

type AzureLinux3 struct {
	Options *parameters.StaticParameters
}

func (AzureLinux3) CustomScriptsNodeBootstrapping added in v1.5.0

func (u AzureLinux3) CustomScriptsNodeBootstrapping(
	kubeletConfig *bootstrap.KubeletConfiguration,
	taints []v1.Taint,
	startupTaints []v1.Taint,
	labels map[string]string,
	instanceType *cloudprovider.InstanceType,
	imageDistro string,
	storageProfile string,
	nodeBootstrappingClient types.NodeBootstrappingAPI,
	fipsMode *v1beta1.FIPSMode,
	localDNS *v1beta1.LocalDNS,
) customscriptsbootstrap.Bootstrapper

UserData returns the default userdata script for the image Family

func (AzureLinux3) DefaultImages added in v1.5.0

func (u AzureLinux3) DefaultImages(useSIG bool, fipsMode *v1beta1.FIPSMode) []types.DefaultImageOutput

func (AzureLinux3) Name added in v1.5.0

func (u AzureLinux3) Name() string

func (AzureLinux3) ScriptlessCustomData added in v1.5.0

func (u AzureLinux3) ScriptlessCustomData(
	kubeletConfig *bootstrap.KubeletConfiguration,
	taints []v1.Taint,
	labels map[string]string,
	caBundle *string,
	_ *cloudprovider.InstanceType,
) bootstrap.Bootstrapper

UserData returns the default userdata script for the image Family

type ImageFamily

type ImageFamily interface {
	ScriptlessCustomData(
		kubeletConfig *bootstrap.KubeletConfiguration,
		taints []corev1.Taint,
		labels map[string]string,
		caBundle *string,
		instanceType *cloudprovider.InstanceType,
	) bootstrap.Bootstrapper
	CustomScriptsNodeBootstrapping(
		kubeletConfig *bootstrap.KubeletConfiguration,
		taints []corev1.Taint,
		startupTaints []corev1.Taint,
		labels map[string]string,
		instanceType *cloudprovider.InstanceType,
		imageDistro string,
		storageProfile string,
		nodeBootstrappingClient types.NodeBootstrappingAPI,
		fipsMode *v1beta1.FIPSMode,
		localDNS *v1beta1.LocalDNS,
	) customscriptsbootstrap.Bootstrapper
	Name() string
	// DefaultImages returns a list of default CommunityImage definitions for this ImageFamily.
	// Our Image Selection logic relies on the ordering of the default images to be ordered from most preferred to least, then we will select the latest image version available for that CommunityImage definition.
	// Our Release pipeline ensures all images are released together within 24 hours of each other for community image gallery, so selecting based on image feature priorities, then by date, and not vice-versa is acceptable.
	// If fipsMode is FIPSModeFIPS, only FIPS-enabled images will be returned
	DefaultImages(useSIG bool, fipsMode *v1beta1.FIPSMode) []types.DefaultImageOutput
}

ImageFamily can be implemented to override the default logic for generating dynamic launch template parameters ATTENTION!!!: changes here may NOT be effective on AKS machine nodes (ProvisionModeAKSMachineAPI); See aksmachineinstance.go/aksmachineinstancehelpers.go. Refactoring for code unification is not being invested immediately.

func GetImageFamily added in v1.6.3

func GetImageFamily(familyName *string, fipsMode *v1beta1.FIPSMode, kubernetesVersion string, parameters *template.StaticParameters) ImageFamily

type NodeBootstrappingClient added in v1.5.0

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

NodeBootstrappingClient implements the NodeBootstrappingAPI interface using the swagger-generated client.

func NewNodeBootstrappingClient added in v1.5.0

func NewNodeBootstrappingClient(
	ctx context.Context,
	cloud cloud.Configuration,
	subscriptionID string,
	resourceGroupName string,
	resourceName string,
	credential azcore.TokenCredential,
	serverURL string,
	enableLogging bool,
) (*NodeBootstrappingClient, error)

NewNodeBootstrappingClient creates a new NodeBootstrappingClient with token caching enabled.

func (*NodeBootstrappingClient) Get added in v1.5.0

Get implements the NodeBootstrappingAPI interface. It retrieves node bootstrapping data (CSE and base64-encoded CustomData), but may omit the TLS bootstrap token.

type NodeImage added in v1.4.0

type NodeImage struct {
	ID           string
	Requirements scheduling.Requirements
}

type NodeImageProvider added in v1.4.0

type NodeImageProvider interface {
	List(ctx context.Context, nodeClass *v1beta1.AKSNodeClass) ([]NodeImage, error)
}

type NodeImageVersionsClient added in v0.7.1

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

func NewNodeImageVersionsClient added in v0.7.1

func NewNodeImageVersionsClient(cred azcore.TokenCredential, cloud cloud.Configuration) *NodeImageVersionsClient

func (*NodeImageVersionsClient) List added in v0.7.1

func (l *NodeImageVersionsClient) List(ctx context.Context, location, subscription string) (types.NodeImageVersionsResponse, error)

type Resolver

type Resolver interface {
	Resolve(
		ctx context.Context,
		nodeClass *v1beta1.AKSNodeClass,
		nodeClaim *karpv1.NodeClaim,
		instanceType *cloudprovider.InstanceType,
		staticParameters *template.StaticParameters) (*template.Parameters, error)
	ResolveNodeImageFromNodeClass(nodeClass *v1beta1.AKSNodeClass, instanceType *cloudprovider.InstanceType) (string, error)
}

type Ubuntu2004 added in v1.6.2

type Ubuntu2004 struct {
	Options *parameters.StaticParameters
}

func (Ubuntu2004) CustomScriptsNodeBootstrapping added in v1.6.2

func (u Ubuntu2004) CustomScriptsNodeBootstrapping(
	kubeletConfig *bootstrap.KubeletConfiguration,
	taints []v1.Taint,
	startupTaints []v1.Taint,
	labels map[string]string,
	instanceType *cloudprovider.InstanceType,
	imageDistro string,
	storageProfile string,
	nodeBootstrappingClient types.NodeBootstrappingAPI,
	fipsMode *v1beta1.FIPSMode,
	_ *v1beta1.LocalDNS,
) customscriptsbootstrap.Bootstrapper

UserData returns the default userdata script for the image Family

func (Ubuntu2004) DefaultImages added in v1.6.2

func (u Ubuntu2004) DefaultImages(useSIG bool, fipsMode *v1beta1.FIPSMode) []types.DefaultImageOutput

func (Ubuntu2004) Name added in v1.6.2

func (u Ubuntu2004) Name() string

TODO (charliedmcb): look into .Name() usage, and implications

func (Ubuntu2004) ScriptlessCustomData added in v1.6.2

func (u Ubuntu2004) ScriptlessCustomData(
	kubeletConfig *bootstrap.KubeletConfiguration,
	taints []v1.Taint,
	labels map[string]string,
	caBundle *string,
	_ *cloudprovider.InstanceType,
) bootstrap.Bootstrapper

UserData returns the default userdata script for the image Family

type Ubuntu2204

type Ubuntu2204 struct {
	Options *parameters.StaticParameters
}

func (Ubuntu2204) CustomScriptsNodeBootstrapping added in v0.6.1

func (u Ubuntu2204) CustomScriptsNodeBootstrapping(
	kubeletConfig *bootstrap.KubeletConfiguration,
	taints []v1.Taint,
	startupTaints []v1.Taint,
	labels map[string]string,
	instanceType *cloudprovider.InstanceType,
	imageDistro string,
	storageProfile string,
	nodeBootstrappingClient types.NodeBootstrappingAPI,
	fipsMode *v1beta1.FIPSMode,
	localDNS *v1beta1.LocalDNS,
) customscriptsbootstrap.Bootstrapper

UserData returns the default userdata script for the image Family

func (Ubuntu2204) DefaultImages

func (u Ubuntu2204) DefaultImages(useSIG bool, fipsMode *v1beta1.FIPSMode) []types.DefaultImageOutput

func (Ubuntu2204) Name

func (u Ubuntu2204) Name() string

func (Ubuntu2204) ScriptlessCustomData added in v0.6.1

func (u Ubuntu2204) ScriptlessCustomData(
	kubeletConfig *bootstrap.KubeletConfiguration,
	taints []v1.Taint,
	labels map[string]string,
	caBundle *string,
	_ *cloudprovider.InstanceType,
) bootstrap.Bootstrapper

UserData returns the default userdata script for the image Family

type Ubuntu2404 added in v1.6.3

type Ubuntu2404 struct {
	Options *parameters.StaticParameters
}

func (Ubuntu2404) CustomScriptsNodeBootstrapping added in v1.6.3

func (u Ubuntu2404) CustomScriptsNodeBootstrapping(
	kubeletConfig *bootstrap.KubeletConfiguration,
	taints []v1.Taint,
	startupTaints []v1.Taint,
	labels map[string]string,
	instanceType *cloudprovider.InstanceType,
	imageDistro string,
	storageProfile string,
	nodeBootstrappingClient types.NodeBootstrappingAPI,
	fipsMode *v1beta1.FIPSMode,
	localDNS *v1beta1.LocalDNS,
) customscriptsbootstrap.Bootstrapper

UserData returns the default userdata script for the image Family

func (Ubuntu2404) DefaultImages added in v1.6.3

func (u Ubuntu2404) DefaultImages(useSIG bool, fipsMode *v1beta1.FIPSMode) []types.DefaultImageOutput

func (Ubuntu2404) Name added in v1.6.3

func (u Ubuntu2404) Name() string

func (Ubuntu2404) ScriptlessCustomData added in v1.6.3

func (u Ubuntu2404) ScriptlessCustomData(
	kubeletConfig *bootstrap.KubeletConfiguration,
	taints []v1.Taint,
	labels map[string]string,
	caBundle *string,
	_ *cloudprovider.InstanceType,
) bootstrap.Bootstrapper

UserData returns the default userdata script for the image Family

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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