[build]: Retag Kubernetes images from default registry - #29303
Conversation
Retain the upstream image names expected by Kubernetes after pulling images through the configured default registry. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Longquan Sha <losha@microsoft.com>
|
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
🟢 Approval recommended
The changes are straightforward, consistent with existing pull logic, and correctly add the missing runtime tags without altering image versions or pull behavior.
Pull request overview
This PR updates the SONiC Debian image build template to retag Kubernetes images that are pulled via DEFAULT_CONTAINER_REGISTRY so they are also available under the upstream runtime image names Kubernetes expects (e.g., k8s.gcr.io/... and kubernetesui/...). This ensures preloaded images are discoverable at runtime even when they were sourced from a mirrored/default registry.
Changes:
- After pulling
pauseviaDEFAULT_CONTAINER_REGISTRY(universal Kubernetes images), also tag it ask8s.gcr.io/pause:<version>. - After pulling Kubernetes master images via
DEFAULT_CONTAINER_REGISTRY, tag each image with its expected upstream runtime name (k8s.gcr.io/...orkubernetesui/...).
File summaries
| File | Description |
|---|---|
| files/build_templates/sonic_debian_extension.j2 | Adds docker tag steps so images pulled from DEFAULT_CONTAINER_REGISTRY are also present under the upstream names used by Kubernetes at runtime. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
This PR has backport request for branch(es): 202605,202608. ---Powered by SONiC BuildBot
|
|
This PR has backport request label(s) for branch(es): 202605,msft-202608, but is missing required test information. Please make sure you tick the tested branch(es) in the Tested branch section and provide test evidence (e.g., 202605: <test result>) in the Test result section as well in your PR description. ---Powered by SONiC BuildBot
|
Why I did it
Kubernetes expects the upstream image names even when build images are pulled through
DEFAULT_CONTAINER_REGISTRY. Without those tags, the preloaded images are not found under the names used at runtime.Work item tracking
How I did it
Tagged each Kubernetes image pulled from
DEFAULT_CONTAINER_REGISTRYwith the corresponding upstream runtime image name.How to verify it
Build an image with Kubernetes enabled and
DEFAULT_CONTAINER_REGISTRYconfigured, then verify the expectedk8s.gcr.ioandkubernetesuitags are present.Which release branch to backport (provide reason below if selected)
Tracking issue/work item for backport/cherry-pick request (GitHub issue or Microsoft ADO):
Failure type:
Tested branch
Test result
Not run (build-template-only change).
Description for the changelog
Retag Kubernetes images pulled from the default container registry with their expected runtime names.
Link to config_db schema for YANG module changes
N/A
A picture of a cute animal (not mandatory but encouraged)