-
Notifications
You must be signed in to change notification settings - Fork 96
Description
Description
When using k0sctl apply -c <path/to/config.yaml>, paths specified in the spec.hosts[*].files section of the configuration file are incorrectly interpreted as relative to the current working directory (CWD) from which the command is executed, rather than being relative to the location of the configuration file itself (config.yaml).
Expected Behavior
The file paths defined within spec.hosts[*].files in the configuration file should be interpreted as relative to the location of the config.yaml file.
For example, if the command is executed as:
k0sctl apply -c foo/bar/config.yaml
And the config.yaml content is:
spec:
hosts:
- role: controller
files:
- name: my-script.sh
# This should look for the file at 'foo/bar/my-script.sh'
src: my-script.sh
dst: /tmp/my-script.shThe application should look for the source file at foo/bar/my-script.sh.
Actual Behavior
The application looks for the source file at <CWD>/my-script.sh, leading to an error if the file is not present in the current execution directory.