GoogleContainerTools / GoogleContainerTools/skaffold

Skaffold does not delete unused manifests if they have been removed from skaffold.yaml when deploy

Open
#9,120 0 comments 3 reactions 0 assignees View on GitHub
area/delete kind/feature-request triage/discuss
Dominant language
Go
Stars
15.9k
Forks
1.7k
Avg merge
3d 9h
Merged PRs (30d)
10

Description

### Expected behavior

Skaffold should know which manifests/helm charts have been deleted from `skaffold.yaml` when deploy

### Actual behavior

If a manifest/helm chart is removed from skaffold.yaml file, after running `skaffold deploy` the deleted manifests will not be deleted from the cluster

### Information

- Skaffold version: v2.8.0
- Installed via: Homebrew

### Steps to reproduce the behavior

Suppose I have this config:

```yaml
apiVersion: skaffold/v4beta7
kind: Config
deploy:
helm:
releases:
- name: postgres
repo: https://charts.bitnami.com/bitnami
remoteChart: postgresql
- name: mongo
repo: https://charts.bitnami.com/bitnami
remoteChart: mongodb
```

After run `skaffold deploy`, the 2 charts will successfully be installed on the cluster.

Now, suppose that I don't want the mongo chart anymore on my cluster, so I would delete it from my config:

```yaml
apiVersion: skaffold/v4beta7
kind: Config
deploy:
helm:
releases:
- name: postgres
repo: https://charts.bitnami.com/bitnami
remoteChart: postgresql
# - name: mongo
# repo: https://charts.bitnami.com/bitnami
# remoteChart: mongodb
```

If I run `skaffold deploy`, obviosly skaffold will not delete the mongo chart.

Is there a way to keep track the deployed skaffold manifests in order to choose if you want to delete them or not based on the `skaffold.yaml` file?

It will be very useful to have this feature in order to use a GitOps approach without using other tools.

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.