Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

must-gather: add Makefile target to build must-gather image #138

Merged
merged 2 commits into from
Mar 31, 2022
Merged
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
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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/
9 changes: 7 additions & 2 deletions must-gather/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
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)
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.
Expand All @@ -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)
Expand Down