-
Notifications
You must be signed in to change notification settings - Fork 226
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
list-setters - support returning just the value of a setter #542
Comments
Thanks for the issue. Does json formatting of entire table help so that you can extract desired values ? |
@phanimarupaka Returning a json table doesn't make it easy to write scripts without additional tooling. In my particular case I'm trying to use If its json or yaml you need addition tools like |
It would also be nice to support substitutions. In the event, I find some time to create a PR for this it would be great to know what the desired syntax would be. I might suggest
Is there existing functions/libraries that can be used to compute actual value of a substitution? |
Is there any update? This is very useful to simplify installation scripts around kpt packages. |
@Bobgy list-setters is now a function in kpt v1(https://kpt.dev/installation/). Is this issue still relevant ? |
It would be great if list-setters had a format option to just get the value of a setter without formatting
so it was easy to assign it to a variable in a shell script. e.g.
Right now this doesn't work because the output of list-setters is a table e.g.
Getting the values out of kpt would be useful for writing "sugar" that depends on values set by the user.
As an example, here's some Makefile magic to create a rule to create a kubecontext
The gcloud parameters are available from kpt setters used to control the CNRM cluster resource.
The work around I used was to create a settings.yaml file which sets the values from the same setters and then extract those values using
yq
. This is a hack it be much better if I could just get those values using kpt list-setters.The text was updated successfully, but these errors were encountered: