Files
test/resources/image_manifests/stx-third-party-test-images.yaml
Andrew Vaillancourt 54d11e5f39 Add path_prefix support for registry separation
Enables organizational separation within registry hosts by adding
optional path_prefix configuration. This supports common use cases
like Harbor projects, private registry namespaces, and organizational
hierarchies.

Key changes:
- Add path_prefix field to Registry class with automatic slash
  normalization
- Update DockerSyncImagesKeywords to construct URLs with path prefixes
- Enhance configuration documentation with path_prefix examples
- Add unit tests for path_prefix handling and URL construction

Examples:
- Harbor projects: "project-x/test" -> harbor.com/project-x/test/busybox
- Team namespaces: "team-a" -> registry.com/team-a/my-image

The path_prefix field is optional and trailing slashes are normalized
automatically, making configuration flexible while ensuring correct
URLs.

Change-Id: I4784bc10e61840901baeaef2b69f323956bc23c3
Signed-off-by: Andrew Vaillancourt <andrew.vaillancourt@windriver.com>
2025-08-08 04:35:04 -04:00

49 lines
1.9 KiB
YAML

# ------------------------------------------------------------------------------
# Image Manifest: `stx-third-party-test-images.yaml`
#
# This manifest defines third-party, publicly available Docker images used
# in StarlingX test suites such as `testcases/cloud_platform/sanity/`.
#
# Images are sourced from registries like DockerHub, registry.k8s.io, and GCR,
# and may be mirrored to the local StarlingX registry (e.g., `registry.local:9001`)
# during system setup or as part of an on-demand test image sync.
#
# Notes:
# - Each image entry must include `name` and `tag`.
# - Image names must include their full namespace (e.g., `google-samples/node-hello`).
# - Registry URLs and credentials are defined in:
# `config/docker/files/default.json5`
# - `source_registry` values must match a registry name defined in the Docker config file
# (e.g., "dockerhub", "k8s", "gcr" - not URLs like "docker.io")
#
# Registry resolution priority:
# 1. `manifest_registry_map` with `override: true` (uses registry specified in manifest mapping in config, ignores source_registry in this file)
# 2. `source_registry` field on individual image entry (if override=false or no manifest mapping exists, must match registry name in config)
# 3. `manifest_registry_map` with `override: false` (fallback for images without source_registry)
# 4. `default_source_registry` (final fallback)
# ------------------------------------------------------------------------------
images:
# DockerHub images
- name: "busybox"
tag: "1.36.1"
source_registry: "dockerhub"
- name: "calico/ctl"
tag: "v3.27.0"
source_registry: "dockerhub"
# k8s images
- name: "pause"
tag: "3.9"
source_registry: "k8s"
- name: "e2e-test-images/resource-consumer"
tag: "1.10"
source_registry: "k8s"
# GCR images
- name: "google-samples/node-hello"
tag: "1.0"
source_registry: "gcr"