Skip to content

Commit

Permalink
[ACM-10819] Updated Makefiles to support podman configuration (#675)
Browse files Browse the repository at this point in the history
* updated makefiles to support podman configuration

Signed-off-by: Disaiah Bennett <[email protected]>

* updated rbac_gen

Signed-off-by: Disaiah Bennett <[email protected]>

* updated rbac role

Signed-off-by: Disaiah Bennett <[email protected]>

---------

Signed-off-by: Disaiah Bennett <[email protected]>
  • Loading branch information
dislbenn authored Apr 24, 2024
1 parent 182732e commit 456507b
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 2 deletions.
26 changes: 26 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,12 @@ docker-build: test ## Build docker image with the manager.
docker-push: ## Push docker image with the manager.
docker push ${IMG}

podman-build: test ## Build podman image with the manager.
podman build --build-arg LDFLAGS=${LDFLAGS} -t ${IMG} .

podman-push: ## Push podman image with the manager.
podman push ${IMG}

##@ Deployment

install: manifests kustomize ## Install CRDs into the K8s cluster specified in ~/.kube/config.
Expand Down Expand Up @@ -189,6 +195,14 @@ bundle-build: ## Build the bundle image.
bundle-push: ## Push the bundle image.
$(MAKE) docker-push IMG=$(BUNDLE_IMG)

.PHONY: podman-bundle-build
podman-bundle-build: ## Build the bundle image.
podman build -f bundle.Dockerfile -t $(BUNDLE_IMG) .

.PHONY: podman-bundle-push
podman-bundle-push: ## Push the bundle image.
$(MAKE) podman-push IMG=$(BUNDLE_IMG)

.PHONY: opm
OPM = ./bin/opm
opm: ## Download opm locally if necessary.
Expand Down Expand Up @@ -230,6 +244,11 @@ catalog-build: opm ## Build a catalog image.
catalog-push: ## Push a catalog image.
$(MAKE) docker-push IMG=$(CATALOG_IMG)

# Push the catalog image.
.PHONY: podman-catalog-push
podman-catalog-push: ## Push a catalog image.
$(MAKE) podman-push IMG=$(CATALOG_IMG)


-include Makefile.dev

Expand All @@ -242,5 +261,12 @@ test-image: ## Build a functional test image
ft-install: ## Docker run the functional test image
docker run --env TEST_MODE="install" --volume ~/.kube/config:/opt/.kube/config $(REGISTRY)/backplane-operator-test:$(VERSION)

podman-test-image: ## Build a functional test image
@echo "Building $(REGISTRY)/backplane-operator-test:$(VERSION)"
podman build . -f Dockerfile.test.prow -t $(REGISTRY)/backplane-operator-test:$(VERSION)

podman-ft-install: ## Podman run the functional test image
podman run --env TEST_MODE="install" --volume ~/.kube/config:/opt/.kube/config $(REGISTRY)/backplane-operator-test:$(VERSION)

functional-tests: ## Run ginkgo functional tests directly.
ginkgo -tags functional -v test/function_tests/backplane_operator_install_test
2 changes: 2 additions & 0 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1490,6 +1490,8 @@ rules:
- dnses
verbs:
- get
- list
- watch
- apiGroups:
- config.openshift.io
resources:
Expand Down
5 changes: 3 additions & 2 deletions pkg/templates/rbac_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 456507b

Please sign in to comment.