rabbitmq / cluster-operator

RabbitMQ Cluster Kubernetes Operator
https://www.rabbitmq.com/kubernetes/operator/operator-overview.html
Mozilla Public License 2.0
884 stars 273 forks source link

Refactor Makefile #1432

Closed Zerpet closed 1 year ago

Zerpet commented 1 year ago

Summary Of Changes

Refactor makefile. Main change: stop checking for variables that are not needed in most targets.

Additional Context

Some variables were mandatory for every target, even tho those were not used at all in most targets. For example, building the operator binary does not require information about the registry, yet, variables with information registry were checked and failed if not present.

After this change, the variables are only checked in the targets relevant to those variables. For example, docker-push now checks that registry and operator image are set.

It is no longer required to have all variables defined. The targets that make use of the variables will check and fail if variables are not set, with a relevant error message as of what target requires them.