Documentation ¶
Overview ¶
+kubebuilder:object:generate=true +groupName=karpenter.ibm.sh
Index ¶
- Constants
- Variables
- func Resource(resource string) schema.GroupResource
- type IBMNodeClass
- func (in *IBMNodeClass) DeepCopy() *IBMNodeClass
- func (in *IBMNodeClass) DeepCopyInto(out *IBMNodeClass)
- func (in *IBMNodeClass) DeepCopyObject() runtime.Object
- func (in *IBMNodeClass) GetConditions() []status.Condition
- func (in *IBMNodeClass) SetConditions(conditions []status.Condition)
- func (in *IBMNodeClass) StatusConditions() status.ConditionSet
- type IBMNodeClassList
- type IBMNodeClassSpec
- type IBMNodeClassStatus
- type InstanceTypeRequirements
- type PlacementStrategy
- type SubnetSelectionCriteria
Constants ¶
const ( // IBMNodeClassHashVersion is the version of the hash function used to compute the hash of the IBMNodeClass IBMNodeClassHashVersion = "1" // AnnotationIBMNodeClassHash is the annotation key for the hash of the IBMNodeClass AnnotationIBMNodeClassHash = Group + "/nodeclass-hash" // AnnotationIBMNodeClassHashVersion is the annotation key for the version of the hash function AnnotationIBMNodeClassHashVersion = Group + "/nodeclass-hash-version" )
const ( // Labels that can be selected on and are propagated to the node InstanceSizeLabelKey = constants.Group + "/instance-size" InstanceFamilyLabelKey = constants.Group + "/instance-family" InstanceMemoryLabelKey = constants.Group + "/instance-memory" InstanceCPULabelKey = constants.Group + "/instance-cpu" // Internal labels that are propagated to the node IbmLabelKey = "ibm.x-k8s.io/node" IbmLabelValue = "fake" NodeViewerLabelKey = "eks-node-viewer/instance-price" IbmPartitionLabelKey = "ibm-partition" )
const DisruptionReasonExampleReason v1.DisruptionReason = "ExampleReason"
const (
// Group is the API group for IBM Cloud provider
Group = "karpenter.ibm.sh"
)
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: Group, Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource
Types ¶
type IBMNodeClass ¶
type IBMNodeClass struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` // Spec defines the desired state of IBMNodeClass Spec IBMNodeClassSpec `json:"spec,omitempty"` // Status defines the observed state of IBMNodeClass Status IBMNodeClassStatus `json:"status,omitempty"` }
IBMNodeClass is the Schema for the IBMNodeClass API +kubebuilder:object:root=true +kubebuilder:object:generate=true +kubebuilder:subresource:status +kubebuilder:resource:scope=Cluster
func (*IBMNodeClass) DeepCopy ¶
func (in *IBMNodeClass) DeepCopy() *IBMNodeClass
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IBMNodeClass.
func (*IBMNodeClass) DeepCopyInto ¶
func (in *IBMNodeClass) DeepCopyInto(out *IBMNodeClass)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*IBMNodeClass) DeepCopyObject ¶
func (in *IBMNodeClass) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*IBMNodeClass) GetConditions ¶
func (in *IBMNodeClass) GetConditions() []status.Condition
GetConditions returns the conditions as status.Conditions for the status.Object interface
func (*IBMNodeClass) SetConditions ¶
func (in *IBMNodeClass) SetConditions(conditions []status.Condition)
SetConditions sets the conditions from status.Conditions for the status.Object interface
func (*IBMNodeClass) StatusConditions ¶
func (in *IBMNodeClass) StatusConditions() status.ConditionSet
StatusConditions returns the condition set for the status.Object interface
type IBMNodeClassList ¶
type IBMNodeClassList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []IBMNodeClass `json:"items"` }
IBMNodeClassList contains a list of IBMNodeClass +kubebuilder:object:root=true +kubebuilder:object:generate=true
func (*IBMNodeClassList) DeepCopy ¶
func (in *IBMNodeClassList) DeepCopy() *IBMNodeClassList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IBMNodeClassList.
func (*IBMNodeClassList) DeepCopyInto ¶
func (in *IBMNodeClassList) DeepCopyInto(out *IBMNodeClassList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*IBMNodeClassList) DeepCopyObject ¶
func (in *IBMNodeClassList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type IBMNodeClassSpec ¶
type IBMNodeClassSpec struct { // Region is the IBM Cloud region where nodes will be created // +required Region string `json:"region"` // Zone is the availability zone where nodes will be created // If not specified, zones will be automatically selected based on placement strategy // +optional Zone string `json:"zone,omitempty"` // InstanceProfile is the name of the instance profile to use // If not specified, instance types will be automatically selected based on requirements // +optional InstanceProfile string `json:"instanceProfile,omitempty"` // InstanceRequirements defines requirements for automatic instance type selection // Only used when InstanceProfile is not specified // +optional InstanceRequirements *InstanceTypeRequirements `json:"instanceRequirements,omitempty"` // Image is the ID of the image to use for nodes // +required Image string `json:"image"` // VPC is the ID of the VPC where nodes will be created // +required VPC string `json:"vpc"` // Subnet is the ID of the subnet where nodes will be created // If not specified, subnets will be automatically selected based on placement strategy // +optional Subnet string `json:"subnet,omitempty"` // PlacementStrategy defines how nodes should be placed across zones and subnets // Only used when Zone or Subnet is not specified // +optional PlacementStrategy *PlacementStrategy `json:"placementStrategy,omitempty"` // SecurityGroups is a list of security group IDs to attach to nodes // +optional SecurityGroups []string `json:"securityGroups,omitempty"` // Tags to apply to the instances // +optional Tags map[string]string `json:"tags,omitempty"` }
IBMNodeClassSpec defines the desired state of IBMNodeClass
func (*IBMNodeClassSpec) DeepCopy ¶
func (in *IBMNodeClassSpec) DeepCopy() *IBMNodeClassSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IBMNodeClassSpec.
func (*IBMNodeClassSpec) DeepCopyInto ¶
func (in *IBMNodeClassSpec) DeepCopyInto(out *IBMNodeClassSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type IBMNodeClassStatus ¶
type IBMNodeClassStatus struct { // SpecHash is a hash of the IBMNodeClass spec // +optional SpecHash uint64 `json:"specHash,omitempty"` // LastValidationTime is the last time the nodeclass was validated // +optional LastValidationTime metav1.Time `json:"lastValidationTime,omitempty"` // ValidationError contains the error message from the last validation // +optional ValidationError string `json:"validationError,omitempty"` // SelectedInstanceTypes contains the list of instance types that meet the requirements // Only populated when using automatic instance type selection // +optional SelectedInstanceTypes []string `json:"selectedInstanceTypes,omitempty"` // SelectedSubnets contains the list of subnets selected for node placement // Only populated when using automatic subnet selection // +optional SelectedSubnets []string `json:"selectedSubnets,omitempty"` // Conditions contains signals for health and readiness // +optional Conditions []metav1.Condition `json:"conditions,omitempty"` }
IBMNodeClassStatus defines the observed state of IBMNodeClass
func (*IBMNodeClassStatus) DeepCopy ¶
func (in *IBMNodeClassStatus) DeepCopy() *IBMNodeClassStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IBMNodeClassStatus.
func (*IBMNodeClassStatus) DeepCopyInto ¶
func (in *IBMNodeClassStatus) DeepCopyInto(out *IBMNodeClassStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type InstanceTypeRequirements ¶
type InstanceTypeRequirements struct { // Architecture specifies the CPU architecture // Valid values: "amd64", "arm64" // +optional // +kubebuilder:validation:Enum=amd64;arm64 Architecture string `json:"architecture,omitempty"` // MinimumCPU specifies the minimum number of CPUs required // +optional // +kubebuilder:validation:Minimum=1 MinimumCPU int32 `json:"minimumCPU,omitempty"` // MinimumMemory specifies the minimum amount of memory in GiB // +optional // +kubebuilder:validation:Minimum=1 MinimumMemory int32 `json:"minimumMemory,omitempty"` // MaximumHourlyPrice specifies the maximum hourly price in USD as a decimal string (e.g. "0.50") // +optional // +kubebuilder:validation:Pattern=^\\d+\\.?\\d*$ MaximumHourlyPrice string `json:"maximumHourlyPrice,omitempty"` }
InstanceTypeRequirements defines criteria for automatic instance type selection
func (*InstanceTypeRequirements) DeepCopy ¶
func (in *InstanceTypeRequirements) DeepCopy() *InstanceTypeRequirements
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InstanceTypeRequirements.
func (*InstanceTypeRequirements) DeepCopyInto ¶
func (in *InstanceTypeRequirements) DeepCopyInto(out *InstanceTypeRequirements)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PlacementStrategy ¶
type PlacementStrategy struct { // ZoneBalance determines how nodes are distributed across zones // Valid values are: // - "Balanced" (default) - Nodes are evenly distributed across zones // - "AvailabilityFirst" - Prioritize zone availability over even distribution // - "CostOptimized" - Consider both cost and availability when selecting zones // +optional // +kubebuilder:validation:Enum=Balanced;AvailabilityFirst;CostOptimized // +kubebuilder:default=Balanced ZoneBalance string `json:"zoneBalance,omitempty"` // SubnetSelection defines criteria for automatic subnet selection // +optional SubnetSelection *SubnetSelectionCriteria `json:"subnetSelection,omitempty"` }
PlacementStrategy defines how nodes should be placed across zones and subnets
func (*PlacementStrategy) DeepCopy ¶
func (in *PlacementStrategy) DeepCopy() *PlacementStrategy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PlacementStrategy.
func (*PlacementStrategy) DeepCopyInto ¶
func (in *PlacementStrategy) DeepCopyInto(out *PlacementStrategy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SubnetSelectionCriteria ¶
type SubnetSelectionCriteria struct { // MinimumAvailableIPs is the minimum number of available IPs a subnet must have // +optional // +kubebuilder:validation:Minimum=1 MinimumAvailableIPs int32 `json:"minimumAvailableIPs,omitempty"` // Tags that subnets must have to be considered for selection // +optional RequiredTags map[string]string `json:"requiredTags,omitempty"` }
SubnetSelectionCriteria defines how subnets should be automatically selected
func (*SubnetSelectionCriteria) DeepCopy ¶
func (in *SubnetSelectionCriteria) DeepCopy() *SubnetSelectionCriteria
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubnetSelectionCriteria.
func (*SubnetSelectionCriteria) DeepCopyInto ¶
func (in *SubnetSelectionCriteria) DeepCopyInto(out *SubnetSelectionCriteria)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.