Skip to content

Conversation

@atilsensalduz
Copy link
Contributor

Fixes #8389

Description

This PR implements the enhancement requested in #8389 to make snapshotID optional for volumeInitializationRate when AMI is selected via amiSelectorTerms. This enables users to benefit from faster EBS volume initialization while using dynamic AMI selection, reducing operational overhead.

Currently, Karpenter requires an explicit snapshotID when using volumeInitializationRate in block device mappings. This prevents dynamic AMI selection via amiSelectorTerms while still benefiting from faster EBS volume initialization, creating operational overhead for users who want to manage AMIs dynamically.

Solution

Updated the CEL validation rule to allow volumeInitializationRate without explicit snapshotID when the EC2NodeClass has amiSelectorTerms configured. When AMIs are selected dynamically, they contain block device mapping information with snapshots that AWS can use for volume initialization.

How was this change tested?

go test ./pkg/apis/v1 -run "TestCEL.*BlockDeviceMappings" -v

Does this change impact docs?

  • Yes, PR includes docs updates
  • Yes, issue opened: #
  • No

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

…electorTerms

- Update CEL validation to allow volumeInitializationRate without explicit snapshotID when amiSelectorTerms are configured
- Add comprehensive test cases covering new validation scenarios
- Maintain backward compatibility for existing configurations with explicit snapshotID
- Update CRD manifests with improved validation rules and error messages

This enables dynamic AMI selection while benefiting from faster EBS volume initialization,
reducing operational overhead for AMI management.

Signed-off-by: atilsensalduz <[email protected]>
…electorTerms

- Update CEL validation to allow volumeInitializationRate without explicit snapshotID when amiSelectorTerms are configured
- Add comprehensive test cases covering new validation scenarios
- Maintain backward compatibility for existing configurations with explicit snapshotID
- Update CRD manifests with improved validation rules and error messages

This enables dynamic AMI selection while benefiting from faster EBS volume initialization,
reducing operational overhead for AMI management.

Signed-off-by: atilsensalduz <[email protected]>
@atilsensalduz atilsensalduz requested a review from a team as a code owner September 13, 2025 20:01
@netlify
Copy link

netlify bot commented Sep 13, 2025

Deploy Preview for karpenter-docs-prod canceled.

Name Link
🔨 Latest commit 3d6fbc0
🔍 Latest deploy log https://app.netlify.com/projects/karpenter-docs-prod/deploys/68c7c9cb20af810008f85110

…electorTerms

- Update CEL validation to allow volumeInitializationRate without explicit snapshotID when amiSelectorTerms are configured
- Add comprehensive test cases covering new validation scenarios
- Maintain backward compatibility for existing configurations with explicit snapshotID
- Update CRD manifests with improved validation rules and error messages

This enables dynamic AMI selection while benefiting from faster EBS volume initialization,
reducing operational overhead for AMI management.

Signed-off-by: atilsensalduz <[email protected]>
…electorTerms

- Update CEL validation to allow volumeInitializationRate without explicit snapshotID when amiSelectorTerms are configured
- Add comprehensive test cases covering new validation scenarios
- Maintain backward compatibility for existing configurations with explicit snapshotID
- Update CRD manifests with improved validation rules and error messages

This enables dynamic AMI selection while benefiting from faster EBS volume initialization,
reducing operational overhead for AMI management.

Signed-off-by: atilsensalduz <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make snapshotID optional for volumeInitializationRate when AMI is selected via amiSelectorTerms

1 participant