You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This idea came from @cicci8ino, he has this use case in his home lab.
As a user I'd like to be able to create static instances of a ResourceSet template that are decoupled from the ResourceSet itself. This way I don't need to touch the ResourceSet anymore when I want to create more static instances, i.e. I don't touch the resource containing the template anymore. This is a reasonable choice from the perspective of using ResourceSets as templates, if I have a resource that encapsulates my template, I don't like the idea of having to specify the entire list of instances directly on the template resource itself.
Proposal
One way to do this would be adding a field matchLabels to resourceset.spec.inputsFrom and making resourceset.spec.inputsFrom.name not be required anymore, but rather requiring one of name or matchLabels. For example:
On the ResourceSetInputProvider side, we could introduce a new value for spec.type, Static, and copy spec.defaultValues over to status.exportedInputs when this new type used. For example:
matheuscscp
changed the title
ResourceSet static inputs from dynamic list of ResourceSetInputProvider
Decouple static ResourceSet instances from ResourceSetMar 5, 2025
For the Static type we should export an id like for all other types, in this case it can be the object UID. We could also consider exporting name and namespace, as you would most probably need these values in the templates.
This idea came from @cicci8ino, he has this use case in his home lab.
As a user I'd like to be able to create static instances of a
ResourceSet
template that are decoupled from theResourceSet
itself. This way I don't need to touch theResourceSet
anymore when I want to create more static instances, i.e. I don't touch the resource containing the template anymore. This is a reasonable choice from the perspective of usingResourceSets
as templates, if I have a resource that encapsulates my template, I don't like the idea of having to specify the entire list of instances directly on the template resource itself.Proposal
One way to do this would be adding a field
matchLabels
toresourceset.spec.inputsFrom
and makingresourceset.spec.inputsFrom.name
not be required anymore, but rather requiring one ofname
ormatchLabels
. For example:On the
ResourceSetInputProvider
side, we could introduce a new value forspec.type
,Static
, and copyspec.defaultValues
over tostatus.exportedInputs
when this new type used. For example:Alternative
Another way to achieve this would be:
And then look for a key e.g.
inputs.yaml
in theConfigMap
and parse it from YAML. This alternative has a few disadvantages:ResourceSetInputProvider
alternative we can provide a way for users to write real YAML.ConfigMap
inResourceSet
.inputs.yaml
, so we would need something specific forConfigMap
in theinputsFrom
structure.The text was updated successfully, but these errors were encountered: