Skip to content

opm render cannot use different container tools or the local registry #1087

Closed as not planned
@bo0ts

Description

@bo0ts

I'm trying to implement a simple operator release workflow with the new FBC (1 operator, 1 bundle, 1 index - all with the same version). I'd like to perform as much of it locally before pushing the results. What I currently have (all wrapped in Make rules) is roughly this:

${CONTAINER_TOOL} build -f operator.Dockerfile -t ${OPERATOR_IMG} .
# ... generate the bundle and build bundle image
${CONTAINER_TOOL} build -f bundle.Dockerfile -t ${BUNDLE_IMG} .
# add bundle to index
$(OPM) render $(BUNDLE_IMG) --output=yaml >> my-operators-index/my-operator/bundles.yaml
# add bundle to stable channel
yq -i e '.entries += {"name": "my-operator.v$(VERSION)", "skips": .entries[-1].skips + .entries[-1].name}' my-operators-index/my-operator/stable-channel.yaml
# validate index
$(OPM) validate my-operators-index
# commit and tag the result
git commit ...
# build index
${CONTAINER_TOOL} build -f my-operators-index.Dockerfile -t ${INDEX_IMG} .
# publish all images
${CONTAINER_TOOL} push ${OPERATOR_IMG}
${CONTAINER_TOOL} push ${BUNDLE_IMG}
${CONTAINER_TOOL} push ${INDEX_IMG}

This would alloe me to keep building of the components and publication separate and make the process up to the commit idempotent and easy to separate into a step that can be performed locally and another step that requires registry write credentials.

Unfortunatelyopm render accesses the registry and it is not possible to reconfigure this behavior. Am I not using opm render correctly or this there another way to extract the bundle? The usage of opm render was inspired by the OpenShift 4.12 FBC docs: https://docs.openshift.com/container-platform/4.11/operators/understanding/olm-packaging-format.html#olm-fb-catalogs-example_olm-packaging-format

Metadata

Metadata

Assignees

No one assigned

    Labels

    lifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions