Skip to content

Bug: Spot instances filtering due to zone mismatch and image regex #178

@mateo-moon

Description

@mateo-moon

I found several issues preventing Karpenter from correctly scheduling spot instances on GCP:

  1. Zone Mismatch: The provider compares short zone names (e.g., europe-west3-a) against full GCE resource paths (e.g., projects/.../zones/europe-west3-a) returned by the AggregatedList API. This causes all offerings to be marked as unavailable.
  2. Spot Price Fallback: When the external pricing CSV is unreachable, no spot offerings are generated. Adding a fallback to on-demand price with a discount ensures resilience.
  3. Ubuntu Image Regex: The current regex for GKE Ubuntu images doesn't match images like ubuntu-gke-2404-1-33-amd64-v..., preventing image discovery for certain GKE versions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions