Skip to content

Conversation

@jferrazbr
Copy link

@jferrazbr jferrazbr commented Oct 22, 2025

Issue #51881

Prepare KDM CI and test scripts to work when KDM marks Prime-only Kubernetes versions. Same idea as PR #1822 for v2.9, adapted per branch.

Problem

KDM CI and test scripts needs to:

  • Detect when a selected Kubernetes version requires Prime.
  • Choose staging or production Prime registry.
  • Fail early with a clear message if Prime is required but no registry endpoint is available in the environment.
  • Keep non-Prime behavior unchanged.

Solution

  • Prime detection in scripts:

    • Read channels, compare the release item’s "minChannelServerVersion" with "LAST_COMMUNITY_RANCHER" to decide Prime.
    • Pick "staging" or "production" Prime based on the version tag pattern.
    • Set "PRIME_MODE" and "PRIME_REG_HOST" for downstream provisioning test.
  • Early guard:

    • If "PRIME_MODE" is 1 but no registry endpoint is present, stop with a user-friendly message that explains why.
  • Defaults and safety:

    • Respect an already set "CATTLE_AGENT_IMAGE" from the environment. Only set a default if it is empty.
    • Keep normal flow when Prime is not required.
  • Workflow integration:

    • Variables "LAST_COMMUNITY_RANCHER" and "PRIME_AGENT_IMAGE" are passed from the workflow env. Scripts keep safe defaults for local runs.

@jferrazbr jferrazbr changed the title add prime mode logic to the provisioning-tests script [v2.12] add prime mode logic to the provisioning-tests script Oct 22, 2025
@jferrazbr
Copy link
Author

Green run with prime test from this commit ✔️

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