Skip to content

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

Closed
@darkolakovic

Description

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

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions