Skip to content

Commit

Permalink
Change to file-based catalog image
Browse files Browse the repository at this point in the history
Signed-off-by: Yi Rae Kim <[email protected]>
  • Loading branch information
yiraeChristineKim committed Nov 13, 2023
1 parent 9b1ab3c commit f3475e6
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
12 changes: 9 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ ifeq ($(GOOS), darwin)
SED="gsed"
endif

OPERATOR_NAME=gatekeeper-operator

get-replaces-version:
@echo $(REPLACES_VERSION)

Expand Down Expand Up @@ -52,7 +54,7 @@ DOCKER ?= docker
#
# For example, running 'make bundle-build bundle-push catalog-build catalog-push' will build and push both
# gatekeeper.sh/gatekeeper-operator-bundle:$VERSION and gatekeeper.sh/gatekeeper-operator-catalog:$VERSION.
REPO ?= quay.io/gatekeeper
REPO ?= quay.io/yikim
IMAGE_TAG_BASE ?= $(REPO)/gatekeeper-operator

# BUNDLE_IMG defines the image:tag used for the bundle.
Expand Down Expand Up @@ -109,7 +111,7 @@ ENVTEST = $(LOCAL_BIN)/setup-envtest
GO_BINDATA = $(LOCAL_BIN)/go-bindata
GINKGO = $(LOCAL_BIN)/ginkgo
KUSTOMIZE_VERSION ?= v5.0.1
OPM_VERSION ?= v1.27.0
OPM_VERSION ?= v1.31.0
GO_BINDATA_VERSION ?= v3.1.2+incompatible
BATS_VERSION ?= 1.2.1
OLM_VERSION ?= v0.25.0
Expand Down Expand Up @@ -362,7 +364,11 @@ import-manifests: kustomize
.PHONY: bundle-index-build
bundle-index-build: opm
ifneq ($(REPLACES_VERSION), none)
$(OPM) index add --bundles $(BUNDLE_IMG) --from-index $(PREV_BUNDLE_INDEX_IMG) --tag $(BUNDLE_INDEX_IMG) -c $(DOCKER)
-rm catalog_dir.dockerfile
-$(OPM) generate dockerfile catalog_dir
$(OPM) init $(OPERATOR_NAME) --default-channel=stable --description=./README.md --output --icon=./gatekeeper_logo.svg --output yaml > catalog_dir/index.yaml
$(OPM) render $(BUNDLE_IMG) --output=yaml >> catalog_dir/index.yaml
$(DOCKER) build . -f catalog_dir.Dockerfile -t $(BUNDLE_INDEX_IMG)
else
$(OPM) index add --bundles $(BUNDLE_IMG) --tag $(BUNDLE_INDEX_IMG) -c $(DOCKER)
endif
Expand Down
6 changes: 6 additions & 0 deletions catalog_dir/channel.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
schema: olm.channel
package: gatekeeper-operator
name: stable
entries:
- name: gatekeeper-operator.v3.11.1
1 change: 1 addition & 0 deletions gatekeeper_logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f3475e6

Please sign in to comment.