我已经创建了一个示例 helmfile.yaml,其内容如下。
releases:
- name: loki-multitenant
chart: ./loki
namespace: default
values:
- loki-distributed:
querier:
replicas: 3
loki:
auth_enabled: true
storageConfig:
boltdb_shipper:
shared_store: gcs
gcs:
bucket_name: loki-store-jr
schemaConfig:
configs:
- from: 2020-07-01
object_store: gcs
compactor:
shared_store: gcs
以及 loki-multitenant 图表文件夹 loki 的内容。loki\Chart.yaml
apiVersion: v2
name: loki
description: A Helm chart for Kubernetes
type: application
version: 0.0.1
appVersion: "v0.0.1"
dependencies:
- name: ingress-nginx
version: 4.1.4
repository: https://kubernetes.github.io/ingress-nginx
- name: loki-distributed
repository: https://grafana.github.io/helm-charts
version: ^0.48.4
模板中还有一些虚拟内容,主要部分用于子依赖图表。
当我运行:helmfile sync
Building dependency release=loki-multitenant, chart=loki
in ./helmfile.yaml: [building dependencies of local chart: command "/usr/local/bin/helm" exited with non-zero status:
PATH:
/usr/local/bin/helm
ARGS:
0: helm (4 bytes)
1: dependency (10 bytes)
2: build (5 bytes)
3: loki (4 bytes)
ERROR:
exit status 1
EXIT STATUS
1
STDERR:
Error: no repository definition for https://kubernetes.github.io/ingress-nginx, https://grafana.github.io/helm-charts. Please add the missing repos via 'helm repo add'
COMBINED OUTPUT:
Error: no repository definition for https://kubernetes.github.io/ingress-nginx, https://grafana.github.io/helm-charts. Please add the missing repos via 'helm repo add']
所以我尝试跑步
helm dependency update loki/
将 tar.gz 文件下载到 loki/charts 文件夹。
loki/charts$ ls
ingress-nginx-4.1.4.tgz loki-distributed-0.48.6.tgz
但 helmfile sync 仍然出现相同错误。请建议如何修复此问题。