Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when calling skaffold delete on projects with dependent modules #7203

Closed
darkolakovic opened this issue Mar 18, 2022 · 3 comments
Closed
Labels
area/deploy bugbash/q4-2022 Issues related to Skaffold Bugbash Q4 2022 kind/bug Something isn't working kind/starter-project priority/p2 May take a couple of releases

Comments

@darkolakovic
Copy link

Expected behavior

Cleaning up modules should start from the dependent modules followed by the modules previous modules depend on.

Actual behavior

Cleaning up modules starts from the modules other modules depend on. Therefore cleaning up dependent modules throws errors since the modules other depend on are already deleted.

Information

  • Skaffold version: v1.36.1
  • Operating system: MacOS Montrey 12.1
  • Installed via: Homebrew
  • Contents of skaffold.yaml:
apiVersion: skaffold/v2beta22
kind: Config
requires:
  - configs:
      - "cert-manager"
deploy:
  helm:
    releases:
      - name: custom-cert
        chartPath: ./CustomCert
        namespace: custom-cert
        createNamespace: true
        recreatePods: false
        skipBuildDependencies: false
        useHelmSecrets: false
        wait: false
    
---

apiVersion: skaffold/v2beta22
kind: Config
metadata:
  name: cert-manager
deploy:
  helm:
    releases:
      - name: cert-manager
        remoteChart: cert-manager
        version: v1.7.1
        repo: https://charts.jetstack.io
        overrides:
          installCRDs: true
        namespace: cert-manager
        createNamespace: true
        recreatePods: false
        skipBuildDependencies: false
        useHelmSecrets: false
        wait: false

Steps to reproduce the behavior

  1. Download project from: ModuleDelete.zip
  2. skaffold dev
  3. After deployment is stabilised press Control+C to exit so cleanup process can start
  4. You will see that first depending module is uninstalled, after which there is an error thrown during the uninstallation of module using it:
    Cleaning up... release "cert-manager" uninstalled Error: uninstallation completed with 1 error(s): unable to build kubernetes objects for delete: unable to recognize "": no matches for kind "ClusterIssuer" in version "cert-manager.io/v1" WARN[0066] deployer cleanup:exit status 1 subtask=-1 task=DevLoop

Log:
skaffold_module_vdebug.log

@darkolakovic darkolakovic changed the title Error when calling skaffold deletes on projects with dependent modules Error when calling skaffold delete on projects with dependent modules Mar 21, 2022
@aaron-prindle aaron-prindle added area/deploy kind/bug Something isn't working priority/p2 May take a couple of releases labels Mar 21, 2022
@tejal29
Copy link
Contributor

tejal29 commented Mar 22, 2022

Thanks for this issue. Seems like a reasonable approach.

@ericzzzzzzz
Copy link
Contributor

seems like this has already been fixed.. I'll link the fix pr later.

@aaron-prindle aaron-prindle added the bugbash/q4-2022 Issues related to Skaffold Bugbash Q4 2022 label Dec 7, 2022
@ericzzzzzzz
Copy link
Contributor

the same as #7284 which should be fixed by #7925 in skaffold v2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/deploy bugbash/q4-2022 Issues related to Skaffold Bugbash Q4 2022 kind/bug Something isn't working kind/starter-project priority/p2 May take a couple of releases
Projects
None yet
Development

No branches or pull requests

4 participants