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>
35 lines
2.1 KiB
YAML
35 lines
2.1 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`.
|
|
# - `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:
|
|
- 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.
|