Documentation
¶
Index ¶
- Constants
- Variables
- func ArchToAMILabelKey(arch string) string
- func GetHCP(ctx context.Context, c client.Client, namespace string) (*hyperv1.HostedControlPlane, error)
- func IsKarpenterEnabled(autoNode *hyperv1.AutoNode) bool
- func KarpenterNodePoolName(oec2nc *hyperkarpenterv1.OpenshiftEC2NodeClass) string
- func SupportedArchitectures(platform hyperv1.PlatformType) ([]string, error)
Constants ¶
const ( // KarpenterFinalizer is the finalizer added to HostedControlPlane resources by the karpenter-operator. // This allows time for Karpenter to delete all NodePools and NodeClaims before the HostedControlPlane is deleted. KarpenterFinalizer = "hypershift.openshift.io/karpenter-finalizer" // ManagedByKarpenterLabel is a label set on the userData secrets as being managed by Karpenter Operator ManagedByKarpenterLabel = "hypershift.openshift.io/managed-by-karpenter" )
const ( // KarpenterTaintConfigMapName is the name of the configmap containing the karpenter taint config KarpenterTaintConfigMapName = "set-karpenter-taint" // KarpenterSubnetsConfigMapName is the name of the configmap containing the aggregated subnet IDs // from all user-defined OpenshiftEC2NodeClass resources. KarpenterSubnetsConfigMapName = "karpenter-subnets" )
Variables ¶
var ErrHCPNotFound = errors.New("hostedcontrolplane not found")
ErrHCPNotFound is returned when no HostedControlPlane is found in the namespace.
Functions ¶
func ArchToAMILabelKey ¶ added in v0.1.75
ArchToAMILabelKey returns a label key to store the AMI ID for the given architecture. The label is set on Karpenter userData secrets in order to eventually propagate to EC2NodeClass.AMISelectorTerms.
func GetHCP ¶ added in v0.1.74
func GetHCP(ctx context.Context, c client.Client, namespace string) (*hyperv1.HostedControlPlane, error)
GetHCP retrieves the HostedControlPlane from the given namespace. Returns ErrHCPNotFound if no HCP exists in the namespace.
func IsKarpenterEnabled ¶
IsKarpenterEnabled checks if Karpenter is enabled for the given AutoNode configuration. Note that we may eventually support other platforms, but for now we only support AWS.
func KarpenterNodePoolName ¶ added in v0.1.74
func KarpenterNodePoolName(oec2nc *hyperkarpenterv1.OpenshiftEC2NodeClass) string
KarpenterNodePoolName returns the name of the Karpenter NodePool for a given OpenshiftEC2NodeClass
func SupportedArchitectures ¶ added in v0.1.75
func SupportedArchitectures(platform hyperv1.PlatformType) ([]string, error)
SupportedArchitectures returns the list of supported architectures for Karpenter on the given platform.
Types ¶
This section is empty.