Skip to content

Commit

Permalink
catalog: don't convert bundle-objects to csv-metadata <=4.16
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Fajerski <[email protected]>
  • Loading branch information
jan--f committed Dec 11, 2024
1 parent 30b4a67 commit bf65375
Show file tree
Hide file tree
Showing 8 changed files with 190 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Dockerfile-4.12.catalog
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ FROM registry.redhat.io/openshift4/ose-operator-registry:v4.12
ENTRYPOINT ["/bin/opm"]
CMD ["serve", "/configs", "--cache-dir=/tmp/cache"]

COPY catalog/coo-product /configs/cluster-observability-operator
COPY catalog/coo-product-4.16 /configs/cluster-observability-operator

RUN ["/bin/opm", "serve", "/configs", "--cache-dir=/tmp/cache", "--cache-only"]

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile-4.13.catalog
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ FROM registry.redhat.io/openshift4/ose-operator-registry:v4.13
ENTRYPOINT ["/bin/opm"]
CMD ["serve", "/configs", "--cache-dir=/tmp/cache"]

COPY catalog/coo-product /configs/cluster-observability-operator
COPY catalog/coo-product-4.16 /configs/cluster-observability-operator

RUN ["/bin/opm", "serve", "/configs", "--cache-dir=/tmp/cache", "--cache-only"]

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile-4.14.catalog
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ FROM registry.redhat.io/openshift4/ose-operator-registry:v4.14
ENTRYPOINT ["/bin/opm"]
CMD ["serve", "/configs", "--cache-dir=/tmp/cache"]

COPY catalog/coo-product /configs/cluster-observability-operator
COPY catalog/coo-product-4.16 /configs/cluster-observability-operator

RUN ["/bin/opm", "serve", "/configs", "--cache-dir=/tmp/cache", "--cache-only"]

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile-4.15.catalog
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ FROM registry.redhat.io/openshift4/ose-operator-registry-rhel9:v4.15.0
ENTRYPOINT ["/bin/opm"]
CMD ["serve", "/configs", "--cache-dir=/tmp/cache"]

COPY catalog/coo-product /configs/cluster-observability-operator
COPY catalog/coo-product-4.16 /configs/cluster-observability-operator

RUN ["/bin/opm", "serve", "/configs", "--cache-dir=/tmp/cache", "--cache-only"]

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile-4.16.catalog
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ FROM registry.redhat.io/openshift4/ose-operator-registry-rhel9:v4.16
ENTRYPOINT ["/bin/opm"]
CMD ["serve", "/configs", "--cache-dir=/tmp/cache"]

COPY catalog/coo-product /configs/cluster-observability-operator
COPY catalog/coo-product-4.16 /configs/cluster-observability-operator

RUN ["/bin/opm", "serve", "/configs", "--cache-dir=/tmp/cache", "--cache-only"]

Expand Down
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ generate: generate-catalog
.PHONY: generate-catalog
generate-catalog: $(OPM)
$(OPM) alpha render-template basic --output yaml --migrate-level bundle-object-to-csv-metadata catalog/catalog-template.yaml > catalog/coo-product/catalog.yaml
# pre 4.17 the catalog should have bundle-object
$(OPM) alpha render-template basic --output yaml catalog/catalog-template.yaml > catalog/coo-product-4.16/catalog.yaml

$(TOOLS_DIR):
@mkdir -p $(TOOLS_DIR)
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@
## Catalog resources:
Catalog was generated via
```
opm alpha render-template basic --output yaml --migrate-level bundle-object-to-csv-metadata catalog/catalog-template.yaml > catalog/coo-product-4.17/catalog.yaml
opm alpha render-template basic --output yaml --migrate-level bundle-object-to-csv-metadata catalog/catalog-template.yaml > catalog/coo-product/catalog.yaml
opm alpha render-template basic --output yaml --migrate-level catalog/catalog-template.yaml > catalog/coo-product-4.16/catalog.yaml
```

or simply use `make generate`
179 changes: 179 additions & 0 deletions catalog/coo-product-4.16/catalog.yaml

Large diffs are not rendered by default.

0 comments on commit bf65375

Please sign in to comment.