cluster-api
cluster-api copied to clipboard
Add make target to generate release manifests
Currently the only way to generate our release manifests with the CAPI Makefile is to run make release
. Currently this runs the following targets:
GIT_VERSION=$(RELEASE_TAG) $(MAKE) release-binaries
# Set the manifest image to the production bucket.
$(MAKE) manifest-modification REGISTRY=$(PROD_REGISTRY)
## Build the manifests
$(MAKE) release-manifests
# Set the development manifest image to the staging bucket.
$(MAKE) manifest-modification-dev REGISTRY=$(STAGING_REGISTRY)
## Build the development manifests
$(MAKE) release-manifests-dev
## Clean the git artifacts modified in the release process
$(MAKE) clean-release-git
With the first target - make release-binaries
- taking by far the longest. We should introduce a way to simply generate the manifests without needing to create the binaries - i.e. introduce a target make release-manifests-all
with the following targets:
release-manifests:
# Set the manifest image to the production bucket.
$(MAKE) manifest-modification REGISTRY=$(PROD_REGISTRY)
## Build the manifests
$(MAKE) release-manifests
# Set the development manifest image to the staging bucket.
$(MAKE) manifest-modification-dev REGISTRY=$(STAGING_REGISTRY)
## Build the development manifests
$(MAKE) release-manifests-dev
## Clean the git artifacts modified in the release process
$(MAKE) clean-release-git
Some additional restructuring could be done to combine the release-manifests-*
and manifest-modification-*
targets
And reduce the release
target to:
GIT_VERSION=$(RELEASE_TAG) $(MAKE) release-binaries
$(MAKE) release-manifests-all
/kind cleanup
/assign
/triage accepted
Fine for me. Let's just be careful that we don't change the outputs (e.g. before/after refactoring diff)
Hello Team, As per my understanding we need to create a target release-manifests-all
in Makefile so that the user can generate all the manifests independent of release-binaries
The expected content of release-manifest-all
https://github.com/kubernetes-sigs/cluster-api/blob/844eff2f29d1119ec171efb8111e305e03c5bfca/Makefile#L832-L841
If no one is actively working on this issue, may I take it forward?
Thanks for taking this up @chiukapoor !
/unassign /assign @chiukapoor
I have made changes as per the issue description but having some doubts as if it is safe to run make release
for testing purposes on the local environment. As per my understanding of the code there is no code/release push that is happening but just wanted to be sure before I proceed.
Hello @sbueringer, @fabriziopandini and @killianmuldoon, May you please help with the https://github.com/kubernetes-sigs/cluster-api/issues/6975#issuecomment-1323725276 query
It should be fine to run make release
locally to test your changes :slightly_smiling_face:
Thank you, I will test things out and will create a PR.
@killianmuldoon, I have created the PR which adds make target release-manifests-all
to generate all the release manifests independently of make release
While looking at release-manifests
and release-manifests-dev
targets, I couldn't find a way to combine them considering that both of them are using pretty different variables of folder paths. The same applies to manifest-modification-*
. Please do let me know your views on this, probably there is something I may be missing.