-
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
Improve YAML processing in clusterctl #716
Improve YAML processing in clusterctl #716
Conversation
436dbf3
to
58c4caa
Compare
/test pull-cluster-api-test |
Allow clusterctl to handle a variety of groups of objects under `--cluster` and `--machine`. Search for the correct objects instead of assuming a single document. This opens up being able to use a single configuration file, kustomize and combining cluster, machine and other objects together. Signed-off-by: Naadir Jeewa <[email protected]>
58c4caa
to
e69fc89
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.
I really like the paths this opens up 👍 couple of comments and a few nits.
Co-Authored-By: randomvariable <[email protected]>
Signed-off-by: Naadir Jeewa <[email protected]>
Cleaned up the debugging code I was using as I was figuring out how API machinery bits work, and have switched to passing the Decoder to the relevant, private, functions. |
} | ||
|
||
// Will reread the file to find items which aren't a list. | ||
// TODO: Make the Kind field mandatory on machines.yaml and then use the |
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.
Since we are still pre-alpha, maybe we should just bite the bullet and take the breaking change now?
@roberthbailey thoughts?
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.
This looks good! Left a few comments here and there. We should also make sure to update docs and gitbook (cc @davidewatson).
Signed-off-by: Naadir Jeewa <[email protected]>
Have updated @vincepri |
Signed-off-by: Naadir Jeewa <[email protected]>
Signed-off-by: Naadir Jeewa <[email protected]>
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: randomvariable, vincepri 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 |
do I have review powers here? /lgtm |
…erctl-settings add clusterctl-settings.json
What this PR does / why we need it:
Part of UX improvements for kubernetes-sigs/cluster-api-provider-aws#276 and kubernetes-sigs/cluster-api-provider-aws#371, this allows clusterctl to search for relevant objects within manifests instead of assuming the first document in the YAML file is the correct one.
This enables the use of common configuration to be handled by kustomize, which will typically add elements to a YAML file.
Potentially, this will allow removal of the separate machines and cluster manifest, as they can now be the
same file.
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 #
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: