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

[ bug ] 我在K8s Helm Chart项目中从代码仓库同步服务的时候遇到问题 #3961

Open
krisxia0506 opened this issue Jan 14, 2025 · 5 comments

Comments

@krisxia0506
Copy link

krisxia0506 commented Jan 14, 2025

下面是aslan里的报错日志

2025-01-14T21:14:02.932+0800    INFO    service/service/helm.go:1059    Found valid chart, Starting to save and upload files    {"requestID": "298760 
│ 06-b6c8-48e5-b927-e2a76c6881b7"}
│ 2025-01-14T21:14:03.110+0800    ERROR    service/fs/s3.go:96    Failed to copy object from helmmiddleware/service/airflow/airflow.tar.gz to helmmiddl 
│ eware/service/airflow/airflow-1.tar.gz
│ 2025-01-14T21:14:03.110+0800    ERROR    service/fs/file.go:83    Failed to upload files to s3, err: NoSuchKey: The specified key does not exist.      
│     status code: 404, request id: 5M71, host id: Z9hWb/F6iefc=
│ 2025-01-14T21:14:03.111+0800    ERROR    service/service/helm.go:1077    Failed to save or upload files for service airflow in project helmmiddleware  
│ , error: NoSuchKey: The specified key does not exist.
│     status code: 404, request id: 5M733PDP0XQ0GBD1, host id: Z96iefc=    {"reques  
│ tID": "29876006-b6c8-48e5-b927-e2a76c6881b7"}

根据源码里的这个位置

if err = client.Upload(s3Storage.Bucket, localPath, s3Path); err != nil {

s3Path打印出来是helmmiddleware/service/airflow/airflow.tar.gz
我在我的s3里找到了,但他的路径是这样的s3://zadig-xxxx/zadig-s3/helmmiddleware/service/airflow/airflow.tar.gz
这导致CopyObject报错

err = client.CopyObject(s3Storage.Bucket, s3Path, targetPath)

微信(测试版) 2025-01-14 21 39 46
我的zadig对象存储配置是这样的
CleanShot 2025-01-14 at 21 42 44@2x

@PetrusZ
Copy link
Contributor

PetrusZ commented Jan 16, 2025

你是什么版本?endpoint用path-style试试

@krisxia0506
Copy link
Author

你是什么版本?endpoint用path-style试试

Install Methods
Helm

Versions Used
zadig: 3.2.0
kubernetes: 1.30

Environment

Cloud Provider:
AWS EKS
Resources:
4 Cores / 8 GB RAM
OS:

Services Status

kubectl version
kubectl get po -n zadig
Client Version: v1.29.2
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.30.7-eks-56e63d8
NAME READY STATUS RESTARTS AGE
aslan-68679fb7b4-h5gp7 1/1 Running 0 6d
cron-684789745c-mzlvw 1/1 Running 0 6d6h
dind-0 1/1 Running 0 18d
discovery-b7c54849-qrlg2 1/1 Running 1 (18d ago) 18d
gateway-d67cbd584-mnrsz 1/1 Running 1 (18d ago) 18d
gateway-proxy-679bbfdd4b-7d2jx 1/1 Running 0 18d
gloo-6bc8898b45-hm572 1/1 Running 2 (18d ago) 18d
hub-server-6898d9767b-fwj6m 1/1 Running 0 6d6h
kr-minio-5cc697f4c-nwd62 1/1 Running 0 18d
kr-redis-6bd58ffc5b-4bv54 1/1 Running 0 18d
plutus-vendor-78fd88577-hvcnc 1/1 Running 1 (18d ago) 18d
time-nlp-7bfbd8bc7b-dx2bd 1/1 Running 0 18d
user-5f5db6896d-pc8x2 1/1 Running 0 18d
vendor-portal-6c6cdf69b5-bf72b 1/1 Running 0 18d
zadig-portal-84bbc89cc5-2rsnw 1/1 Running 0 6d6h
zadig-zadig-dex-5b6d988c8d-f5fmz 1/1 Running 0 6d

@krisxia0506
Copy link
Author

@PetrusZ path-style是什么样的,有例子么

@PetrusZ
Copy link
Contributor

PetrusZ commented Jan 16, 2025

搜一下Amazon S3 path-style吧

@krisxia0506
Copy link
Author

CleanShot 2025-01-16 at 14 40 51@2x
加了一个path,还是相同的问题NoSuchKey

 2025-01-16T14:35:02.440+0800    ERROR    service/fs/s3.go:96    Failed to copy object from middleware-by-helm/service/airflow/airflow.tar.gz to middl
│ eware-by-helm/service/airflow/airflow-19.tar.gz
│ 2025-01-16T14:35:02.440+0800    ERROR    service/fs/file.go:83    Failed to upload files to s3, err: NoSuchKey: The specified key does not exist.
│     status code: 404, request id: RKG7WRV91KQBHXEN, host id: F5EODn5xyOl8ULXuh2zZZ/Vp1xb1KacEehhvP17p83ojIzdkSN1oHitGMgLiXR1KoYBv4bfvqZQ=
│ 2025-01-16T14:35:02.440+0800    ERROR    service/service/helm.go:1077    Failed to save or upload files for service airflow in project middleware-by-
│ helm, error: NoSuchKey: The specified key does not exist.
│     status code: 404, request id: RKG7WRV91KQBHXEN, host id: F5EODn5xyOl8ULXuh2zZZ/Vp1xb1KacEehhvP17p83ojIzdkSN1oHitGMgLiXR1KoYBv4bfvqZQ=    {"reques
│ tID": "fa57de9b-1048-4356-8b63-8ad3996f1916"}

代码里的s3Path变量是middleware-by-helm/service/airflow/airflow.tar.gz
但s3里的路径是/zadig-s3/zadig-s3/middleware-by-helm/service/airflow/airflow.tar.gz

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

No branches or pull requests

2 participants