Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Compatible ¶ added in v0.7.3
func Compatible(it InstanceType, requirements v1alpha5.Requirements) bool
func Requirements ¶ added in v0.7.3
func Requirements(instanceTypes []InstanceType) v1alpha5.Requirements
Types ¶
type CloudProvider ¶
type CloudProvider interface { // Create a node given constraints and instance type options. This API uses a // callback pattern to enable cloudproviders to batch capacity creation // requests. The callback must be called with a theoretical node object that // is fulfilled by the cloud providers capacity creation request. Create(context.Context, *NodeRequest) (*v1.Node, error) // Delete node in cloudprovider Delete(context.Context, *v1.Node) error // GetInstanceTypes returns instance types supported by the cloudprovider. // Availability of types or zone may vary by provisioner or over time. GetInstanceTypes(context.Context, *v1alpha5.Provider) ([]InstanceType, error) // Default is a hook for additional defaulting logic at webhook time. Default(context.Context, *v1alpha5.Provisioner) // Validate is a hook for additional validation logic at webhook time. Validate(context.Context, *v1alpha5.Provisioner) *apis.FieldError // Name returns the CloudProvider implementation name. Name() string }
CloudProvider interface is implemented by cloud providers to support provisioning.
type InstanceType ¶
type InstanceType interface { Name() string // Note that though this is an array it is expected that all the Offerings are unique from one another Offerings() []Offering Architecture() string OperatingSystems() sets.String // Resources are the full allocatable resource capacities for this instance type Resources() v1.ResourceList // Overhead is the amount of resource overhead expected to be used by kubelet and any other system daemons outside // of Kubernetes. Overhead() v1.ResourceList // Price is a metric that is used to optimize pod placement onto nodes. This can be an actual monetary price per hour // for the instance type, or just a weighting where lower 'prices' are preferred. Price() float64 }
InstanceType describes the properties of a potential node (either concrete attributes of an instance of this type or supported options in the case of arrays)
func FilterInstanceTypes ¶ added in v0.8.0
func FilterInstanceTypes(instanceTypes []InstanceType, requirements v1alpha5.Requirements, requests v1.ResourceList) []InstanceType
type NodeRequest ¶ added in v0.8.0
type NodeRequest struct { Template *NodeTemplate InstanceTypeOptions []InstanceType }
type NodeTemplate ¶ added in v0.8.1
type NodeTemplate struct { Provider *v1alpha5.Provider Labels map[string]string Taints []v1.Taint Requirements v1alpha5.Requirements KubeletConfiguration *v1alpha5.KubeletConfiguration }
type Offering ¶
An Offering describes where an InstanceType is available to be used, with the expectation that its properties may be tightly coupled (e.g. the availability of an instance type in some zone is scoped to a capacity type)
type Options ¶
type Options struct {
ClientSet *kubernetes.Clientset
}
Options are injected into cloud providers' factories
Directories
¶
Path | Synopsis |
---|---|
apis/v1alpha1
+k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:defaulter-gen=TypeMeta +groupName=karpenter.k8s.aws
|
+k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:defaulter-gen=TypeMeta +groupName=karpenter.k8s.aws |
Click to show internal directories.
Click to hide internal directories.