imagefamily

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0, Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AzureLinuxGen2CommunityImage    = "V2gen2"
	AzureLinuxGen1CommunityImage    = "V2"
	AzureLinuxGen2ArmCommunityImage = "V2gen2arm64"
)
View Source
const (
	AKSUbuntuPublicGalleryURL     = "AKSUbuntu-38d80f77-467a-481f-a8d4-09b6d4220bd2"
	AKSAzureLinuxPublicGalleryURL = "AKSAzureLinux-f7c7cda5-1c9a-4bdc-a222-9614c968580b"
)
View Source
const (
	Ubuntu2204Gen2CommunityImage    = "2204gen2containerd"
	Ubuntu2204Gen1CommunityImage    = "2204containerd"
	Ubuntu2204Gen2ArmCommunityImage = "2204gen2arm64containerd"
)

Variables

This section is empty.

Functions

func BuildImageID

func BuildImageID(publicGalleryURL, communityImageName, imageVersion string) string

func ParseCommunityImageIDInfo

func ParseCommunityImageIDInfo(imageID string) (string, string, string, error)

ParseImageIDInfo parses the publicGalleryURL, communityImageName, and imageVersion out of an imageID

Types

type AzureLinux

type AzureLinux struct {
	Options *parameters.StaticParameters
}

func (AzureLinux) DefaultImages

func (u AzureLinux) DefaultImages() []DefaultImageOutput

func (AzureLinux) Name

func (u AzureLinux) Name() string

func (AzureLinux) UserData

func (u AzureLinux) UserData(kubeletConfig *corev1beta1.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 CommunityGalleryImageVersionsAPI

type CommunityGalleryImageVersionsAPI interface {
	NewListPager(location string, publicGalleryName string, galleryImageName string, options *armcomputev5.CommunityGalleryImageVersionsClientListOptions) *runtime.Pager[armcomputev5.CommunityGalleryImageVersionsClientListResponse]
}

CommunityGalleryImageVersionsAPI is used for listing community gallery image versions.

type DefaultImageOutput

type DefaultImageOutput struct {
	CommunityImage   string
	PublicGalleryURL string
	Requirements     scheduling.Requirements
}

DefaultImageOutput is the Stub of an Image we return from an ImageFamily De

type ImageFamily

type ImageFamily interface {
	UserData(
		kubeletConfig *corev1beta1.KubeletConfiguration,
		taints []core.Taint,
		labels map[string]string,
		caBundle *string,
		instanceType *cloudprovider.InstanceType,
	) bootstrap.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.
	DefaultImages() []DefaultImageOutput
}

ImageFamily can be implemented to override the default logic for generating dynamic launch template parameters

type Provider

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

func NewProvider

func NewProvider(kubernetesInterface kubernetes.Interface, kubernetesVersionCache *cache.Cache, versionsClient CommunityGalleryImageVersionsAPI, location string) *Provider

func (*Provider) Get

func (p *Provider) Get(ctx context.Context, nodeClass *v1alpha2.AKSNodeClass, instanceType *cloudprovider.InstanceType, imageFamily ImageFamily) (string, error)

Get returns Image ID for the given instance type. Images may vary due to architecture, accelerator, etc

func (*Provider) GetImageID

func (p *Provider) GetImageID(ctx context.Context, communityImageName, publicGalleryURL, versionName string) (string, error)

Input versionName == "" to get the latest version

func (*Provider) KubeServerVersion

func (p *Provider) KubeServerVersion(ctx context.Context) (string, error)

type Resolver

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

Resolver is able to fill-in dynamic launch template parameters

func New

func New(_ client.Client, imageProvider *Provider) *Resolver

New constructs a new launch template Resolver

func (Resolver) Resolve

func (r Resolver) Resolve(ctx context.Context, nodeClass *v1alpha2.AKSNodeClass, nodeClaim *corev1beta1.NodeClaim, instanceType *cloudprovider.InstanceType,
	staticParameters *template.StaticParameters) (*template.Parameters, error)

Resolve fills in dynamic launch template parameters

type Ubuntu2204

type Ubuntu2204 struct {
	Options *parameters.StaticParameters
}

func (Ubuntu2204) DefaultImages

func (u Ubuntu2204) DefaultImages() []DefaultImageOutput

func (Ubuntu2204) Name

func (u Ubuntu2204) Name() string

func (Ubuntu2204) UserData

func (u Ubuntu2204) UserData(kubeletConfig *corev1beta1.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