-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
✨ clusterctl: add ClusterClass support to clusterctl generate cluster
#5351
✨ clusterctl: add ClusterClass support to clusterctl generate cluster
#5351
Conversation
f8276aa
to
e713c88
Compare
e713c88
to
88a9fdf
Compare
a6cc341
to
cd82387
Compare
cd82387
to
44b31f0
Compare
clusterctl generate cluster
clusterctl generate cluster
clusterctl generate cluster
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.
A couple of minors but I think we are almost there
@sbueringer PTAL
/hold cancel |
@ykakarap I'll try to take a look tomorrow |
44b31f0
to
74c2e58
Compare
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.
First (more or less) high-level review
Open questions from my side which have the biggest impact on the code:
- Can we reference multiple ClusterClasses in a cluster template?
- As far as I know currently a cluster template always contains one Cluster and I think this assumption is pretty baked in (and I think it's a good one)
- Can a ClusterClass itself be a template?
- I don't think it should be, as we're doing something wrong with patches and variables if we have to add an additional layer of templating to our ClusterClasses
- Do we want to partially render a ClusterClass depending on which resources are already deployed?
- I would prefer just returning an error in this case. I think it's a better UX as it's less surprising and I don't think we should support partial ClusterClass rendering. There are no guarantees that the already deployed parts of a ClusterClass fit to the ones in the ClusterClass file.
74c2e58
to
52b75c9
Compare
c7465bf
to
ca13c66
Compare
ca13c66
to
30acfc5
Compare
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.
Looks good for me. A few nits, otherwise lgtm
30acfc5
to
07136f7
Compare
/lgtm Not 100% about the apidiff. But we can't implement it without those changes. I don't remember the compatibility guarantees for those packages and can't find them atm. |
07136f7
to
61f13e1
Compare
@sbueringer had to push a clean up (found some commented out debug statements). Can you please re-lgtm? |
@ykakarap: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
/lgtm |
/assign @fabriziopandini |
Great to see clusterctl getting ready for ClusterClass, we should demo this at the office hours! |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: fabriziopandini 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 |
What this PR does / why we need it:
This PR adds ClusterClass support to
clusterctl generate cluster
command. The command does the following:TODO:
I will shortly open follow-up PRs for the following items:
--list-variables
for cluster classes as well (Issue: support--list-variables
incluserctl generate cluster
with managed topology clusters #5347)clusterctl generate cluster
(Issue: Add e2e tests to the enhanced clusterctl generate cluster #5348)--from
(Issue: Explore options to handleclusterctl generate cluster --from
for managed topologies #5350)Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #5108