GoogleContainerTools / GoogleContainerTools/skaffold
Should build command depend on Helm?
- Dominant language
- Go
- Stars
- 15.9k
- Forks
- 1.7k
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 10
Description
### Expected behavior
Running `skaffold build` when doing a local Docker build does not require the pressence of the Helm command.
### Actual behavior
When the Helm command is not present, a `skaffold build` fails with the following output...
```
creating runner: creating deployer: Helm not found. Please install helm via https://helm.sh/docs/intro/install.
```
### Information
- Skaffold version: v2.9.0
- Operating system: macOS, linux
- Installed via: skaffold.dev | Homebrew
- Contents of skaffold.yaml:
```yaml
apiVersion: skaffold/v4beta8
kind: Config
metadata:
name: xxx
build:
artifacts:
- image: xxx
docker:
dockerfile: ./src/main/docker/Dockerfile
tagPolicy:
customTemplate:
template: '{{.COMMIT_SHA}}-{{.TREE_SHA}}'
components:
- name: COMMIT_SHA
gitCommit:
variant: AbbrevCommitSha
ignoreChanges: true
- name: TREE_SHA
gitCommit:
variant: AbbrevTreeSha
deploy:
helm:
flags:
install:
- --timeout
- 10m
releases:
- name: xxx
chartPath: src/main/helm
createNamespace: true
useHelmSecrets: true
setValueTemplates:
image:
repository: "{{.IMAGE_REPO_xxx}}"
tag: "{{.IMAGE_TAG_xxx}}@{{.IMAGE_DIGEST_xxx}}"
valuesFiles:
- src/main/helm/values.yaml
profiles:
- name: linode
patches:
- op: add
path: /deploy/helm/releases/0/valuesFiles
value:
- ./src/main/helm/values.d/XXX.yaml
- ./src/main/helm/values.d/XXX-enc.yaml
```
### Logs
Here's a snippet from where I think the call to Helm happens. If you need more detail I can do so but will take longer in order to redact the logs.
```
] subtask=-1 task=DevLoop
DEBU[0000] setting Docker user agent to skaffold-v2.9.0 subtask=-1 task=DevLoop
INFO[0000] DOCKER_HOST env is not set, using the host from docker context. subtask=-1 task=DevLoop
DEBU[0000] Running command: [docker context inspect --format {{.Endpoints.docker.Host}}] subtask=-1 task=DevLoop
DEBU[0000] Command output: [unix:///Users/alewis/.docker/run/docker.sock
] subtask=-1 task=DevLoop
INFO[0000] no kpt renderer or deployer found, skipping hydrated-dir creation subtask=-1 task=DevLoop
DEBU[0000] Running command: [kubectl config view --minify -o jsonpath='{..namespace}'] subtask=-1 task=DevLoop
DEBU[0000] Command output: ['default'] subtask=-1 task=DevLoop
DEBU[0000] Running command: [helm version --client] subtask=-1 task=DevLoop
DEBU[0000] Running command: [tput colors] subtask=-1 task=DevLoop
DEBU[0000] Command output: [256
] subtask=-1 task=DevLoop
creating runner: creating deployer: Helm not found. Please install helm via https://helm.sh/docs/intro/install.
DEBU[0000] exporting metrics subtask=-1 task=DevLoop
DEBU[0000] failed to create firelog exporter due to error: open assets/firelog_generated/key.txt: file does not exist subtask=-1 task=DevLoop
DEBU[0000] did not create any log exporter subtask=-1 task=DevLoop
```
Contributor guide
Research direction
Start by reproducing `skaffold build` with the provided `skaffold.yaml` after making Helm unavailable, then trace the build and deployer initialization reached by that command. Done means a local Docker build succeeds without Helm installed, while configurations that actually deploy with Helm still require it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, go, kubernetes
- Domain
- build-system, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100