Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Devfile library should do variable replacement in content reference using URI in kubernetes component #906

Closed
yangcao77 opened this issue Aug 8, 2022 · 0 comments · Fixed by devfile/library#138
Assignees
Labels
area/library Common devfile library for interacting with devfiles

Comments

@yangcao77
Copy link
Contributor

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

Describe alternatives you've considered

Additional context

@openshift-ci openshift-ci bot added the area/library Common devfile library for interacting with devfiles label Aug 8, 2022
@yangcao77 yangcao77 self-assigned this Aug 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/library Common devfile library for interacting with devfiles
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant