Skaffold: 'skaffold dev' does not clean up secrets if content changes when using kustomize

Created on 8 Oct 2018  路  4Comments  路  Source: GoogleContainerTools/skaffold

Expected behavior

  • When running skaffold dev with kustomize, a secret's content changes causing a new secret to be created.
  • The old secret is deleted.

Actual behavior

  • Skaffold creates the new secret but old secrets are not cleaned up.
  • Skaffold does not clean up these secrets when 'skaffold dev' is stopped leaving cruft in the dev environment

Information

  • Skaffold version: v0.15.1
  • Operating system: linux
  • Contents of skaffold.yaml:
apiVersion: skaffold/v1alpha3
kind: Config
build:
  artifacts:
    ...
deploy:
  kustomize:
    kustomizePath: ./kubernetes

Steps to reproduce the behavior

  1. Create a kustomization file with a secretGenerator
  2. Start 'skaffold dev'; the secret is created
  3. Change the secret's generated content and cause a re-deploy; a new secret is created, but the old one is not deleted
aredev deplokustomize kinfeature-request prioritp3

All 4 comments

Hi @ianlewis
The same is happening with configmaps but the problem not depends of kustomize or skaffold:

@bugbuilder Yah, it basically happens with all objects that have a generated name

Is there any workaround?

it seems like this isn't a skaffold specific issue so i'll close this. if people believe there is work to be done in skaffold to fix this please let me know and i'll reopen!

Was this page helpful?
0 / 5 - 0 ratings