Description
Which area this feature is related to?
/area library
Which functionality do you think we should add?
Why is this needed? Is your feature request related to a problem?
Current devfile library can only replace global variables inside devfile; which means any variables defined in Kubernetes definition files (being referenced by kubernetesComp.uri
) cannot be realized/validated/replaced.
Devfile library should do variable replacement in content reference using URI in kubernetes component
Detailed description:
During devfile parsing, devfile Library can fetch kubernetes resource content defined in URI, (relative uri or absolute URL), and put it in devfileObj inlined filed in memory. Then pass the devfileObj to ValidateAndReplaceGlobalVariable
for validation and variable replacement.
When convert the uri content to inlined field, a pre-defined attribute should be added, to preserve the original uri
content. When writing back the devfileObj to file, devfile writer should look for the attribute and remove the inlined content and add back the original uri
value.
All the operations should be done in memory, the user devfile should not be changed under any parse/write operations.
Describe the solution you'd like
see description above