Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ENVTEST_K8S_VERSION = 1.32 #refers to the version of kubebuilder assets to be do
GOLANGCI_LINT_VERSION ?= v2.9.0
KUSTOMIZE_VERSION ?= v5.2.1
CONTROLLER_TOOLS_VERSION ?= v0.16.5
OPM_VERSION ?= v1.23.0
OPM_VERSION ?= v1.68.0
BRANCH_VERSION = oadp-dev
PREVIOUS_CHANNEL ?= oadp-1.5
PREVIOUS_CHANNEL_GO_VERSION ?= 1.23
Expand Down
58 changes: 58 additions & 0 deletions build/Dockerfile.catalog
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# FBC (File-Based Catalog) image for OLM operator installation.
# Renders a bundle image into an FBC catalog servable via gRPC CatalogSource.
#
# Usage:
# podman build -f build/Dockerfile.catalog \
# --build-arg BUNDLE_IMG=<bundle-image-ref> \
# -t <catalog-image-tag> .
#
# ci-operator: set BUNDLE_IMG via build_args in the ci-operator config.
# The bundle image must be pushed to a registry accessible during the build.
#
# Reference: networking-incubator/coraza-kubernetes-operator catalog/Dockerfile

ARG OPM_VERSION=v1.68.0

FROM quay.io/operator-framework/opm:${OPM_VERSION} AS opm

FROM registry.access.redhat.com/ubi9/ubi-minimal AS builder

COPY --from=opm /bin/opm /bin/opm

# Allow opm to pull bundle images from CI registries without signature verification
RUN mkdir -p /etc/containers && \
echo '{"default":[{"type":"insecureAcceptAnything"}]}' > /etc/containers/policy.json

ARG BUNDLE_IMG
ARG VERSION=99.0.0
ARG DEFAULT_CHANNEL=dev

RUN test -n "${BUNDLE_IMG}" || (echo "BUNDLE_IMG build-arg is required" >&2; exit 1) && \
mkdir -p /configs/oadp-operator && \
/bin/opm render "${BUNDLE_IMG}" -o yaml > /configs/oadp-operator/index.yaml && \
cat >> /configs/oadp-operator/index.yaml <<EOF
---
schema: olm.package
name: oadp-operator
defaultChannel: ${DEFAULT_CHANNEL}
---
schema: olm.channel
name: ${DEFAULT_CHANNEL}
package: oadp-operator
entries:
- name: oadp-operator.v${VERSION}
EOF

RUN /bin/opm validate /configs/

FROM opm

COPY --from=builder /configs /configs

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

LABEL operators.operatorframework.io.index.configs.v1=/configs

EXPOSE 50051
ENTRYPOINT ["/bin/opm"]
CMD ["serve", "/configs", "--cache-dir=/tmp/cache"]
Comment thread
coderabbitai[bot] marked this conversation as resolved.