-
Notifications
You must be signed in to change notification settings - Fork 127
[v2.11] add prime mode logic to the provisioning-tests script #1839
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev-v2.11
Are you sure you want to change the base?
[v2.11] add prime mode logic to the provisioning-tests script #1839
Conversation
96048ec to
d87292a
Compare
|
Green run with prime test from this commit ✔️ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds Prime mode detection and registry routing logic to KDM provisioning tests for the v2.11 branch. When a selected Kubernetes version requires Rancher Prime (determined by comparing the version's minChannelServerVersion against a configured community cutoff), the scripts automatically select the appropriate Prime registry (staging or production) and configure the agent image accordingly.
Key changes:
- Adds version comparison utilities (AWK scripts) to detect Prime-only Kubernetes versions based on channel metadata
- Implements Prime registry selection logic with staging/production routing based on version tags
- Integrates early failure checks when Prime is required but registry credentials are unavailable (common in fork PRs)
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/semver_g.awk | New AWK utility for semantic version comparison (A>B logic) |
| scripts/channels-pick-minchan-for-version.awk | New AWK utility to extract minChannelServerVersion from channel YAML |
| scripts/prime-route | Core Prime detection logic that sets PRIME_MODE, selects registry environment, and configures agent image |
| scripts/provisioning-tests | Integration point that sources prime-route and implements early failure for missing registry credentials |
| .github/workflows/provisioning-tests.yaml | Adds Vault secrets retrieval for Prime registries and sets LAST_COMMUNITY_RANCHER/PRIME_AGENT_IMAGE env vars |
| Dockerfile.dapper | Passes through new environment variables (LAST_COMMUNITY_RANCHER, PRIME_AGENT_IMAGE, STAGE_REGISTRY_ENDPOINT) |
| docs/release.md | Documents Prime configuration variables, their purpose, and maintenance instructions for release managers |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
d6fa95e to
fed2365
Compare
fed2365 to
a1f9f2a
Compare
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:
Solution
Prime detection in scripts:
Early guard:
Defaults and safety:
Workflow integration: