Documentation ¶
Index ¶
- Constants
- func CheckNodeClaimStatus(ctx context.Context, nodeClaimObj *v1beta1.NodeClaim, kubeClient client.Client) error
- func CheckNodeClass(ctx context.Context, kClient client.Client) error
- func CreateKarpenterNodeClass(ctx context.Context, kubeClient client.Client) error
- func CreateNodeClaim(ctx context.Context, nodeClaimObj *v1beta1.NodeClaim, kubeClient client.Client) error
- func GenerateAKSNodeClassManifest(ctx context.Context) *azurev1alpha2.AKSNodeClass
- func GenerateEC2NodeClassManifest(ctx context.Context) *awsv1beta1.EC2NodeClass
- func GenerateNodeClaimManifest(ctx context.Context, storageRequirement string, ...) *v1beta1.NodeClaim
- func GenerateNodeClaimName(workspaceObj *kaitov1alpha1.Workspace) string
- func IsNodeClassAvailable(ctx context.Context, cloudName string, kubeClient client.Client) bool
- func ListNodeClaimByWorkspace(ctx context.Context, workspaceObj *kaitov1alpha1.Workspace, ...) (*v1beta1.NodeClaimList, error)
- func WaitForPendingNodeClaims(ctx context.Context, workspaceObj *kaitov1alpha1.Workspace, ...) error
Constants ¶
const ( KaitoNodePoolName = "kaito" LabelNodePool = "karpenter.sh/nodepool" NodeClassName = "default" )
Variables ¶
This section is empty.
Functions ¶
func CheckNodeClaimStatus ¶
func CheckNodeClaimStatus(ctx context.Context, nodeClaimObj *v1beta1.NodeClaim, kubeClient client.Client) error
CheckNodeClaimStatus checks the status of the nodeClaim. If the nodeClaim is not ready, then it will wait for the nodeClaim to be ready. If the nodeClaim is not ready after the timeout, then it will return an error. if the nodeClaim is ready, then it will return nil.
func CheckNodeClass ¶ added in v0.3.1
CheckNodeClass checks if Karpenter NodeClass is available. If not, the controller will create it automatically. This is only applicable when Karpenter feature flag is enabled.
func CreateKarpenterNodeClass ¶ added in v0.3.1
CreateKarpenterNodeClass creates a nodeClass object for Karpenter.
func CreateNodeClaim ¶
func CreateNodeClaim(ctx context.Context, nodeClaimObj *v1beta1.NodeClaim, kubeClient client.Client) error
CreateNodeClaim creates a nodeClaim object.
func GenerateAKSNodeClassManifest ¶ added in v0.3.1
func GenerateAKSNodeClassManifest(ctx context.Context) *azurev1alpha2.AKSNodeClass
func GenerateEC2NodeClassManifest ¶ added in v0.3.1
func GenerateEC2NodeClassManifest(ctx context.Context) *awsv1beta1.EC2NodeClass
func GenerateNodeClaimManifest ¶
func GenerateNodeClaimManifest(ctx context.Context, storageRequirement string, workspaceObj *kaitov1alpha1.Workspace) *v1beta1.NodeClaim
GenerateNodeClaimManifest generates a nodeClaim object from the given workspace.
func GenerateNodeClaimName ¶
func GenerateNodeClaimName(workspaceObj *kaitov1alpha1.Workspace) string
func IsNodeClassAvailable ¶ added in v0.3.1
func ListNodeClaimByWorkspace ¶
func ListNodeClaimByWorkspace(ctx context.Context, workspaceObj *kaitov1alpha1.Workspace, kubeClient client.Client) (*v1beta1.NodeClaimList, error)
ListNodeClaimByWorkspace list all nodeClaim objects in the cluster that are created by the workspace identified by the label.
func WaitForPendingNodeClaims ¶
func WaitForPendingNodeClaims(ctx context.Context, workspaceObj *kaitov1alpha1.Workspace, kubeClient client.Client) error
WaitForPendingNodeClaims checks if the there are any nodeClaims in provisioning condition. If so, wait until they are ready.
Types ¶
This section is empty.