Documentation
¶
Index ¶
- func BindPodsToNode(ctx context.Context, client client.Client, cluster *state.Cluster, ...)
- func CreateAndWaitForPromises(ctx context.Context, cp corecloudprovider.CloudProvider, ...) (*karpv1.NodeClaim, error)
- func ExpectCSENotProvisioned(env *test.Environment)
- func ExpectCSEProvisioned(env *test.Environment) armcompute.VirtualMachineExtension
- func ExpectCleanUp(ctx context.Context, c client.Client)
- func ExpectDecodedCustomData(env *test.Environment) string
- func ExpectInstanceResourcesHaveTags(ctx context.Context, name string, azureEnv *test.Environment, ...) *armcompute.VirtualMachine
- func ExpectKubeletFlags(_ *test.Environment, customData string, expectedFlags map[string]string)
- func ExpectLaunched(ctx context.Context, c client.Client, ...)
- func ExpectNodeClassHashUpdated(ctx context.Context, c client.Client, nodeClass *v1beta1.AKSNodeClass)
- func ExpectProvisionedAndWaitForPromises(ctx context.Context, c client.Client, cluster *state.Cluster, ...)
- func ExpectScheduledNodeClaimsCreated(ctx context.Context, client client.Client, ...) []*karpv1.NodeClaim
- func ExpectUnavailable(env *test.Environment, sku *skewer.SKU, zone string, capacityType string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BindPodsToNode ¶ added in v1.10.0
func CreateAndWaitForPromises ¶ added in v1.10.0
func CreateAndWaitForPromises( ctx context.Context, cp corecloudprovider.CloudProvider, azureEnv *test.Environment, nodeClaim *karpv1.NodeClaim, ) (*karpv1.NodeClaim, error)
CreateAndWaitForPromises calls cloudProvider.Create and waits for async polling goroutines to complete. It sets the Launched condition on the NodeClaim (mirroring what the core lifecycle controller does in production) so that the async goroutine's waitUntilLaunched unblocks. Returns the created NodeClaim and any error from the Create operation.
Use this instead of direct cloudProvider.Create() calls in tests.
func ExpectCSENotProvisioned ¶ added in v1.5.0
func ExpectCSENotProvisioned(env *test.Environment)
func ExpectCSEProvisioned ¶ added in v1.5.0
func ExpectCSEProvisioned(env *test.Environment) armcompute.VirtualMachineExtension
func ExpectCleanUp ¶ added in v1.4.0
ExpectCleanUp handled the cleanup of all Objects we need within testing that core does not
Core's ExpectCleanedUp function does not currently cleanup ConfigMaps: https://github.com/kubernetes-sigs/karpenter/blob/db8df23ffb0b689b116d99597316612c98d382ab/pkg/test/expectations/expectations.go#L244 TODO: surface this within core and remove this function
func ExpectDecodedCustomData ¶ added in v0.5.5
func ExpectDecodedCustomData(env *test.Environment) string
func ExpectInstanceResourcesHaveTags ¶ added in v1.6.2
func ExpectInstanceResourcesHaveTags(ctx context.Context, name string, azureEnv *test.Environment, tags map[string]*string) *armcompute.VirtualMachine
func ExpectKubeletFlags ¶ added in v0.6.0
func ExpectKubeletFlags(_ *test.Environment, customData string, expectedFlags map[string]string)
func ExpectLaunched ¶ added in v1.7.0
func ExpectLaunched(ctx context.Context, c client.Client, cloudProvider corecloudprovider.CloudProvider, provisioner *provisioning.Provisioner, pods ...*corev1.Pod)
TODO: Upstream this?
func ExpectNodeClassHashUpdated ¶ added in v1.10.0
func ExpectProvisionedAndWaitForPromises ¶ added in v1.10.0
func ExpectProvisionedAndWaitForPromises( ctx context.Context, c client.Client, cluster *state.Cluster, cp corecloudprovider.CloudProvider, provisioner *provisioning.Provisioner, azureEnv *test.Environment, pods ...*corev1.Pod, )
ExpectProvisionedAndWaitForPromises provisions pods and waits for async polling goroutines to complete. This ensures that any background Create operations (including GET poller) finish before the test continues, preventing goroutines from interfering with subsequent assertions.
Use this instead of upstream ExpectProvisioned to ensure proper async cleanup.
func ExpectScheduledNodeClaimsCreated ¶ added in v1.10.0
func ExpectScheduledNodeClaimsCreated( ctx context.Context, client client.Client, coreProvisioner *provisioning.Provisioner, claims ...*scheduling.NodeClaim, ) []*karpv1.NodeClaim
func ExpectUnavailable ¶
Types ¶
This section is empty.