Documentation ¶
Overview ¶
Package provider contains abstract cloud provider types and interfaces.
Index ¶
Constants ¶
const ( DefaultSSHPort = 22 DefaultKubeletPort = 10250 DefaultKubeconfigFieldPath = "kubeconfig" )
Variables ¶
var ( ErrNoKubermaticConfigurationFound = errors.New("no KubermaticConfiguration resource found") ErrTooManyKubermaticConfigurationFound = errors.New("more than one KubermaticConfiguration resource found") )
Functions ¶
This section is empty.
Types ¶
type CloudProvider ¶
type CloudProvider interface { InitializeCloudProvider(context.Context, *kubermaticv1.Cluster, ClusterUpdater) (*kubermaticv1.Cluster, error) CleanUpCloudProvider(context.Context, *kubermaticv1.Cluster, ClusterUpdater) (*kubermaticv1.Cluster, error) DefaultCloudSpec(context.Context, *kubermaticv1.ClusterSpec) error ValidateCloudSpec(context.Context, kubermaticv1.CloudSpec) error ValidateCloudSpecUpdate(ctx context.Context, oldSpec kubermaticv1.CloudSpec, newSpec kubermaticv1.CloudSpec) error }
CloudProvider declares a set of methods for interacting with a cloud provider.
type ClusterUpdater ¶
type ClusterUpdater func(context.Context, string, func(*kubermaticv1.Cluster)) (*kubermaticv1.Cluster, error)
ClusterUpdater defines a function to persist an update to a cluster.
type DatacenterGetter ¶
type DatacenterGetter = func(context.Context, string) (*kubermaticv1.Datacenter, error)
DatacenterGetter is a function to retrieve a single Datacenter.
type DatacentersGetter ¶
type DatacentersGetter = func(context.Context) (map[string]*kubermaticv1.Datacenter, error)
DatacentersGetter is a function to retrieve a list of all available Datacenters.
type KubermaticConfigurationGetter ¶
type KubermaticConfigurationGetter = func(context.Context) (*kubermaticv1.KubermaticConfiguration, error)
KubermaticConfigurationGetter is a function to retrieve the currently relevant KubermaticConfiguration. That is the one in the same namespace as the running application (e.g. the seed-controller-manager). It's an error if there are none or more than one KubermaticConfiguration objects in a single namespace.
type NodeCapacity ¶
type NodeCapacity struct { CPUCores *resource.Quantity GPUs *resource.Quantity Memory *resource.Quantity Storage *resource.Quantity }
NodeCapacity represents the size of a cluster node in a Kubernetes cluster.
func NewNodeCapacity ¶
func NewNodeCapacity() *NodeCapacity
func (*NodeCapacity) WithCPUCount ¶
func (c *NodeCapacity) WithCPUCount(cpus int)
func (*NodeCapacity) WithGPUCount ¶
func (c *NodeCapacity) WithGPUCount(gpus int)
func (*NodeCapacity) WithMemory ¶
func (c *NodeCapacity) WithMemory(value int, unit string) error
func (*NodeCapacity) WithStorage ¶
func (c *NodeCapacity) WithStorage(value int, unit string) error
type ReconcilingCloudProvider ¶
type ReconcilingCloudProvider interface { CloudProvider ReconcileCluster(context.Context, *kubermaticv1.Cluster, ClusterUpdater) (*kubermaticv1.Cluster, error) }
ReconcilingCloudProvider is a cloud provider that can not just created resources once, but is capable of continuously reconciling and fixing any problems with them.
type SecretKeySelectorValueFunc ¶
type SecretKeySelectorValueFunc func(configVar *kubermaticv1.GlobalSecretKeySelector, key string) (string, error)
SecretKeySelectorValueFunc is used to fetch the value of a config var. Do not build your own implementation, use SecretKeySelectorValueFuncFactory.
func SecretKeySelectorValueFuncFactory ¶
func SecretKeySelectorValueFuncFactory(ctx context.Context, client ctrlruntimeclient.Reader) SecretKeySelectorValueFunc
Directories ¶
Path | Synopsis |
---|---|
aws
Package aws contains the Amazon Web Services (AWS) cloud provider implementation.
|
Package aws contains the Amazon Web Services (AWS) cloud provider implementation. |
aws/data
Package data is separate from the regular AWS provider package because it initializes a large chunk of data that might not be relevant to everyone using the AWS provider code.
|
Package data is separate from the regular AWS provider package because it initializes a large chunk of data that might not be relevant to everyone using the AWS provider code. |