-
Notifications
You must be signed in to change notification settings - Fork 431
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: enable easier flavor creation #540
feat: enable easier flavor creation #540
Conversation
/hold |
a706ad0
to
011e7b3
Compare
@fabriziopandini @detiber @vincepri curious what your thoughts are on this |
/hold cancel |
/hold for discussion and reviews |
@devigned maybe I should wait for this to cut a 0.4.2 release so we can try out the "release flavor templates as artifacts" story in real life, wdyt? |
@CecileRobertMichon great idea! |
92d53e5
to
f6bb564
Compare
|
||
.PHONY: release-manifests | ||
release-manifests: $(KUSTOMIZE) $(RELEASE_DIR) ## Builds the manifests to publish with a release | ||
kustomize build config > $(RELEASE_DIR)/infrastructure-components.yaml | ||
|
||
.PHONY: release-templates | ||
release-templates: $(RELEASE_DIR) | ||
cp templates/cluster-template* $(RELEASE_DIR)/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you for making this generic so that we don't have to remember to add new templates here every time 💯
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
/assign @justaugustus @nader-ziada @alexeldeib
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: CecileRobertMichon, devigned The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
f6bb564
to
dd20a99
Compare
nits picked :) |
@devigned please add a release note /hold cancel |
This directory contains each of the flavors for CAPZ. Each directory besides `base` will be used to | ||
create a flavor by running `kustomize build` on the directory. The name of the directory will be | ||
appended to the end of the cluster-template.yaml, e.g cluster-template-{directory-name}.yaml. That | ||
flavor can be used by specifying `--flavor {directory-name}`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@devigned great PR 👍,
but just a question, I'm a little confused with the difference between base and default, I can see default adds a machine-deployment but when I run make generate-flavors
I only get cluster-template.yaml
and cluster-template-external-cloud-provider.yaml
which are not corresponding to the directories names, so I was wondering if we can combine base and default or clarify it in the readme a little bit more
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are too kind. Thank you.
base
is ignored currently as a place to hold shared structures. I hope that it goes away in a future PR where we would take the ./templates/base/cluster-template.yaml
and break it up into the individual resources to be used piece by piece to build new flavors. Just thought it would be best to break that change into a couple of PRs.
What do you think?
dd20a99
to
ac00b33
Compare
/lgtm |
What this PR does / why we need it:
Flavors are the way
clusterctl
allows providers to specify different configurations of clusters. This PR makes it easier to create new flavors and to extend existing ones by setting up an opinionated directory structure and a make goal (make generate-flavors
) to generate flavors usingkustomize
.Below is the proposed structure.
cluster-template{-flavor-name}.yaml
and the following folders../templates
directory as a flavor.Special notes for your reviewer:
Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.
Release note: