Documentation ¶
Overview ¶
+k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:defaulter-gen=TypeMeta +groupName=karpenter.sh
Index ¶
- Constants
- Variables
- func GetLabelDomain(key string) string
- func IsDisruptingTaint(taint v1.Taint) bool
- func IsRestrictedLabel(key string) error
- func IsRestrictedNodeLabel(key string) bool
- func ValidateRequirement(requirement v1.NodeSelectorRequirement) error
- type ConsolidationPolicy
- type Disruption
- type KubeletConfiguration
- type Limits
- type NillableDuration
- type NodeClaim
- func (in *NodeClaim) DeepCopy() *NodeClaim
- func (in *NodeClaim) DeepCopyInto(out *NodeClaim)
- func (in *NodeClaim) DeepCopyObject() runtime.Object
- func (in *NodeClaim) GetConditions() apis.Conditions
- func (in *NodeClaim) SetConditions(conditions apis.Conditions)
- func (in *NodeClaim) SetDefaults(_ context.Context)
- func (in *NodeClaim) StatusConditions() apis.ConditionManager
- func (in *NodeClaim) SupportedVerbs() []admissionregistrationv1.OperationType
- func (in *NodeClaim) Validate(_ context.Context) (errs *apis.FieldError)
- type NodeClaimList
- type NodeClaimSpec
- type NodeClaimStatus
- type NodeClaimTemplate
- type NodeClassReference
- type NodePool
- func (in *NodePool) DeepCopy() *NodePool
- func (in *NodePool) DeepCopyInto(out *NodePool)
- func (in *NodePool) DeepCopyObject() runtime.Object
- func (in *NodePool) Hash() string
- func (in *NodePool) RuntimeValidate() (errs *apis.FieldError)
- func (in *NodePool) SetDefaults(_ context.Context)
- func (in *NodePool) SupportedVerbs() []admissionregistrationv1.OperationType
- func (in *NodePool) Validate(_ context.Context) (errs *apis.FieldError)
- type NodePoolList
- type NodePoolSpec
- type NodePoolStatus
- type ObjectMeta
- type Provider
- type ResourceRequirements
Constants ¶
const ( ArchitectureAmd64 = "amd64" ArchitectureArm64 = "arm64" CapacityTypeSpot = "spot" CapacityTypeOnDemand = "on-demand" )
Well known labels and resources
const ( NodePoolLabelKey = Group + "/nodepool" NodeInitializedLabelKey = Group + "/initialized" NodeRegisteredLabelKey = Group + "/registered" CapacityTypeLabelKey = Group + "/capacity-type" )
Karpenter specific domains and labels
const ( DoNotDisruptAnnotationKey = Group + "/do-not-disrupt" ProviderCompatabilityAnnotationKey = CompatabilityGroup + "/provider" ManagedByAnnotationKey = Group + "/managed-by" NodePoolHashAnnotationKey = Group + "/nodepool-hash" )
Karpenter specific annotations
const ( Group = "karpenter.sh" CompatabilityGroup = "compatibility." + Group )
const ( DisruptionTaintKey = Group + "/disruption" DisruptingNoScheduleTaintValue = "disrupting" )
Karpenter specific taints
const Never = "Never"
const (
TerminationFinalizer = Group + "/termination"
)
Karpenter specific finalizers
Variables ¶
var ( // RestrictedLabelDomains are either prohibited by the kubelet or reserved by karpenter RestrictedLabelDomains = sets.New( "kubernetes.io", "k8s.io", Group, ) // LabelDomainExceptions are sub-domains of the RestrictedLabelDomains but allowed because // they are not used in a context where they may be passed as argument to kubelet. LabelDomainExceptions = sets.New( "kops.k8s.io", v1.LabelNamespaceSuffixNode, v1.LabelNamespaceNodeRestriction, ) // WellKnownLabels are labels that belong to the RestrictedLabelDomains but allowed. // Karpenter is aware of these labels, and they can be used to further narrow down // the range of the corresponding values by either provisioner or pods. WellKnownLabels = sets.New( NodePoolLabelKey, v1.LabelTopologyZone, v1.LabelTopologyRegion, v1.LabelInstanceTypeStable, v1.LabelArchStable, v1.LabelOSStable, CapacityTypeLabelKey, v1.LabelWindowsBuild, ) // RestrictedLabels are labels that should not be used // because they may interfere with the internal provisioning logic. RestrictedLabels = sets.New( v1.LabelHostname, ) // NormalizedLabels translate aliased concepts into the controller's // WellKnownLabels. Pod requirements are translated for compatibility. NormalizedLabels = map[string]string{ v1.LabelFailureDomainBetaZone: v1.LabelTopologyZone, "beta.kubernetes.io/arch": v1.LabelArchStable, "beta.kubernetes.io/os": v1.LabelOSStable, v1.LabelInstanceType: v1.LabelInstanceTypeStable, v1.LabelFailureDomainBetaRegion: v1.LabelTopologyRegion, } )
var ( Launched apis.ConditionType = "Launched" Registered apis.ConditionType = "Registered" Initialized apis.ConditionType = "Initialized" Empty apis.ConditionType = "Empty" Drifted apis.ConditionType = "Drifted" Expired apis.ConditionType = "Expired" )
var ( SupportedNodeSelectorOps = sets.NewString( string(v1.NodeSelectorOpIn), string(v1.NodeSelectorOpNotIn), string(v1.NodeSelectorOpGt), string(v1.NodeSelectorOpLt), string(v1.NodeSelectorOpExists), string(v1.NodeSelectorOpDoesNotExist), ) SupportedReservedResources = sets.NewString( v1.ResourceCPU.String(), v1.ResourceMemory.String(), v1.ResourceEphemeralStorage.String(), "pid", ) SupportedEvictionSignals = sets.NewString( "memory.available", "nodefs.available", "nodefs.inodesFree", "imagefs.available", "imagefs.inodesFree", "pid.available", ) )
var ( SchemeGroupVersion = schema.GroupVersion{Group: Group, Version: "v1beta1"} SchemeBuilder = runtime.NewSchemeBuilder(func(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &NodePool{}, &NodePoolList{}, &NodeClaim{}, &NodeClaimList{}, ) metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil }) )
var ( // DisruptionNoScheduleTaint is used by the deprovisioning controller to ensure no pods // are scheduled to a node that Karpenter is actively disrupting. DisruptionNoScheduleTaint = v1.Taint{ Key: DisruptionTaintKey, Effect: v1.TaintEffectNoSchedule, Value: DisruptingNoScheduleTaintValue, } )
var LivingConditions = []apis.ConditionType{ Launched, Registered, Initialized, }
Functions ¶
func GetLabelDomain ¶ added in v0.32.2
func IsDisruptingTaint ¶ added in v0.32.0
func IsRestrictedLabel ¶
IsRestrictedLabel returns an error if the label is restricted.
func IsRestrictedNodeLabel ¶
IsRestrictedNodeLabel returns true if a node label should not be injected by Karpenter. They are either known labels that will be injected by cloud providers, or label domain managed by other software (e.g., kops.k8s.io managed by kOps).
func ValidateRequirement ¶ added in v0.32.0
func ValidateRequirement(requirement v1.NodeSelectorRequirement) error
Types ¶
type ConsolidationPolicy ¶
type ConsolidationPolicy string
const ( ConsolidationPolicyWhenEmpty ConsolidationPolicy = "WhenEmpty" ConsolidationPolicyWhenUnderutilized ConsolidationPolicy = "WhenUnderutilized" )
type Disruption ¶ added in v0.31.0
type Disruption struct { // ConsolidateAfter is the duration the controller will wait // before attempting to terminate nodes that are underutilized. // Refer to ConsolidationPolicy for how underutilization is considered. // +kubebuilder:validation:Pattern=`^(([0-9]+(s|m|h))+)|(Never)$` // +kubebuilder:validation:Type="string" // +kubebuilder:validation:Schemaless // +optional ConsolidateAfter *NillableDuration `json:"consolidateAfter,omitempty"` // ConsolidationPolicy describes which nodes Karpenter can disrupt through its consolidation // algorithm. This policy defaults to "WhenUnderutilized" if not specified // +kubebuilder:default:="WhenUnderutilized" // +kubebuilder:validation:Enum:={WhenEmpty,WhenUnderutilized} // +optional ConsolidationPolicy ConsolidationPolicy `json:"consolidationPolicy,omitempty"` // ExpireAfter is the duration the controller will wait // before terminating a node, measured from when the node is created. This // is useful to implement features like eventually consistent node upgrade, // memory leak protection, and disruption testing. // +kubebuilder:default:="720h" // +kubebuilder:validation:Pattern=`^(([0-9]+(s|m|h))+)|(Never)$` // +kubebuilder:validation:Type="string" // +kubebuilder:validation:Schemaless // +optional ExpireAfter NillableDuration `json:"expireAfter"` }
func (*Disruption) DeepCopy ¶ added in v0.31.0
func (in *Disruption) DeepCopy() *Disruption
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Disruption.
func (*Disruption) DeepCopyInto ¶ added in v0.31.0
func (in *Disruption) DeepCopyInto(out *Disruption)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type KubeletConfiguration ¶
type KubeletConfiguration struct { // clusterDNS is a list of IP addresses for the cluster DNS server. // Note that not all providers may use all addresses. //+optional ClusterDNS []string `json:"clusterDNS,omitempty"` // TODO @joinnis: Remove this field when v1alpha5 is unsupported in a future version of Karpenter // ContainerRuntime is the container runtime to be used with your worker nodes. // +optional ContainerRuntime *string `json:"-"` // MaxPods is an override for the maximum number of pods that can run on // a worker node instance. // +kubebuilder:validation:Minimum:=0 // +optional MaxPods *int32 `json:"maxPods,omitempty"` // PodsPerCore is an override for the number of pods that can run on a worker node // instance based on the number of cpu cores. This value cannot exceed MaxPods, so, if // MaxPods is a lower value, that value will be used. // +kubebuilder:validation:Minimum:=0 // +optional PodsPerCore *int32 `json:"podsPerCore,omitempty"` // SystemReserved contains resources reserved for OS system daemons and kernel memory. // +kubebuilder:validation:XValidation:message="valid keys for systemReserved are ['cpu','memory','ephemeral-storage','pid']",rule="self.all(x, x=='cpu' || x=='memory' || x=='ephemeral-storage' || x=='pid')" // +kubebuilder:validation:XValidation:message="systemReserved value cannot be a negative resource quantity",rule="self.all(x, !self[x].startsWith('-'))" // +optional SystemReserved v1.ResourceList `json:"systemReserved,omitempty"` // KubeReserved contains resources reserved for Kubernetes system components. // +kubebuilder:validation:XValidation:message="valid keys for kubeReserved are ['cpu','memory','ephemeral-storage','pid']",rule="self.all(x, x=='cpu' || x=='memory' || x=='ephemeral-storage' || x=='pid')" // +kubebuilder:validation:XValidation:message="kubeReserved value cannot be a negative resource quantity",rule="self.all(x, !self[x].startsWith('-'))" // +optional KubeReserved v1.ResourceList `json:"kubeReserved,omitempty"` // EvictionHard is the map of signal names to quantities that define hard eviction thresholds // +kubebuilder:validation:XValidation:message="valid keys for evictionHard are ['memory.available','nodefs.available','nodefs.inodesFree','imagefs.available','imagefs.inodesFree','pid.available']",rule="self.all(x, x in ['memory.available','nodefs.available','nodefs.inodesFree','imagefs.available','imagefs.inodesFree','pid.available'])" // +optional EvictionHard map[string]string `json:"evictionHard,omitempty"` // EvictionSoft is the map of signal names to quantities that define soft eviction thresholds // +kubebuilder:validation:XValidation:message="valid keys for evictionSoft are ['memory.available','nodefs.available','nodefs.inodesFree','imagefs.available','imagefs.inodesFree','pid.available']",rule="self.all(x, x in ['memory.available','nodefs.available','nodefs.inodesFree','imagefs.available','imagefs.inodesFree','pid.available'])" // +optional EvictionSoft map[string]string `json:"evictionSoft,omitempty"` // EvictionSoftGracePeriod is the map of signal names to quantities that define grace periods for each eviction signal // +kubebuilder:validation:XValidation:message="valid keys for evictionSoftGracePeriod are ['memory.available','nodefs.available','nodefs.inodesFree','imagefs.available','imagefs.inodesFree','pid.available']",rule="self.all(x, x in ['memory.available','nodefs.available','nodefs.inodesFree','imagefs.available','imagefs.inodesFree','pid.available'])" // +optional EvictionSoftGracePeriod map[string]metav1.Duration `json:"evictionSoftGracePeriod,omitempty"` // EvictionMaxPodGracePeriod is the maximum allowed grace period (in seconds) to use when terminating pods in // response to soft eviction thresholds being met. // +optional EvictionMaxPodGracePeriod *int32 `json:"evictionMaxPodGracePeriod,omitempty"` // ImageGCHighThresholdPercent is the percent of disk usage after which image // garbage collection is always run. The percent is calculated by dividing this // field value by 100, so this field must be between 0 and 100, inclusive. // When specified, the value must be greater than ImageGCLowThresholdPercent. // +kubebuilder:validation:Minimum:=0 // +kubebuilder:validation:Maximum:=100 // +optional ImageGCHighThresholdPercent *int32 `json:"imageGCHighThresholdPercent,omitempty"` // ImageGCLowThresholdPercent is the percent of disk usage before which image // garbage collection is never run. Lowest disk usage to garbage collect to. // The percent is calculated by dividing this field value by 100, // so the field value must be between 0 and 100, inclusive. // When specified, the value must be less than imageGCHighThresholdPercent // +kubebuilder:validation:Minimum:=0 // +kubebuilder:validation:Maximum:=100 // +optional ImageGCLowThresholdPercent *int32 `json:"imageGCLowThresholdPercent,omitempty"` // CPUCFSQuota enables CPU CFS quota enforcement for containers that specify CPU limits. // +optional CPUCFSQuota *bool `json:"cpuCFSQuota,omitempty"` }
KubeletConfiguration defines args to be used when configuring kubelet on provisioned nodes. They are a subset of the upstream types, recognizing not all options may be supported. Wherever possible, the types and names should reflect the upstream kubelet types. https://pkg.go.dev/k8s.io/kubelet/config/v1beta1#KubeletConfiguration https://github.com/kubernetes/kubernetes/blob/9f82d81e55cafdedab619ea25cabf5d42736dacf/cmd/kubelet/app/options/options.go#L53
func (*KubeletConfiguration) DeepCopy ¶
func (in *KubeletConfiguration) DeepCopy() *KubeletConfiguration
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeletConfiguration.
func (*KubeletConfiguration) DeepCopyInto ¶
func (in *KubeletConfiguration) DeepCopyInto(out *KubeletConfiguration)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Limits ¶
type Limits v1.ResourceList
func (Limits) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Limits.
func (Limits) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (Limits) ExceededBy ¶
func (l Limits) ExceededBy(resources v1.ResourceList) error
type NillableDuration ¶ added in v0.31.0
NillableDuration is a wrapper around time.Duration which supports correct marshaling to YAML and JSON. It uses the value "Never" to signify that the duration is disabled and sets the inner duration as nil
func (*NillableDuration) DeepCopy ¶ added in v0.31.0
func (in *NillableDuration) DeepCopy() *NillableDuration
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NillableDuration.
func (*NillableDuration) DeepCopyInto ¶ added in v0.31.0
func (in *NillableDuration) DeepCopyInto(out *NillableDuration)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (NillableDuration) MarshalJSON ¶ added in v0.31.0
func (d NillableDuration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaler interface.
func (NillableDuration) ToUnstructured ¶ added in v0.31.0
func (d NillableDuration) ToUnstructured() interface{}
ToUnstructured implements the value.UnstructuredConverter interface.
func (*NillableDuration) UnmarshalJSON ¶ added in v0.31.0
func (d *NillableDuration) UnmarshalJSON(b []byte) error
UnmarshalJSON implements the json.Unmarshaller interface.
type NodeClaim ¶
type NodeClaim struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec NodeClaimSpec `json:"spec,omitempty"` Status NodeClaimStatus `json:"status,omitempty"` // IsMachine tells Karpenter whether the in-memory representation of this object // is actually referring to a NodeClaim object. This value is not actually part of the v1beta1 public-facing API // TODO @joinnis: Remove this field when v1alpha5 is unsupported in a future version of Karpenter IsMachine bool `json:"-"` }
NodeClaim is the Schema for the NodeClaims API +kubebuilder:object:root=true +kubebuilder:resource:path=nodeclaims,scope=Cluster,categories=karpenter +kubebuilder:subresource:status +kubebuilder:storageversion +kubebuilder:printcolumn:name="Type",type="string",JSONPath=".metadata.labels.node\\.kubernetes\\.io/instance-type",description="" +kubebuilder:printcolumn:name="Zone",type="string",JSONPath=".metadata.labels.topology\\.kubernetes\\.io/zone",description="" +kubebuilder:printcolumn:name="Node",type="string",JSONPath=".status.nodeName",description="" +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type==\"Ready\")].status",description="" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="" +kubebuilder:printcolumn:name="Capacity",type="string",JSONPath=".metadata.labels.karpenter\\.sh/capacity-type",priority=1,description="" +kubebuilder:printcolumn:name="NodePool",type="string",JSONPath=".metadata.labels.karpenter\\.sh/nodepool",priority=1,description="" +kubebuilder:printcolumn:name="NodeClass",type="string",JSONPath=".spec.nodeClassRef.name",priority=1,description=""
func (*NodeClaim) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeClaim.
func (*NodeClaim) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NodeClaim) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*NodeClaim) GetConditions ¶
func (in *NodeClaim) GetConditions() apis.Conditions
func (*NodeClaim) SetConditions ¶
func (in *NodeClaim) SetConditions(conditions apis.Conditions)
func (*NodeClaim) SetDefaults ¶
SetDefaults for the NodeClaim
func (*NodeClaim) StatusConditions ¶
func (in *NodeClaim) StatusConditions() apis.ConditionManager
func (*NodeClaim) SupportedVerbs ¶ added in v0.32.2
func (in *NodeClaim) SupportedVerbs() []admissionregistrationv1.OperationType
type NodeClaimList ¶
type NodeClaimList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []NodeClaim `json:"items"` }
NodeClaimList contains a list of NodeClaims +kubebuilder:object:root=true
func (*NodeClaimList) DeepCopy ¶
func (in *NodeClaimList) DeepCopy() *NodeClaimList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeClaimList.
func (*NodeClaimList) DeepCopyInto ¶
func (in *NodeClaimList) DeepCopyInto(out *NodeClaimList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NodeClaimList) DeepCopyObject ¶
func (in *NodeClaimList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type NodeClaimSpec ¶
type NodeClaimSpec struct { // Taints will be applied to the NodeClaim's node. // +optional Taints []v1.Taint `json:"taints,omitempty"` // StartupTaints are taints that are applied to nodes upon startup which are expected to be removed automatically // within a short period of time, typically by a DaemonSet that tolerates the taint. These are commonly used by // daemonsets to allow initialization and enforce startup ordering. StartupTaints are ignored for provisioning // purposes in that pods are not required to tolerate a StartupTaint in order to have nodes provisioned for them. // +optional StartupTaints []v1.Taint `json:"startupTaints,omitempty"` // Requirements are layered with GetLabels and applied to every node. // +kubebuilder:validation:XValidation:message="requirements with operator 'In' must have a value defined",rule="self.all(x, x.operator == 'In' ? x.values.size() != 0 : true)" // +kubebuilder:validation:XValidation:message="requirements operator 'Gt' or 'Lt' must have a single positive integer value",rule="self.all(x, (x.operator == 'Gt' || x.operator == 'Lt') ? (x.values.size() == 1 && int(x.values[0]) >= 0) : true)" // +kubebuilder:validation:MaxItems:=30 // +required Requirements []v1.NodeSelectorRequirement `json:"requirements" hash:"ignore"` // Resources models the resource requirements for the NodeClaim to launch // +optional Resources ResourceRequirements `json:"resources,omitempty" hash:"ignore"` // Kubelet defines args to be used when configuring kubelet on provisioned nodes. // They are a subset of the upstream types, recognizing not all options may be supported. // Wherever possible, the types and names should reflect the upstream kubelet types. // +kubebuilder:validation:XValidation:message="imageGCHighThresholdPercent must be greater than imageGCLowThresholdPercent",rule="has(self.imageGCHighThresholdPercent) && has(self.imageGCLowThresholdPercent) ? self.imageGCHighThresholdPercent > self.imageGCLowThresholdPercent : true" // +kubebuilder:validation:XValidation:message="evictionSoft OwnerKey does not have a matching evictionSoftGracePeriod",rule="has(self.evictionSoft) ? self.evictionSoft.all(e, (e in self.evictionSoftGracePeriod)):true" // +kubebuilder:validation:XValidation:message="evictionSoftGracePeriod OwnerKey does not have a matching evictionSoft",rule="has(self.evictionSoftGracePeriod) ? self.evictionSoftGracePeriod.all(e, (e in self.evictionSoft)):true" Kubelet *KubeletConfiguration `json:"kubelet,omitempty"` // NodeClassRef is a reference to an object that defines provider specific configuration // +required NodeClassRef *NodeClassReference `json:"nodeClassRef"` // Provider stores CloudProvider-specific details from a conversion from a v1alpha5.Provisioner // TODO @joinnis: Remove this field when v1alpha5 is unsupported in a future version of Karpenter Provider *Provider `json:"-"` }
NodeClaimSpec describes the desired state of the NodeClaim
func (*NodeClaimSpec) DeepCopy ¶
func (in *NodeClaimSpec) DeepCopy() *NodeClaimSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeClaimSpec.
func (*NodeClaimSpec) DeepCopyInto ¶
func (in *NodeClaimSpec) DeepCopyInto(out *NodeClaimSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NodeClaimStatus ¶
type NodeClaimStatus struct { // NodeName is the name of the corresponding node object // +optional NodeName string `json:"nodeName,omitempty"` // ProviderID of the corresponding node object // +optional ProviderID string `json:"providerID,omitempty"` // ImageID is an identifier for the image that runs on the node // +optional ImageID string `json:"imageID,omitempty"` // Capacity is the estimated full capacity of the node // +optional Capacity v1.ResourceList `json:"capacity,omitempty"` // Allocatable is the estimated allocatable capacity of the node // +optional Allocatable v1.ResourceList `json:"allocatable,omitempty"` // Conditions contains signals for health and readiness // +optional Conditions apis.Conditions `json:"conditions,omitempty"` }
NodeClaimStatus defines the observed state of NodeClaim
func (*NodeClaimStatus) DeepCopy ¶
func (in *NodeClaimStatus) DeepCopy() *NodeClaimStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeClaimStatus.
func (*NodeClaimStatus) DeepCopyInto ¶
func (in *NodeClaimStatus) DeepCopyInto(out *NodeClaimStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NodeClaimTemplate ¶
type NodeClaimTemplate struct { ObjectMeta `json:"metadata,omitempty"` // +required Spec NodeClaimSpec `json:"spec"` }
func (*NodeClaimTemplate) DeepCopy ¶
func (in *NodeClaimTemplate) DeepCopy() *NodeClaimTemplate
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeClaimTemplate.
func (*NodeClaimTemplate) DeepCopyInto ¶
func (in *NodeClaimTemplate) DeepCopyInto(out *NodeClaimTemplate)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NodeClassReference ¶
type NodeClassReference struct { // Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" // +optional Kind string `json:"kind,omitempty"` // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names // +required Name string `json:"name"` // API version of the referent // +optional APIVersion string `json:"apiVersion,omitempty"` }
func (*NodeClassReference) DeepCopy ¶
func (in *NodeClassReference) DeepCopy() *NodeClassReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeClassReference.
func (*NodeClassReference) DeepCopyInto ¶
func (in *NodeClassReference) DeepCopyInto(out *NodeClassReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NodePool ¶
type NodePool struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec NodePoolSpec `json:"spec,omitempty"` Status NodePoolStatus `json:"status,omitempty"` // IsProvisioner tells Karpenter whether the in-memory representation of this object // is actually referring to a Provisioner object. This value is not actually part of the v1beta1 public-facing API // TODO @joinnis: Remove this field when v1alpha5 is unsupported in a future version of Karpenter IsProvisioner bool `json:"-"` }
NodePool is the Schema for the NodePools API +kubebuilder:object:root=true +kubebuilder:resource:path=nodepools,scope=Cluster,categories=karpenter +kubebuilder:printcolumn:name="NodeClass",type="string",JSONPath=".spec.template.spec.nodeClassRef.name",description="" +kubebuilder:printcolumn:name="Weight",type="string",JSONPath=".spec.weight",priority=1,description="" +kubebuilder:subresource:status
func (*NodePool) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodePool.
func (*NodePool) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NodePool) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*NodePool) RuntimeValidate ¶ added in v0.32.0
func (in *NodePool) RuntimeValidate() (errs *apis.FieldError)
RuntimeValidate will be used to validate any part of the CRD that can not be validated at CRD creation
func (*NodePool) SetDefaults ¶
SetDefaults for the NodePool
func (*NodePool) SupportedVerbs ¶
func (in *NodePool) SupportedVerbs() []admissionregistrationv1.OperationType
type NodePoolList ¶
type NodePoolList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []NodePool `json:"items"` }
NodePoolList contains a list of NodePool +kubebuilder:object:root=true
func (*NodePoolList) DeepCopy ¶
func (in *NodePoolList) DeepCopy() *NodePoolList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodePoolList.
func (*NodePoolList) DeepCopyInto ¶
func (in *NodePoolList) DeepCopyInto(out *NodePoolList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NodePoolList) DeepCopyObject ¶
func (in *NodePoolList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*NodePoolList) OrderByWeight ¶
func (pl *NodePoolList) OrderByWeight()
OrderByWeight orders the provisioners in the NodePoolList by their priority weight in-place
type NodePoolSpec ¶
type NodePoolSpec struct { // Template contains the template of possibilities for the provisioning logic to launch a NodeClaim with. // NodeClaims launched from this NodePool will often be further constrained than the template specifies. // +required Template NodeClaimTemplate `json:"template"` // Disruption contains the parameters that relate to Karpenter's disruption logic // +kubebuilder:default={"consolidationPolicy": "WhenUnderutilized", "expireAfter": "720h"} // +kubebuilder:validation:XValidation:message="consolidateAfter cannot be combined with consolidationPolicy=WhenUnderutilized",rule="has(self.consolidateAfter) ? self.consolidationPolicy != 'WhenUnderutilized' || self.consolidateAfter == 'Never' : true" // +kubebuilder:validation:XValidation:message="consolidateAfter must be specified with consolidationPolicy=WhenEmpty",rule="self.consolidationPolicy == 'WhenEmpty' ? has(self.consolidateAfter) : true" // +optional Disruption Disruption `json:"disruption"` // Limits define a set of bounds for provisioning capacity. // +optional Limits Limits `json:"limits,omitempty"` // Weight is the priority given to the provisioner during scheduling. A higher // numerical weight indicates that this provisioner will be ordered // ahead of other provisioners with lower weights. A provisioner with no weight // will be treated as if it is a provisioner with a weight of 0. // +kubebuilder:validation:Minimum:=1 // +kubebuilder:validation:Maximum:=100 // +optional Weight *int32 `json:"weight,omitempty"` }
NodePoolSpec is the top level provisioner specification. Provisioners launch nodes in response to pods that are unschedulable. A single provisioner is capable of managing a diverse set of nodes. Node properties are determined from a combination of provisioner and pod scheduling constraints.
func (*NodePoolSpec) DeepCopy ¶
func (in *NodePoolSpec) DeepCopy() *NodePoolSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodePoolSpec.
func (*NodePoolSpec) DeepCopyInto ¶
func (in *NodePoolSpec) DeepCopyInto(out *NodePoolSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NodePoolStatus ¶
type NodePoolStatus struct { // Resources is the list of resources that have been provisioned. // +optional Resources v1.ResourceList `json:"resources,omitempty"` }
NodePoolStatus defines the observed state of NodePool
func (*NodePoolStatus) DeepCopy ¶
func (in *NodePoolStatus) DeepCopy() *NodePoolStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodePoolStatus.
func (*NodePoolStatus) DeepCopyInto ¶
func (in *NodePoolStatus) DeepCopyInto(out *NodePoolStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ObjectMeta ¶ added in v0.32.0
type ObjectMeta struct { // Map of string keys and values that can be used to organize and categorize // (scope and select) objects. May match selectors of replication controllers // and services. // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels // +optional Labels map[string]string `json:"labels,omitempty"` // Annotations is an unstructured key value map stored with a resource that may be // set by external tools to store and retrieve arbitrary metadata. They are not // queryable and should be preserved when modifying objects. // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations // +optional Annotations map[string]string `json:"annotations,omitempty"` }
func (*ObjectMeta) DeepCopy ¶ added in v0.32.0
func (in *ObjectMeta) DeepCopy() *ObjectMeta
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectMeta.
func (*ObjectMeta) DeepCopyInto ¶ added in v0.32.0
func (in *ObjectMeta) DeepCopyInto(out *ObjectMeta)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceRequirements ¶
type ResourceRequirements struct { // Requests describes the minimum required resources for the NodeClaim to launch // +optional Requests v1.ResourceList `json:"requests,omitempty"` }
ResourceRequirements models the required resources for the NodeClaim to launch Ths will eventually be transformed into v1.ResourceRequirements when we support resources.limits
func (*ResourceRequirements) DeepCopy ¶
func (in *ResourceRequirements) DeepCopy() *ResourceRequirements
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceRequirements.
func (*ResourceRequirements) DeepCopyInto ¶
func (in *ResourceRequirements) DeepCopyInto(out *ResourceRequirements)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.