Files
test/resources/image_manifests/harbor-test-images.yaml
Andrew Vaillancourt 0796e5062a PoC: manifest-driven image sync for test images
This patch introduces a foundational test and keyword framework
for syncing Docker images from external registries (e.g., DockerHub)
into the local StarlingX registry at registry.local:9001. Sync
behavior is driven by YAML manifests and resolved using the
JSON5-based ConfigurationManager system already used throughout
starlingx/test.

Key Features:
- Supports multiple image manifests and logical registry mappings
  defined in config/docker/files/default.json5.
- Registry resolution follows:
  1. source_registry field (per image in manifest)
  2. manifest_registry_map (per manifest)
  3. default_source_registry (global fallback)
- Test coverage verifies that registry resolution honors override
  order, ensuring images are pulled from the correct source based
  on per-image fields and per-manifest mappings, using
  default_source_registry only when no override is provided.

Forward Compatibility:
- The config and manifest format is designed to support future
  extensions such as digest pinning, curated test image sets,
  or internal registry mirroring.
- Test images currently reference stable tags from
  https://hub.docker.com/u/starlingx and will later be moved to
  a dedicated test image repo.

This patch lays the foundation for managing image dependencies
through versioned manifests rather than bundling image binaries
in the repository.

Change-Id: Ib0bdf8ade444f079b141baed680eb1e71ed7cd0a
Signed-off-by: Andrew Vaillancourt <andrew.vaillancourt@windriver.com>
2025-06-12 02:52:12 -04:00

32 lines
1.8 KiB
YAML

# ------------------------------------------------------------------------------
# Image Manifest: harbor-test-images.yaml
#
# This manifest defines one or more Docker images to be synchronized from a
# Harbor registry into the local StarlingX registry.
#
# Purpose:
# - Demonstrates syncing images from a private registry (Harbor).
# - Used to verify that authentication and sync logic function correctly.
#
# Notes:
# - Each image entry must include both `name` and `tag`.
# - Use logical registry names (not raw URLs) in the `source_registry` field.
# - Must match a key under `registries` in `config/docker/files/default.json5`.
# - Examples: `harbor`, `dockerhub`
# - Image names must include full namespace (e.g., `examplecorp/my-image`).
# - Credentials for accessing private registries (like Harbor) are not specified here.
# - Authentication details (username, password, etc.) are configured in
# `config/docker/files/default.json5` under the corresponding `registries` entry.
# - This file defaults to `config/docker/files/default.json5`, but can be overridden using `--docker_config_file`.
# - Registry resolution is handled dynamically via `ConfigurationManager`.
# - Resolution priority (from most to least specific):
# 1. `source_registry` field on the image entry (optional)
# 2. `manifest_registry_map` in `config/docker/files/default.json5`
# 3. `default_source_registry` in `config/docker/files/default.json5`
# ------------------------------------------------------------------------------
images:
- name: "harbor_user/network-soak-test"
tag: "latest" # Example only; avoid using 'latest' in production or automated test environments.
source_registry: "harbor" # Logical registry name from docker config e.g. config/docker/files/default.json5.