timoni icon indicating copy to clipboard operation
timoni copied to clipboard

Add List support for runtime

Open suse-coder opened this issue 5 months ago • 2 comments

As of my knowledge currently only these types are supported for timoni bundle runtime: @timoni(runtime:[string|number|bool]:[VAR_NAME])

But how would it separate this out into runtime?

       csiConfig: [
                        {
                            clusterID: "91a5d5fc-7d2b-470e-804d-9adb5361f026"
                            monitors: [
                                "192.168.178.80:3300"
                            ]
                        }
                    ]

But this does not work:

                 csiConfig: [
                        {
                            clusterID: string @timoni(runtime:string:CEPH_CLUSTER_ID)
                            monitors: [...string] @timoni(runtime:json:CEPH_MONITORS)
                        }
                    ]

suse-coder avatar Jun 17 '25 08:06 suse-coder

The runtime vars are suppose to work with ENV vars where the values cannot be a list. To pass a list, use a string with separators, for example ,. Inside the bundle you split the string and map it to a list type.

stefanprodan avatar Jun 17 '25 08:06 stefanprodan

Can you add that to the docs with example?

suse-coder avatar Jun 17 '25 15:06 suse-coder