Skip to content

feat: Support preview instances without pricing data#8957

Open
azishabibi wants to merge 1 commit intomainfrom
preview-instances-pricing-fix
Open

feat: Support preview instances without pricing data#8957
azishabibi wants to merge 1 commit intomainfrom
preview-instances-pricing-fix

Conversation

@azishabibi
Copy link

Description:

  • Assign high price (1e9) to on-demand preview instances without pricing
  • Use price-capacity-optimized allocation when prioritized overrides exist
  • Add test coverage for instances without pricing data
  • Only apply to on-demand; spot instances without zonal pricing remain unavailable

Fixes #N/A

Description

This PR enables Karpenter to handle preview instances that don't have pricing data available yet. Preview instances are now assigned a high price (1e9) for on-demand capacity, ensuring they're only selected when explicitly requested via instance type requirements. When these prioritized overrides are detected, the fleet automatically uses the price-capacity-optimized allocation strategy.

How was this change tested?

  • Added unit test should assign high price to instances without pricing data that verifies instances without pricing data receive the high price (1e9)
  • Verified the allocation strategy switches to price-capacity-optimized when prioritized overrides exist
  • Existing test suite passes

Does this change impact docs?

  • No

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

- Assign high price (1e9) to on-demand preview instances without pricing
- Use price-capacity-optimized allocation when prioritized overrides exist
- Add test coverage for instances without pricing data
- Only apply to on-demand; spot instances without zonal pricing remain unavailable
@azishabibi azishabibi requested a review from a team as a code owner February 10, 2026 20:21
@azishabibi azishabibi requested a review from ellistarn February 10, 2026 20:21
@github-actions
Copy link
Contributor

Preview deployment ready!

Preview URL: https://pr-8957.d18coufmbnnaag.amplifyapp.com

Built from commit 7df1a5427b46d46e1454fc5b3e852eff84451a6c

@coveralls
Copy link

Pull Request Test Coverage Report for Build 21881034082

Details

  • 11 of 15 (73.33%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.02%) to 67.611%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/providers/instance/instance.go 7 11 63.64%
Totals Coverage Status
Change from base Build 21877387811: 0.02%
Covered Lines: 7855
Relevant Lines: 11618

💛 - Coveralls

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.

2 participants