Description
Normally, when OCM users refer to the file system in component-constructor.yaml, they use paths, which are relative to constructor file:
Example 1:
resources:
- name: test-resource
type: blob
input:
type: file
path: ./file.txt
Example 2:
resources:
- name: blueprint
type: landscaper.gardener.cloud/blueprint
input:
type: dir
path: ../landscaper-blueprint
compress: true
mediaType: application/vnd.gardener.landscaper.blueprint.v1+tar+gzip
At the moment, when the current implementation of the file and dir input methods are called, they are given the input specification as is. But the information about the location of the constructor file is missing, i.e. the referenced files and folders cannot be accessed.
The goal of the task is to correct the problem described above.
Implementation Details
- Input methods should retrieve the base path from the context (file system config). See also this comment.
- By default path escapes above the base path should be prohibited. We might introduce a new flag to let the users explicitly allow path escapes. See also this comment.
- The new file system config option should be made available to both internal and external plug-ins. See also this comment.
Done Criteria
Description
Normally, when OCM users refer to the file system in
component-constructor.yaml, they use paths, which are relative to constructor file:Example 1:
Example 2:
At the moment, when the current implementation of the
fileanddirinput methods are called, they are given the input specification as is. But the information about the location of the constructor file is missing, i.e. the referenced files and folders cannot be accessed.The goal of the task is to correct the problem described above.
Implementation Details
Done Criteria