-
Notifications
You must be signed in to change notification settings - Fork 1.9k
BZ#1943150: Fix opm prune -i registry image #31013
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Deploy preview for osdocs ready! Built with commit 65d1f31 |
24ec038 to
9b6fbe0
Compare
jeana-redhat
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One tiny food for thought, LGTM tho
|
@adellape I try the upstream and downstream because you set registry-image with different value for upstream and downstream. For downstream, the command works. [root@preserve-olm-env operator-registry]#opm index prune -f registry.redhat.io/redhat/redhat-operator-index:v4.7 -p advanced-cluster-management -i registry.redhat.io/openshift4/ose-operator-registry:v4.7 -t quay.io/kuiwang/roi-index:v4.7
INFO[0000] pruning the index packages="[advanced-cluster-management]"
INFO[0000] Pulling previous image registry.redhat.io/redhat/redhat-operator-index:v4.7 to get metadata packages="[advanced-cluster-management]"
INFO[0000] running /usr/bin/podman pull registry.redhat.io/redhat/redhat-operator-index:v4.7 packages="[advanced-cluster-management]"
INFO[0001] running /usr/bin/podman pull registry.redhat.io/redhat/redhat-operator-index:v4.7 packages="[advanced-cluster-management]"
INFO[0002] Getting label data from previous image packages="[advanced-cluster-management]"
INFO[0002] running podman inspect packages="[advanced-cluster-management]"
INFO[0003] running podman create packages="[advanced-cluster-management]"
INFO[0003] running podman cp packages="[advanced-cluster-management]"
INFO[0008] running podman rm packages="[advanced-cluster-management]"
INFO[0009] deleting packages pkg=3scale-operator
INFO[0009] packages: [3scale-operator] pkg=3scale-operator
INFO[0010] deleting packages pkg=amq-broker
INFO[0010] packages: [amq-broker] pkg=amq-broker
INFO[0010] deleting packages pkg=amq-broker-lts
INFO[0010] packages: [amq-broker-lts] pkg=amq-broker-lts
INFO[0010] deleting packages pkg=amq-online
INFO[0010] packages: [amq-online] pkg=amq-online
...
INFO[0014] deleting packages pkg=web-terminal
INFO[0014] packages: [web-terminal] pkg=web-terminal
INFO[0014] deleting packages pkg=windows-machine-config-operator
INFO[0014] packages: [windows-machine-config-operator] pkg=windows-machine-config-operator
INFO[0014] Generating dockerfile packages="[advanced-cluster-management]"
INFO[0014] writing dockerfile: index.Dockerfile232098483 packages="[advanced-cluster-management]"
INFO[0014] running podman build packages="[advanced-cluster-management]"
INFO[0014] [podman build --format docker -f index.Dockerfile232098483 -t quay.io/kuiwang/roi-index:v4.7 .] packages="[advanced-cluster-management]"But when I check the draft doc https://deploy-preview-31013--osdocs.netlify.app/openshift-enterprise/latest/operators/admin/olm-restricted-networks.html#olm-pruning-index-image_olm-restricted-networks, I find the command is the following $ opm index prune \
-f registry.redhat.io/redhat/redhat-operator-index:vBranch Build \
-p advanced-cluster-management,jaeger-product,quay-operator \
[-i registry.redhat.io/openshift4/ose-operator-registry:v4.7] \
-t <target_registry>:<port>/<namespace>/redhat-operator-index:vBranch Build There is vBranch Build. It seem the variable is not replaced. For upstream, the command does not work because the quay.io/operator-framework/upstream-community-operators:latest seems has problem [root@preserve-olm-env operator-registry]# opm index prune -f quay.io/operator-framework/upstream-community-operators:latest -p etcd -i quay.io/openshift/origin-operator-registry:4.7.0 -t quay.io/kuiwang/community-index:v4.7
INFO[0000] pruning the index packages="[etcd]"
INFO[0000] Pulling previous image quay.io/operator-framework/upstream-community-operators:latest to get metadata packages="[etcd]"
INFO[0000] running /usr/bin/podman pull quay.io/operator-framework/upstream-community-operators:latest packages="[etcd]"
INFO[0001] running /usr/bin/podman pull quay.io/operator-framework/upstream-community-operators:latest packages="[etcd]"
INFO[0002] Getting label data from previous image packages="[etcd]"
INFO[0002] running podman inspect packages="[etcd]"
Error: index image quay.io/operator-framework/upstream-community-operators:latest missing label operators.operatorframework.io.index.database.v1
Usage:
opm index prune [flags]
Flags:
-i, --binary-image opm container image for on-image opm command
-c, --container-tool string tool to interact with container images (save, build, etc.). One of: [docker, podman] (default "podman")
-f, --from-index string index to prune
--generate if enabled, just creates the dockerfile and saves it to local disk
-h, --help help for prune
-d, --out-dockerfile string if generating the dockerfile, this flag is used to (optionally) specify a dockerfile name
-p, --packages strings comma separated list of packages to keep
--permissive allow registry load errors
-t, --tag string custom tag for container image being built
Global Flags:
--skip-tls skip TLS certificate verification for container image registries while pulling bundles or index
[root@preserve-olm-env operator-registry]# |
|
@kuiwang02 Thanks for reviewing. The "Branch Build" part is just in the preview build. It will get replaced with the version for the related branch (for example 4.7 for I'll check out the other tags for the upstream image. |
|
@adellape OK, got it. Thanks. |
|
@kuiwang02 I've checked with the Operator Framework team and confirmed the upstream index image should be |
|
/lgtm |
https://bugzilla.redhat.com/show_bug.cgi?id=1943150
Preview build: