camunda-community-hub / camunda-8-helm-profiles

A collection of Helm values files for the Camunda Platform 8 Helm Chart
Apache License 2.0
19 stars 21 forks source link

Remove `.PHONY` declarations and instead add `remake` task descriptions #56

Open falko opened 1 year ago

falko commented 1 year ago

This proposal might be controversial and against best practices of make, but the .PHONY declarations are mostly redundant, which makes our Makefiles harder to read and has more than once lead to inconsistencies like this: https://github.com/camunda-community-hub/camunda-8-helm-profiles/blob/main/google/include/kubernetes-gke.mk#L31-L32

Let's remove them and instead introduce documentation in form of remake task descriptions, e.g.:

#: Install Camunda on Kubernetes
all: camunda await-zeebe rebalance-leaders benchmark

#: Create Kubernetes cluster and install Prometheus & Grafana
kube: kube-gke metrics url-grafana

They can then be extracted using remake --tasks, e.g.:

$ remake --tasks
all                  Install Camunda on Kubernetes
clean                Uninstall Camunda from Kubernetes
clean-kube           Delete entire Kubernetes cluster including metrics data
kube                 Create Kubernetes cluster and install Prometheus & Grafana
url-grafana          Get URL for Grafana
urls                 Get URLs for Kubernetes cluster

And since not everyone has remake installed we can add these to the README.md that accompanies each Helm profile. This would also help people that don't get shell completion for make.

I am already working on a PR for this.

falko commented 1 year ago

Apparently .PHONY is useful for something (other than stating the obvious): https://github.com/jeffsp/makefile_help

Maybe this could be combined with remake task descriptions...