From 771bad81ae926d941dc6a73d966c5498c8369339 Mon Sep 17 00:00:00 2001 From: Mudit Agarwal Date: Wed, 30 Mar 2022 16:45:55 +0530 Subject: [PATCH 1/2] fix: add Makefile target for lvm-must-gather add Makefile target for lvm-must-gather Signed-off-by: Mudit Agarwal --- Makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Makefile b/Makefile index 79b53aced..d5ea30c4e 100644 --- a/Makefile +++ b/Makefile @@ -31,6 +31,8 @@ REGISTRY_NAMESPACE ?= ocs-dev IMAGE_TAG ?= latest IMAGE_NAME ?= lvm-operator VGMANAGER_IMAGE_NAME ?= vgmanager +MUST_GATHER_IMAGE_NAME ?= lvm-must-gather +MUST_GATHER_FULL_IMAGE_NAME=$(IMAGE_REGISTRY)/$(REGISTRY_NAMESPACE)/$(MUST_GATHER_IMAGE_NAME):$(IMAGE_TAG) # IMG defines the image used for the operator. IMG ?= $(IMAGE_REGISTRY)/$(REGISTRY_NAMESPACE)/$(IMAGE_NAME):$(IMAGE_TAG) @@ -296,3 +298,7 @@ catalog-build: opm ## Build a catalog image. .PHONY: catalog-push catalog-push: ## Push a catalog image. $(MAKE) docker-push IMG=$(CATALOG_IMG) + +lvm-must-gather: + @echo "Building the lvm-must-gather image" + $(IMAGE_BUILD_CMD) build -f must-gather/Dockerfile -t "${MUST_GATHER_FULL_IMAGE_NAME}" must-gather/ From 2067ab8036ae19e8504c77f37c35988c7403a1a8 Mon Sep 17 00:00:00 2001 From: Mudit Agarwal Date: Wed, 30 Mar 2022 16:56:04 +0530 Subject: [PATCH 2/2] fix: add instructions to create a must-gather image Adding instructions to create a must-gather image. Signed-off-by: Mudit Agarwal --- must-gather/README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/must-gather/README.md b/must-gather/README.md index 11a53330f..800ab7829 100644 --- a/must-gather/README.md +++ b/must-gather/README.md @@ -1,4 +1,4 @@ -OCS must-gather +LVM must-gather ================= `lvm-must-gather` is a tool built on top of [OpenShift must-gather](https://github.com/openshift/must-gather) @@ -6,7 +6,7 @@ that expands its capabilities to gather LVM Operator information. ### Usage ```sh -oc adm must-gather --image=quay.io/ocs-dev/lvm-must-gather +oc adm must-gather --image=quay.io/ocs-dev/lvm-must-gather:latest ``` The command above will create a local directory with a dump of the lvm state. @@ -31,6 +31,11 @@ Developers must follow these steps to make a change: 7. Work with the community to make any necessary changes through the code review process (effectively repeating steps 3-7 as needed). +To test the changes in must-gather follow these steps: +1. Run `make lvm-must-gather` +2. It will create an image named `quay.io/ocs-dev/lvm-must-gather:latest` +3. Tag it and push it to your image repository to use it with the `oc adm` command + #### Commit and Pull Request Messages - Follow the standards mentioned in [LVM-Operator How to Contribute](./../CONTRIBUTING.md)