Description of problem: oc-mirror init prompts the user for input and makes automated testing more difficult Version-Release number of selected component (if applicable): How reproducible: 100% Steps to Reproduce: 1. oc-mirror init Enter custom registry image URL or blank for none. Example: localhost:5000/test:latest Actual results: Requires some input (can just be a new line) Expected results: Requires no input by default Additional info:
waiting for latest version
checked with latest version , the issue has fixed: oc-mirror init -h Output initial config template Usage: oc-mirror init [flags] Examples: # Get oc-mirror initial config template oc-mirror init # Get oc-mirror initial config template # with a registry storage backend oc-mirror init --registry localhost:5000/test:latest # Save oc-mirror initial config to a file oc-mirror init >imageset-config.yaml Flags: -h, --help help for init --output string One of 'yaml' or 'json'. --registry string Registry location for storage backend, if using. Global Flags: -v, --verbose int Number for the log level verbosity (valid 1-9, default is 0) [root@localhost oc-mirror]# oc-mirror init kind: ImageSetConfiguration apiVersion: mirror.openshift.io/v1alpha2 storageConfig: local: path: ./ mirror: platform: channels: - name: stable-4.11 type: ocp operators: - catalog: registry.redhat.io/redhat/redhat-operator-index:v4.11 packages: - name: serverless-operator channels: - name: stable additionalImages: - name: registry.redhat.io/ubi8/ubi:latest helm: {} [root@localhost oc-mirror]# oc-mirror init --registry localhost:5000/test:latest kind: ImageSetConfiguration apiVersion: mirror.openshift.io/v1alpha2 storageConfig: registry: imageURL: localhost:5000/test:latest skipTLS: false mirror: platform: channels: - name: stable-4.11 type: ocp operators: - catalog: registry.redhat.io/redhat/redhat-operator-index:v4.11 packages: - name: serverless-operator channels: - name: stable additionalImages: - name: registry.redhat.io/ubi8/ubi:latest helm: {} [root@localhost oc-mirror]# [root@localhost oc-mirror]# oc-mirror init >imageset-config.yaml [root@localhost oc-mirror]# cat imageset-config.yaml kind: ImageSetConfiguration apiVersion: mirror.openshift.io/v1alpha2 storageConfig: local: path: ./ mirror: platform: channels: - name: stable-4.11 type: ocp operators: - catalog: registry.redhat.io/redhat/redhat-operator-index:v4.11 packages: - name: serverless-operator channels: - name: stable additionalImages: - name: registry.redhat.io/ubi8/ubi:latest helm: {}
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Important: OpenShift Container Platform 4.11.0 bug fix and security update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2022:5069