Skip to content

[GEP-33] Allow mixed format Capability CloudProfiles#1645

Merged
gardener-prow[bot] merged 6 commits intogardener:masterfrom
Roncossek:capability-migration
Apr 13, 2026
Merged

[GEP-33] Allow mixed format Capability CloudProfiles#1645
gardener-prow[bot] merged 6 commits intogardener:masterfrom
Roncossek:capability-migration

Conversation

@Roncossek
Copy link
Copy Markdown
Contributor

How to categorize this PR?
/area control-plane
/kind enhancement
/platform aws

What this PR does / why we need it:

This PR enables mixed format support for machine image specifications in CloudProfile and NamespacedCloudProfile resources, allowing smooth migration from the legacy architecture-per-region format to the new capabilityFlavors format.

Background:
Previously, CloudProfiles could only use one format per profile:

  • Old format: regions with architecture field per region
  • New format: capabilityFlavors with capabilities (introduced in GEP-33)

This created a breaking change scenario where users had to migrate all image versions at once.

Changes:

  1. CloudProfile Support: When spec.machineCapabilities is defined, both old and new formats are now supported per image version

    • Validation accepts both formats
    • Each version can use either format independently
  2. NamespacedCloudProfile Support: Removes format transformation to parent CloudProfile format

    • Mixed format is preserved as-is
    • Validation handles both formats
  3. Image Selection Logic: Updated to handle both formats during worker/bastion machine image selection

    • Automatically converts old format regions to capabilityFlavors internally
    • Maintains backward compatibility for non-capabilities CloudProfiles

Example:

providerConfig:
  machineImages:
    - name: ubuntu
      versions:
        # New format - with capabilities
        - version: "24.04"
          capabilityFlavors:
            - capabilities:
                architecture: [amd64]
                hypervisor: [baremetal, xen]
              regions:
                - name: eu-west-1
                  ami: ami-456
        # Old format - backwards compatible
        - version: "22.04"
          regions:
            - name: eu-west-1
              ami: ami-123
              architecture: amd64

Which issue(s) this PR fixes:
Part of gardener/gardener#11301

Special notes for your reviewer:
@hebelsan

Release note:

Support mixed format for machine image specifications in CloudProfile and NamespacedCloudProfile, allowing both (legacy) architecture-per-region format and new capabilityFlavors format to coexist within the same CloudProfile for smooth migration.

@gardener-prow gardener-prow Bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. area/control-plane Control plane related kind/enhancement Enhancement, improvement, extension cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jan 16, 2026
@ghost ghost added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Jan 16, 2026
@github-actions github-actions Bot added needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Jan 16, 2026
@Roncossek Roncossek force-pushed the capability-migration branch from e4beb1c to 9558f91 Compare January 16, 2026 11:29
@ghost ghost added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Jan 16, 2026
@github-actions github-actions Bot removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Jan 16, 2026
@Roncossek Roncossek marked this pull request as ready for review January 28, 2026 08:49
@Roncossek Roncossek requested a review from a team as a code owner January 28, 2026 08:49
@gardener-prow gardener-prow Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 28, 2026
@Roncossek Roncossek marked this pull request as draft January 29, 2026 09:44
@gardener-prow gardener-prow Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 29, 2026
@Roncossek Roncossek force-pushed the capability-migration branch from 9558f91 to e12dc36 Compare February 18, 2026 10:44
@ghost ghost added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Feb 18, 2026
@github-actions github-actions Bot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. and removed ok-to-test Indicates a non-member PR verified by an org member that is safe to test. labels Feb 18, 2026
@ghost ghost added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Feb 19, 2026
@github-actions github-actions Bot removed the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Feb 19, 2026
@Roncossek Roncossek force-pushed the capability-migration branch from dbde0e9 to 4f3ac80 Compare February 19, 2026 11:54
@ghost ghost added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Feb 19, 2026
@github-actions github-actions Bot removed the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Feb 19, 2026
@Roncossek Roncossek force-pushed the capability-migration branch from 4f3ac80 to bbeb6a2 Compare February 19, 2026 16:33
@ghost ghost added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Feb 19, 2026
@github-actions github-actions Bot removed the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Feb 19, 2026
@Roncossek Roncossek force-pushed the capability-migration branch from bbeb6a2 to a8a3a3c Compare February 20, 2026 08:56
@ghost ghost added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Feb 20, 2026
@github-actions github-actions Bot removed the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Feb 20, 2026
@Roncossek Roncossek marked this pull request as ready for review February 20, 2026 12:00
@gardener-prow gardener-prow Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 20, 2026
@gardener-ci-robot
Copy link
Copy Markdown
Contributor

The Gardener project currently lacks enough active contributors to adequately respond to all PRs.
This bot triages PRs according to the following rules:

  • After 30d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 14d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as active with /lifecycle active
  • Mark this PR as fresh with /remove-lifecycle stale
  • Mark this PR as rotten with /lifecycle rotten
  • Close this PR with /close

/lifecycle stale

@gardener-prow gardener-prow Bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Mar 22, 2026
@gardener-prow gardener-prow Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 1, 2026
@gardener-prow gardener-prow Bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 13, 2026
Copy link
Copy Markdown
Member

@AndreasBurger AndreasBurger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm
rebased, merging

@github-actions
Copy link
Copy Markdown
Contributor

This change implements mixed format support for AWS cloud profile machine images, allowing both legacy (regions with architecture) and new capability-based formats to coexist. The implementation adds backwards compatibility while transitioning to the modern capability-based architecture selection system.

Walkthrough

  • New Feature: Added support for mixed format machine image configurations, allowing CloudProfiles to use both old format (regions with architecture) and new format (capabilityFlavors) simultaneously per version
  • New Feature: Introduced capability normalization functions to ensure consistent architecture handling across legacy and modern formats
  • Refactor: Simplified validation and mutation logic by removing format transformation helper functions and supporting mixed formats directly
  • Refactor: Updated machine image selection in worker controller to use normalized capabilities for consistent architecture resolution
  • Test: Added comprehensive test coverage for mixed format scenarios, old format validation, and capability normalization edge cases
  • Chore: Removed deprecated helper functions for format transformation that are no longer needed with native mixed format support

Model: claude-sonnet-4-20250514 | Prompt Tokens: 32844 | Completion Tokens: 219

@federated-github-access federated-github-access Bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed ok-to-test Indicates a non-member PR verified by an org member that is safe to test. labels Apr 13, 2026
@gardener-prow gardener-prow Bot added the lgtm Indicates that a PR is ready to be merged. label Apr 13, 2026
@gardener-prow
Copy link
Copy Markdown

gardener-prow Bot commented Apr 13, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: AndreasBurger

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@gardener-prow
Copy link
Copy Markdown

gardener-prow Bot commented Apr 13, 2026

LGTM label has been added.

DetailsGit tree hash: 719ecdaf2da4ffa9c058429782f97e0cff36a9c1

@gardener-prow gardener-prow Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 13, 2026
@gardener-prow gardener-prow Bot merged commit 42f4fe5 into gardener:master Apr 13, 2026
50 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. area/control-plane Control plane related cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. kind/enhancement Enhancement, improvement, extension lgtm Indicates that a PR is ready to be merged. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants