GoogleContainerTools / GoogleContainerTools/skaffold

Remote chart name and local folder name conflict

Open
#9,347 0 comments 1 reaction 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
When using a remoteChart value that has the same name as a local folder it should not error out.

### Actual behavior
When the remoteChart has the same name as a local folder it should deploy like normal.
For example with a local folder name `turbinia` and using the below skaffold settings:
```
repo: https://google.github.io/osdfir-infrastructure/
remoteChart: turbinia
```

### Information

- Skaffold version: v2.9.0
- Minikube version: v1.32.0
- Operating system: Debian bullseye x86_64
- Installed via: Default install with Google Cloud Extension in vscode (manages skaffold as dependency)
- Contents of skaffold.yaml:

```yaml
apiVersion: skaffold/v4beta6
kind: Config
metadata:
name: turbinia
build:
local:
useDockerCLI: true
useBuildkit: true
concurrency: 0
artifacts:
- image: turbinia-server
docker:
dockerfile: docker/server/Dockerfile
sync:
infer:
- turbinia/**
deploy:
statusCheckDeadlineSeconds: 30
helm:
releases:
- name: dev-release
repo: https://google.github.io/osdfir-infrastructure/
remoteChart: turbinia
setValues:
versioncheck.enabled: False
setValueTemplates:
server.image.repository: "{{.IMAGE_REPO_turbinia_server}}"
server.image.tag: "{{.IMAGE_TAG_turbinia_server}}@{{.IMAGE_DIGEST_turbinia_server}}"
```

### Steps to reproduce the behavior

1. `git clone https://github.com/google/turbinia.git`
2. copy above skaffold file in root of git repo in `skaffold.yaml`
3. from root of repo execute `skaffold dev`
4. Note: the git repo contains a folder named `turbinia` which is the same as the remoteChart

Relevant error output of `skaffold dev`:
```
Helm release dev-release not installed. Installing...
Error: INSTALLATION FAILED: Chart.yaml file is missing
Cleaning up...
Error: uninstall: Release not loaded: dev-release: release: not found
Cleaning up resources encountered an error, will continue to clean up other resources.
deploying "dev-release": install: exit status 1
```

5. Now let's rename the `turbinia` folder to `turbinia-old` with `mv turbinia turbinia-old`
6. run `skaffold dev` again

Now it runs fine.....I suspect skaffold tries to look into the local `turbinia` folder (name of remoteChart) for the helm charts instead of using the remote chart.

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.