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

Azure Blob Storage Context invalid path #3044

Open
herveleclerc opened this issue Mar 6, 2024 · 7 comments · May be fixed by #3387
Open

Azure Blob Storage Context invalid path #3044

herveleclerc opened this issue Mar 6, 2024 · 7 comments · May be fixed by #3387

Comments

@herveleclerc
Copy link

It seems that the path to get the context is wrong when using azure blob storage container

ex :

apiVersion: v1
kind: Pod
metadata:
  name: kaniko
spec:
  containers:
  - name: kaniko
    image: gcr.io/kaniko-project/executor:latest
    args: ["--dockerfile=./Dockerfile",
            "--context=https://kanikoi0skbb6wot.blob.core.windows.net/kaniko/context.tar.gz",
            "--destination=herveleclerc/kaniko-hello:0.0.1", "--verbosity=trace"]
    volumeMounts:
    - name: kaniko-secret
      mountPath: /kaniko/.docker
    env:
    - name: AZURE_STORAGE_ACCESS_KEY
      valueFrom:
        secretKeyRef:
          name: azure-storage-access-key
          key: azure-storage-access-key
  volumes:
  - name: azure-storage-access-key
    secret:
      secretName: azure-storage-access-key
  - name: kaniko-secret
    secret:
      secretName: dockerhub
      items:
      - key: .dockerconfigjson
        path: config.json

generate this error log

k logs kaniko
DEBU[0000] Getting source context from https://kanikoi0skbb6wot.blob.core.windows.net/kaniko/context.tar.gz
DEBU[0000] BaseDir /kaniko/buildcontext for file /kaniko/buildcontext/context.tar.gz does not exist. Creating.
Error: error resolving source context: HEAD https://kanikoi0skbb6wot.blob.core.windows.net/kaniko/context.tar.gz/kaniko/context.tar.gz
--------------------------------------------------------------------------------
RESPONSE 404: 404 The specified blob does not exist.
ERROR CODE: BlobNotFound
--------------------------------------------------------------------------------
Response contained no body
--------------------------------------------------------------------------------

the path name is in double

@herveleclerc
Copy link
Author

Just tested with gcr.io/kaniko-project/executor:v1.19.2 - it works with this tag

@dauqu
Copy link

dauqu commented Mar 9, 2024

I also faced the same issue when I used Azure Blob storage before.

@JeromeJu
Copy link
Collaborator

Thanks @herveleclerc for the issue, would you mind providing the kaniko version you ran into the original issue filed?

@herveleclerc
Copy link
Author

1.20.0 and 1.21.0 - I will re-test with 1.21.1

@JeromeJu
Copy link
Collaborator

JeromeJu commented Mar 15, 2024

1.20.0 and 1.21.0 - I will re-test with 1.21.1

Thanks for the replies - this indicates that we are having a regression; added to our regression backlogs.

@herveleclerc
Copy link
Author

tested on 1.21.1 - I have the same error
❯ k logs kaniko
Error: error resolving source context: HEAD https://xxxxxxx.blob.core.windows.net/kaniko-container/context.tar.gz/kaniko-container/context.tar.gz

RESPONSE 404: 404 The specified blob does not exist.
ERROR CODE: BlobNotFound

Response contained no body

@arxsab
Copy link

arxsab commented Jan 6, 2025

Facing the same problem
The error is still present on tag/v1.23.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants