gpt4 book ai didi

kubernetes - 如何在 gitlab 中维护 helm 仓库

转载 作者:行者123 更新时间:2023-12-04 07:27:00 29 4
gpt4 key购买 nike

我有一个 Helm chart ,我想将它添加到我的 gitlab 存储库中。但是当我运行时:

helm repo add repo_name url 
我收到以下错误:
Error: looks like "https://gitlab.<domain>.com/group/infra/repo/helm/charts/" is not a valid chart repository or cannot be reached: error converting YAML to JSON: yaml: line 3: mapping values are not allowed in this context
Linter 显示它是一个有效的图表。
这是 index.yaml :
apiVersion: v1
entries:
helloworld:
- apiVersion: v2
appVersion: 1.0.0
created: "2021-06-28T14:05:53.974207+01:00"
description: This Helm chart will be used to create hello world
digest: f290432f0280fe3f66b126c28a0bb21263d64fd8f73a16808ac2070b874619e7
name: helloworld
type: application
urls:
- https://gitlab.<domain>.com/group/infra/repo/helm/charts/helloworld-0.1.0.tgz
version: 0.1.0
generated: "2021-06-28T14:05:53.973549+01:00"
不确定这里缺少什么。

最佳答案

看起来您想使用托管在 gitlab 上的 Helm chart 。不幸的是,它不会如您所愿。如 Lei Yang评论中提到的很好:

helm repo and git repo are different things.


在 Helm 的官方文档中可以找到 The Chart Repository Guide .
您还可以找到指南 how to create a chart repository :

A chart repository is an HTTP server that houses an index.yaml file and optionally some packaged charts. When you're ready to share your charts, the preferred way to do so is by uploading them to a chart repository.


在这里你可以找到部分,如何正确 host chart repos .有几种方法可以做到这一点 - 例如,您可以使用 Google Cloud Storage (GCS) 存储桶、Amazon S3 存储桶、GitHub Pages,甚至创建自己的 Web 服务器。
您也可以使用 ChartMuseum服务器从本地文件系统托管图表存储库。

ChartMuseum is an open-source Helm Chart Repository server written in Go (Golang), with support for cloud storage backends, including Google Cloud Storage, Amazon S3, Microsoft Azure Blob Storage, Alibaba Cloud OSS Storage, Openstack Object Storage, Oracle Cloud Infrastructure Object Storage, Baidu Cloud BOS Storage, Tencent Cloud Object Storage, DigitalOcean Spaces, Minio, and etcd.


或者,也可以到 host helm charts in JFrog .

关于kubernetes - 如何在 gitlab 中维护 helm 仓库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68164937/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com