I had a jsonnet file where there is a file config.json
which is hard coded in the variable. What I want to do is to have the ability to pass config_v1.json or config.v*.json as an argument to the config. How do I do that in the jsonnet ?
local config(
args,
resources,
nodeAffinity,
replicas=1,
ttl='',
fullName=naming.NewFullName('allm', namespace),
image=naming.WithRegistry('allm:' + env.global.User + '-latest'),
routes=null,
command=null,
) = (
local configMap = {
apiVersion: 'v1',
kind: 'ConfigMap',
metadata: {
name: fullName.name,
namespace: fullName.namespace,
labels: { app: fullName.name },
},
data: {
'conf-multiturn.json': std.manifestJsonEx(confData, ' '),
},
};