Report Kubernetes cluster and pod resource requests vs usage and generate static HTML
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
895 B

.PHONY: test docker push
IMAGE ?= hjacobs/kube-resource-report
VERSION ?= $(shell git describe --tags --always --dirty)
default: docker
poetry install
lint: install
poetry run pre-commit run --all-files
test: install lint
poetry run coverage run --source=kube_resource_report -m py.test
poetry run coverage report
docker build --build-arg "VERSION=$(VERSION)" -t "$(IMAGE):$(TAG)" .
@echo 'Docker image $(IMAGE):$(TAG) can now be used.'
push: docker
docker push "$(IMAGE):$(TAG)"
docker tag "$(IMAGE):$(TAG)" "$(IMAGE):latest"
docker push "$(IMAGE):latest"
.PHONY: version
poetry version $(VERSION)
sed -i 's,$(IMAGE):[0-9.]*,$(IMAGE):$(TAG),g' deploy/*.yaml
sed -i 's,version: v[0-9.]*,version: v$(VERSION),g' deploy/*.yaml
.PHONY: release
release: push version