-
Notifications
You must be signed in to change notification settings - Fork 580
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
[WIP] Embed example templates into clusterawsadm #617
[WIP] Embed example templates into clusterawsadm #617
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: randomvariable 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 |
@randomvariable: The following tests 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. |
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'm torn on the config file vs CLI args
On the one hand CLI args are easy, but on the other had I feel like this has the potential to get complex and CLI flags are not great for repeatability/infrastructure as code. Like, I can check in a configuration file but I guess checking in a command line to run isn't as easy
Actually agree on this. Only doing CLI flags as equivalents of the environment variables as used by envsubst in What behaviour do we want to keep, and what should be jettisoned. Don't see the point, for example of having the instance type env vars when we as cluster api devs can use kustomize patches for our workflows, and an end user should be expected to inspect and edit the cluster and machine yamls. |
How about separate commands for cluster, machine and provider components, but with the machine command, you can pass in |
so the CLI might look something like this:
What would cluster.yaml look like? Maybe something like? clusterName: my-cluster
sshKeyName: my-ssh-key-name |
Was thinking of exposing the user to the real cluster object at this stage rather than present a clusterawsadm abstraction, but using the cluster object as a hint for some of the fields for new machines. |
ah so, the output of |
That's how I thought this would work. This will be kinda guiding the user through the steps to help them understand what they are getting and what is all under their control. |
Yup, that's exactly it. |
/milestone Next Feel free to change if necessary. |
The underlying issue is v1alpha1 Going to finish this one before #612 . |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
closing, we can reconsider down the line. /close |
@detiber: Closed this PR. In response to this:
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. |
What this PR does / why we need it:
Removes gettext by starting to embed the templates into
clusterawsadm
.User will run the following to create their examples:
Which will write the same outputs as before.
Also moving the examples to a top-level
/examples
directory for better visibility. Don't think they need to live under/cmd/clusterctl/examples
These files are used by a Bazel rule to generate a go file with the files zipped into a Go virtual file stream which is then used by the CLI to generate the examples as rendered Go templates.
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 #299
Special notes for your reviewer:
Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.
This PR will require changes to e2e, so will wait for #606 before completion.
Release note: