Skip to content

Commit

Permalink
Use File-Based Catalog Format
Browse files Browse the repository at this point in the history
  • Loading branch information
varad-ahirwadkar committed Sep 4, 2024
1 parent 1dd111e commit 0e13150
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,13 @@ endif
# https://github.com/operator-framework/community-operators/blob/7f1438c/docs/packaging-operator.md#updating-your-existing-operator
.PHONY: catalog-build
catalog-build: opm ## Build a catalog image.
$(OPM) index add --container-tool $(CONTAINER_TOOL) --mode semver --tag $(CATALOG_IMG) -i quay.io/operator-framework/opm:$(OPM_VERSION)-ppc64le --bundles $(BUNDLE_IMGS) $(FROM_INDEX_OPT)
$(eval TMP_DIR := $(shell mktemp -d))
$(eval CATALOG_DOCKERFILE := $(TMP_DIR).Dockerfile)
@envsubst < catalog/preamble_config_template.json > catalog/preamble_config.json
cp catalog/preamble_config.json $(TMP_DIR)/rsct-operator-catalog.json
$(OPM) render $(BUNDLE_IMGS) >> $(TMP_DIR)/rsct-operator-catalog.json
$(OPM) generate dockerfile $(TMP_DIR) -i quay.io/operator-framework/opm:$(OPM_VERSION)-ppc64le
$(CONTAINER_TOOL) build -f $(CATALOG_DOCKERFILE) -t $(CATALOG_IMG)

# Push the catalog image.
.PHONY: catalog-push
Expand Down
15 changes: 15 additions & 0 deletions catalog/preamble_config_template.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"schema": "olm.package",
"name": "rsct-operator",
"defaultChannel": "alpha"
}
{
"schema": "olm.channel",
"name": "alpha",
"package": "rsct-operator",
"entries": [
{
"name": "rsct-operator.v${VERSION}"
}
]
}

0 comments on commit 0e13150

Please sign in to comment.