How to update community-operators in a disconnected OCP4
Environment
- Openshift 4
- Disconnected installation with private imageregistry
Issue
- community-operators are not updated in my disconnected Openshift 4 using a private imageregistry
- Update community-operators to the latest version available
Resolution
When using community-operators in a disconnected environment, an administrator must build and mirror the catalog at installation time.
This catalog needs to be built and mirrored again to reflect the changes and new operator versions.
In order to update the catalog, the administrator needs to use a different tag as the one used at installation time. On this example the tag "v2" will be used, as "v1" is commonly used for the first build, but in any case the new tag needs to differ from the previous one so the catalog is mirrored properly.
- Build the catalog
# oc adm catalog build --appregistry-org community-operators --from=registry.redhat.io/openshift4/ose-operator-registry:v4.3 --to=$(hostname):5000/local-operators/community-operators:v2 --registry-config=/path/to/pull_secret.json
- Mirror the catalog
# oc adm catalog mirror $(hostname):5000/local-operators/community-operators:v2 $(hostname):5000 --registry-config=/path/to/pull_secret.json
- At this point the community-operators should be updated. In case of doubt check the Content from github.com is not included.published versions.
Root Cause
- To update the catalog of community-operators it needs to be rebuilt and mirrored.
Diagnostic Steps
- community-operator versions in the cluster are lower than in the Content from github.com is not included.repository.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.