Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion roles/env_op_images/tasks/pulled_images_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@
# - Load cluster ImageContentSourcePolicy + ImageDigestMirrorSet objects via oc.
# - Flatten them into {source, mirror} pairs (repository prefix -> mirror ref).
# - For each container/initContainer in selected namespaces, compare the pod
# status image string to those prefixes: first matching rule yields
# status image string to those prefixes: first matching source rule yields
# expected_pull_basis mirror and expected_pull_location from the mirror host;
# if no source rule matched, a second pass checks whether the image already
# references a known mirror prefix (direct mirror URL in the pod spec);
# otherwise basis source and location from the image ref host.
# Matching uses image (reference string), not imageID; pod status often keeps
# the upstream registry name even when the runtime used a mirror.
Expand Down
8 changes: 8 additions & 0 deletions roles/env_op_images/templates/pulled_images_report.j2
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@
{% set match.expected_pull_basis = 'mirror' %}
{% endif %}
{% endfor %}
{% if match.expected_pull_basis != 'mirror' %}
{% for m in _pulled_report_mirror_mappings if m.mirror is defined and m.mirror and image.startswith(m.mirror) %}
{% if loop.first %}
{% set match.host = m.mirror.split('/')[0] %}
{% set match.expected_pull_basis = 'mirror' %}
{% endif %}
{% endfor %}
{% endif %}
{% set _ = entries.append({
'namespace': pod.metadata.namespace,
'pod': pod.metadata.name,
Expand Down
Loading