Description of problem:
When running oc-mirror with the --max-nested-paths flag for mirroring to fully disconnected clusters, the flag is ignored
Version-Release number of selected component (if applicable):
How reproducible:
Always
Steps to Reproduce:
1. Use the following imageSetConfig
kind: ImageSetConfiguration
apiVersion: mirror.openshift.io/v1alpha2
mirror:
operators:
# - catalog: oci:///home/skhoury/oci-catalog413
- catalog: registry.redhat.io/redhat/redhat-operator-index:v4.13
packages:
- name: node-observability-operator
2. Run the command
./bin/oc-mirror -c isx.yaml file:///tmp/normalm2d --max-nested-paths 4
3. Run the command
./bin/oc-mirror --from /tmp/normalm2d/mirror_seq1_000000.tar --max-nested-paths 4 docker://localhost:5000/myteam/ocp/mirror --dest-use-http --dest-skip-tls
4. check the results with
curl http://localhost:5000/v2/_catalog | jq
Actual results:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 297 100 297 0 0 59116 0 --:--:-- --:--:-- --:--:-- 59400
{
"repositories": [
"myteam/ocp/mirror/noo/node-observability-agent-rhel8",
"myteam/ocp/mirror/noo/node-observability-operator-bundle-rhel8",
"myteam/ocp/mirror/noo/node-observability-rhel8-operator",
"myteam/ocp/mirror/openshift4/ose-kube-rbac-proxy",
"myteam/ocp/mirror/redhat/redhat-operator-index"
]
}
Expected results:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 297 100 297 0 0 59116 0 --:--:-- --:--:-- --:--:-- 59400
{
"repositories": [
"myteam/ocp/mirror/noo-node-observability-agent-rhel8",
"myteam/ocp/mirror/noo-node-observability-operator-bundle-rhel8",
"myteam/ocp/mirror/noo-node-observability-rhel8-operator",
"myteam/ocp/mirror/openshift4-ose-kube-rbac-proxy",
"myteam/ocp/mirror/redhat-redhat-operator-index"
]
}
Additional info:
This works in mirror to mirror workflow. This should work both for local and remote catalogs