Currently, the build and publish commands look for a stack.Makefile in the stack which is affected. This was originally created so that stack build logic would play nicely with kubebuilder-based scaffolding with minimal modification.
However, now that we have template stacks, it's a bit inconvenient to have a thin Makefileand a stack.Makefile, and it seems redundant.
What does this look like when it's done?
We would support running the build and publish commands with controller-based stacks and template stacks, without it feeling clunky. Because we expect template stacks to be more common than controller-based stacks, it should be okay to optimize for the template case a little bit.
The template case will likely have a single Makefile, so one way to do this would be to use stack.Makefile if it exists, but to use the Makefile if stack.Makefile does not exist. These would be changes in the build and publish commands.
What is the problem?
Currently, the build and publish commands look for a
stack.Makefile
in the stack which is affected. This was originally created so that stack build logic would play nicely with kubebuilder-based scaffolding with minimal modification.However, now that we have template stacks, it's a bit inconvenient to have a thin
Makefile
and astack.Makefile
, and it seems redundant.What does this look like when it's done?
We would support running the
build
andpublish
commands with controller-based stacks and template stacks, without it feeling clunky. Because we expect template stacks to be more common than controller-based stacks, it should be okay to optimize for the template case a little bit.The template case will likely have a single
Makefile
, so one way to do this would be to usestack.Makefile
if it exists, but to use theMakefile
ifstack.Makefile
does not exist. These would be changes in thebuild
andpublish
commands.