feat : Initial support for converting devcontainer.json to devfile.yaml#184
feat : Initial support for converting devcontainer.json to devfile.yaml#184rohanKanojia wants to merge 1 commit into
devcontainer.json to devfile.yaml#184Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: rohanKanojia The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
2e69ba2 to
bb9bbf5
Compare
Signed-off-by: Rohan Kumar <rohaan@redhat.com>
bb9bbf5 to
499285e
Compare
|
PR needs rebase. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
This PR has been stale for a while, and the issue has been deprioritized for now. We’re still uncertain about the right approach here (nested containers vs. parsing), so I suggest closing this PR for the time being. Once there’s more clarity on the preferred direction, we can revisit and either reopen this or start fresh with a clearer plan. |
What does this PR do?
This PR provides initial implementation for converting
devcontainer.jsontodevfile.yaml. It adds a new file calleddev-containers-to-devfile-adapter.tsthat is responsible for converting adevcontainer.jsoninto adevfile.yamldevContainerJsonContentto methodgenerateDevfileContextdevContainerJsonContentis parsed into an object and dev-container-to-devfile-adapter is invoked to perform the conversion.DevContainers Specification
https://containers.dev/implementors/json_reference/
Devfile Specification
https://devfile.io/docs/2.3.0/devfile-schema
At the moment, these fields are being considered for conversion:
Name->metadata.nameforwardPorts->components[*].container.endpointscontainerEnv->components[*].container.envremoteEnv->components[*].container.envoverrideCommand-> a command is added to the containerwhile true; do sleep 1000; doneMounts->components[*].volumeImage->components[*].container.imageBuild.dockerfile->components[*].image.dockerfile.uriBuild.context->components[*].image.dockerfile.buildContextBuild.args->components[*].image.dockerfile.argsworkspaceFolder->components[*].container.sourceMappinginitializeCommand->events.preStartonCreateCommand->events.postStartupdateContentCommand->events.postStartpostCreateCommand->events.postStartpostStartCommand->events.postStartpostAttachCommand->events.postStarthostRequirements.cpus->components[*].container.cpuRequesthostRequirements.memory->components[*].container.memoryRequestI couldn't find mapping for these fields:
portsAttributesotherPortsAttributesremoteUsercontainerUserupdateRemoteUserUIDuserEnvProbeshutdownActionInitPrivilegedcapAddsecurityOptFeaturesoverrideFeatureInstallOrderCustomizationsBuild.optionsBuild.targetbuild.cacheFromappPort(legacy equivalent toforwardPorts)workspaceMountrunArgsdockerComposeFileServicerunServiceswaitForhostRequirements.storagehostRequirements.gpuWhat issues does this PR fix or reference?
Related to https://issues.redhat.com/browse/CRW-7180
Is it tested? How?