Skip to content
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

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

Open
bo0ts opened this issue Apr 19, 2023 · 0 comments
Open

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

bo0ts opened this issue Apr 19, 2023 · 0 comments

Comments

@bo0ts
Copy link

bo0ts commented Apr 19, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant