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

skaffold build: skaffold doesn't delete kaniko pod if build is interrupted with ctrl-c on Kaniko's filesystem snapshot stage #8800

Closed
CarpathianUA opened this issue May 18, 2023 · 0 comments · Fixed by #9270
Labels
build/kaniko kind/bug Something isn't working priority/p2 May take a couple of releases

Comments

@CarpathianUA
Copy link

CarpathianUA commented May 18, 2023

For in-cluster builds with kaniko, skaffold build doesn't delete kaniko-<> pod if build is interrupted with ctrl-c on filesystem snapshot stage:

skaffold build -vdebug

...
INFO[2023-05-18T16:35:55Z] Taking snapshot of full filesystem...        
^CERRO[0032] deleting pod: client rate limiter Wait returned an error: context canceled  subtask=<REDACTED>.dkr.ecr.us-east-1.amazonaws.com/<REDACTED>task=Build
Build [<REDACTED>.dkr.ecr.us-east-1.amazonaws.com/<REDACTED>] was canceled
kubectl get po 

kaniko-d7bxc                                1/1     Running   0          17s

Expected behavior

skaffold trigger a deletion of kaniko pod if build is interrupted with ctrl-c on Kaniko's filesystem snapshot stage

Actual behavior

skaffold doesn't delete kaniko pod if build is interrupted with ctrl-c on Kaniko's filesystem snapshot stage

Information

  • Skaffold version: v2.4.1
  • Operating system: MacOS Ventura 13.3.1 (a) , 22.4.0 Darwin Kernel arm64
  • Installed via: Homebrew
  • k8s: v1.25.6-eks-48e63af
  • Contents of skaffold.yaml:
apiVersion: skaffold/v4beta5
kind: Config
build:
  tagPolicy:
    envTemplate:
      template: "{{.CUSTOM_IMAGE_TAG}}"
  artifacts:
    # build.artifacts.*.image is not templateable.
    # see https://github.com/GoogleContainerTools/skaffold/issues/7455
    # it will be overriden by profile name, see profiles section below. 
    # {{.SKAFFOLD_PROFILE}} is just a placeholder here, at least for now, untill Skaffold allows to template image field.
    - image: "<REDACTED>.dkr.ecr.us-east-1.amazonaws.com/{{.SKAFFOLD_PROFILE}}"
      kaniko:
        dockerfile: Dockerfile
        snapshotMode: redo
        pushRetry: "2"
        cleanup: true
        logTimestamp: true
        useNewRun: true
        whitelistVarRun: true
        # see skaffold.env
        label:
          builder: kaniko
          app.version: "{{.CUSTOM_IMAGE_TAG}}"
          description: "{{.DESCRIPTION}}"
          git.branch: "{{.GIT_BRANCH}}"
          git.commit: "{{.GIT_COMMIT}}"
          git.contributor: "{{.GIT_CONTRIBUTOR}}"
        env:
          - name: AWS_SDK_LOAD_CONFIG
            value: true
          - name: AWS_EC2_METADATA_DISABLED
            value: true
...            
            

Steps to reproduce the behavior

  1. skaffold build
  2. ctrl-c after kaniko pod was created, on Kaniko's filesystem snapshot stage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build/kaniko kind/bug Something isn't working priority/p2 May take a couple of releases
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants