Closed
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