Report error/warning when adding helm chart resource of type "dir" set to the bottommost directory.
reshnm opened this issue · 4 comments
What would you like to be added:
For a local helm chart resource of type dir,
the option preserveDir
is set to false
by default.
For this to work, the helm chart directory has to be placed in an otherwise parent directory.
If the option preserveDir
is not set to true
explicitly, this parent directory has to be entered as the value of parameter path
.
If this is not applied correctly, the landscaper cli will accept the local resource but the deployment in the landscaper will fail with a rather cryptic error message.
Example:
├── chart
│ └── ingress-nginx
This will fail
type: helm
name: ingress-nginx-chart
version: v0.1.0
relation: external
input:
type: "dir"
path: ./chart/ingress-nginx
This will succeed
type: helm
name: ingress-nginx-chart
version: v0.1.0
relation: external
input:
type: "dir"
path: ./chart/ingress-nginx
preserveDir: true
For the user it would be helpful if the landscaper cli issues a warning or even an error when trying to add a helm chart resource with the bottommost directory without setting option preserveDir
to true
.
Why is this needed:
Catching this error on the cli level will result in a more readable/understandable error message.
It also helps the user to immediately take action upon this error instead inspecting the landscaper error logs.
Hi @reshnm ,
the check that you propose would have to inspect the directory specified in the path
field. Something like: if it contains a Chart.yaml
file, then preserveDir
should be true
. Is that right?
Hi @reshnm ,
the check that you propose would have to inspect the directory specified in thepath
field. Something like: if it contains aChart.yaml
file, thenpreserveDir
should betrue
. Is that right?
Exactly, yes.
Move to new backlog, and do as robert suggested.
Closed, as moved to new backlog.