GoogleContainerTools / GoogleContainerTools/skaffold

deploy fails with no error details when using kustomize with invalid manifests/arguments

Open
#8,884 2 comments 2 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
15.9k
Forks
1.7k
Avg merge
3d 9h
Merged PRs (30d)
10

Description

### Expected behavior
skaffold should surface errors encountered running `kubectl` to the user
### Actual behavior
skaffold just prints `exit status 1` and exits when it is unsuccessful running `kubectl kustomize ...`

### Information

- Skaffold version: 2.4.1
- Operating system: WSL ubuntu
- Installed via: APT
- Contents of skaffold.yaml:

```yaml
apiVersion: skaffold/v4beta4
kind: Config
manifests:
kustomize:
paths:
- abc
deploy:
kubectl: {}
```

### Steps to reproduce the behavior

Run `skaffold deploy` with the above file in an otherwise empty directory. skaffold just prints `exit status 1` and exits with no other error details.

Running with `-v trace` shows that it tried to run `kubectl --context ... kustomize abc`, running that gives the real error message which should have been returned by skaffold:
```
error: must build at directory: not a valid directory: evalsymlink failure on '/home/mike/skaffold_repro/abc' : lstat /home/mike/skaffold_repro/abc: no such file or directory
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.