-
Notifications
You must be signed in to change notification settings - Fork 149
Closed
Labels
good first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is neededruntimeIssues or PRs related to kcl runtime including value and value opertionsIssues or PRs related to kcl runtime including value and value opertionsstdlibIssues or PRs related to kcl standard librariesIssues or PRs related to kcl standard libraries
Milestone
Description
Feature Request
Is your feature request related to a problem? Please describe:
I want to declaritively create text files and import them into kcl.
Describe the feature you'd like:
I'd like to create configmaps through kcl, ie:
kind: "ConfigMap"
apiVersion: "v1"
data: {
"myfile": importstr(myfile.txt)
}
Describe alternatives you've considered:
Create generative rules outside of kcl
Other improvements might be:
importYaml
, which would be able to import a yaml file, and convert to a KCL object.
glob
to allow creating a list of filenames, that I can then iterate over to create a set of files, ie:
kind: "ConfigMap"
apiVersion: "v1"
data: {
filename: importstr(filename) for filename in glob('mydata/*.yaml')
}
This feature does exist in jsonnet
Peefy
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is neededruntimeIssues or PRs related to kcl runtime including value and value opertionsIssues or PRs related to kcl runtime including value and value opertionsstdlibIssues or PRs related to kcl standard librariesIssues or PRs related to kcl standard libraries