Skip to content

Commit

Permalink
Nightly disk usage report microservice
Browse files Browse the repository at this point in the history
* Generate qdirstat report every night using a modified version of the
  script referenced by https://superuser.com/a/1028907/48763 (freeware
  / public domain)

* Run the script in a slightly modified version of the "perl" stock
  Docker image

* Plumb down all the Kubernetes / OpenShift objects to build the
  image, host the script (from a ConfigMap), and run it (as a k8s
  CronJob)

* Jury-rigged Makefile to work around
  openshift/origin#8971 and share the YAML
  between test and production
  • Loading branch information
Dominique Quatravaux committed Feb 28, 2019
1 parent 5eb9f86 commit bcf583e
Show file tree
Hide file tree
Showing 2 changed files with 694 additions and 0 deletions.
21 changes: 21 additions & 0 deletions openshift/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# A Makefile that mostly works around
# https://github.com/openshift/origin/issues/8971

.PHONY: usage
usage:
@echo >&2 "Usage: $(MAKE) pushtotest"
@echo >&2 " $(MAKE) pushtoprod"


.PHONY: pushtotest
pushtotest:
-oc delete -n wwp-test -f disk-usage-report.yaml
oc create -n wwp-test -f disk-usage-report.yaml

.PHONY: pushtoprod
pushtoprod:
-$(test2prod) < disk-usage-report.yaml | oc delete -n wwp -f -
$(test2prod) < disk-usage-report.yaml | oc create -n wwp -f -


test2prod := perl -pe 's|docker-registry.default.svc:5000/wwp-test|docker-registry.default.svc:5000/wwp|g'
Loading

0 comments on commit bcf583e

Please sign in to comment.