Documentation ¶
Index ¶
Constants ¶
View Source
const (
MetdataDomain = "provider.unikorn-cloud.org"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Flavor ¶
type Flavor struct { // Name of the flavor. Name string // CPU count. CPUs int // Memory available. Memory *resource.Quantity // Disk available. Disk *resource.Quantity // GPU count. GPUs int // GPUVendor is who makes the GPU, used to determine the drivers etc. GPUVendor GPUVendor // BareMetal is a bare-metal flavor. BareMetal bool }
Flavor represents a machine type.
type FlavorList ¶
type FlavorList []Flavor
FlavorList allows us to attach sort functions and the like.
func (FlavorList) Len ¶
func (l FlavorList) Len() int
func (FlavorList) Less ¶
func (l FlavorList) Less(i, j int) bool
func (FlavorList) Swap ¶
func (l FlavorList) Swap(i, j int)
type Image ¶
type Image struct { // Name of the image. Name string // Created is when the image was created. Created time.Time // Modified is when the image was modified. Modified time.Time // KubernetesVersion is only populated if the image contains a pre-installed // version of Kubernetes, this acts as a cache and improves provisioning performance. // This is pretty much the only source of truth about Kubernetes versions at // present, so should be populated. KubernetesVersion string }
Image represents an operating system image.
type Provider ¶
type Provider interface { // Flavors list all available flavors. Flavors(ctx context.Context) (FlavorList, error) // Images lists all available images. Images(ctx context.Context) (ImageList, error) // ConfigureCluster does any provider specific configuration for a cluster. ConfigureCluster(ctx context.Context, cluster *unikornv1.KubernetesCluster) error // DeconfigureCluster does any provider specific cluster cleanup. DeconfigureCluster(ctx context.Context, annotations map[string]string) error }
Providers are expected to provide a provider agnostic manner. They are also expected to provide any caching or memoization required to provide high performance and a decent UX.
Click to show internal directories.
Click to hide internal directories.