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

ChartRepo改为使用OCI后,无法正确部署Chart #130

Open
cpujava opened this issue Feb 27, 2024 · 3 comments
Open

ChartRepo改为使用OCI后,无法正确部署Chart #130

cpujava opened this issue Feb 27, 2024 · 3 comments

Comments

@cpujava
Copy link

cpujava commented Feb 27, 2024

以用之前Repo方式时,可以正常部署,因为安全问题升级Repo为OCI,代码也按照文档进行了相应的修改,用之前Chart包进行测试,发现无法正确部署,使用kubectl get hr -n test查看显示Failed,使用kubectl describe hr test-server -n test查看显示如下信息:
Name: test-server
Namespace: test
Labels:
Annotations:
API Version: app.alauda.io/v1
Kind: HelmRequest
Metadata:
Creation Timestamp: 2024-02-26T07:11:33Z
Finalizers:
captain.cpaas.io
Generation: 1
Managed Fields:
API Version: app.alauda.io/v1
Fields Type: FieldsV1
fieldsV1:
f:metadata:
f:annotations:
.:
f:kubectl.kubernetes.io/last-applied-configuration:
f:spec:
.:
f:namespace:
f:releaseName:
f:source:
.:
f:oci:
.:
f:repo:
f:secretRef:
f:version:
Manager: kubectl-client-side-apply
Operation: Update
Time: 2024-02-26T07:11:33Z
API Version: app.alauda.io/v1
Fields Type: FieldsV1
fieldsV1:
f:metadata:
f:finalizers:
.:
v:"captain.cpaas.io":
f:status:
.:
f:phase:
f:reason:
Manager: manager
Operation: Update
Time: 2024-02-27T01:54:38Z
Resource Version: 120895991
Self Link: /apis/app.alauda.io/v1/namespaces/abc-dev/helmrequests/test-server
UID: 61579eaf-3457-4fb3-9a88-9cc4c5b56821
Spec:
Namespace: test
Release Name: test-server
Source:
Oci:
Repo: devtest.chartrepo.com/chart-lh/test-server
Secret Ref: secretocirepo
Version: 0.1.8
Status:
Phase: Failed
Reason: manifest does not contain a layer with mediatype application/tar+gzip
Events:
Type Reason Age From Message


Warning FailedSync 59s (x85 over 18h) captain manifest does not contain a layer with mediatype application/tar+gzip

@zhhray
Copy link
Collaborator

zhhray commented Feb 27, 2024

  1. 首先确保该chart是通过helm package命令打包生成的tgz包
  2. 其次需要确保你的Helmrequest中所描述的chart路径确定是一个OCI 格式的chart devtest.chartrepo.com/chart-lh/test-server:0.1.8, 可以尝试最新版本的helm工具进行验证,helm pull oci://xxx 命令,看是否能下载到这个oci chart

@cpujava
Copy link
Author

cpujava commented Feb 27, 2024

1、是用helm package命令打包生成的tgz包
2、是直接用registry login之后,使用helm push推上去的,在浏览器里访问harbor是能看到推上去的镜像的,然后再用helm pull下载和Helm install 安装都是能成功的。
3、区别就是用Helm命令时是带oci://的,在Java代码里是没有这个的,因为Java代码里加上它会报ref may only contain a single colon character (:) unless specifying a port number错误,而且我看咱们文档里确实也是没加这个的。
4、Helm pull下来的后Chart包和Push上去的原始是一样的,包里没有什么层或者manifest 信息,不知道是否正确?
5、现在没啥方向了,咱们的captain已经是安装的最新的了,harbor仓库应该不会有问题吧?K8S版本?Helm版本?
harbor仓库版本是v2.10.0。K8S版本v1.18.20和v1.20.14、Helm版本v3.4.1和v3.8.1都试过,都是一样的不行
方便的话,能否加一个即时通信270309573的QQ或微信沟通一下?

@zhhray
Copy link
Collaborator

zhhray commented Feb 27, 2024

1、是用helm package命令打包生成的tgz包 2、是直接用registry login之后,使用helm push推上去的,在浏览器里访问harbor是能看到推上去的镜像的,然后再用helm pull下载和Helm install 安装都是能成功的。 3、区别就是用Helm命令时是带oci://的,在Java代码里是没有这个的,因为Java代码里加上它会报ref may only contain a single colon character (:) unless specifying a port number错误,而且我看咱们文档里确实也是没加这个的。 4、Helm pull下来的后Chart包和Push上去的原始是一样的,包里没有什么层或者manifest 信息,不知道是否正确? 5、现在没啥方向了,咱们的captain已经是安装的最新的了,harbor仓库应该不会有问题吧?K8S版本?Helm版本? harbor仓库版本是v2.10.0。K8S版本v1.18.20和v1.20.14、Helm版本v3.4.1和v3.8.1都试过,都是一样的不行 方便的话,能否加一个即时通信270309573的QQ或微信沟通一下?

嗯,应该是helm版本的问题,我加你了,通过下吧。

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