gpt4 book ai didi

kubernetes-helm - 错误 : UPGRADE FAILED: failed to create resource: ConfigMap in version "v1" cannot be handled as a ConfigMap

转载 作者:行者123 更新时间:2023-12-04 14:15:46 25 4
gpt4 key购买 nike

this spec在 github 和这些 helm instructions我正在尝试使用以下语法升级 Datadog 的 Helm 安装:

helm upgrade datadog-monitoring --set datadog.confd."kube_scheduler\.yaml".instances[0].prometheus_url="http://localhost:10251/metrics",datadog.confd."kube_scheduler\.yaml".init_config= stable/datadog

但是,无论尝试更改 prometheus_url 的语法,我都会收到以下错误。值(将 url 放在引号中,转义引号等):

Error: UPGRADE FAILED: failed to create resource: ConfigMap in version "v1" cannot be handled as a ConfigMap: v1.ConfigMap.Data: ReadString: expects " or n, but found {, error found in #10 byte of ...|er.yaml":{"instances|..., bigger context ...|{"apiVersion":"v1","data":{"kube_scheduler.yaml":{"instances":[{"prometheus_url":"\"http://localhost|...



如果我添加 --dry-run --debug我得到以下 yaml 输出:
REVISION: 7
RELEASED: Mon Mar 2 14:28:52 2020
CHART: datadog-1.39.7
USER-SUPPLIED VALUES:
datadog:
confd:
kube_scheduler.yaml:
init_config: ""
instances:
- prometheus_url: http://localhost:10251/metrics

Yaml 输出似乎与此 github page 上指定的集成相匹配。 .

最佳答案

嘿!
如果我的回答不正确,请提前抱歉,因为 我是一个全新的人 在 kuber 和 helm 中,我无法确保它会有所帮助,但也许会有所帮助。
所以,据我所知,问题在于结果 配置映射 配置。根据我的经验,我在以下配置中遇到了同样的问题:

apiVersion: v1
kind: ConfigMap
metadata:
name: my-config
labels:
group: mock
data:
APP_NAME: my-mock
APP_PORT: 8080
APP_PATH: /api
我只能通过用引号括住所有值来解决它:
apiVersion: v1
kind: ConfigMap
metadata:
name: my-config
labels:
group: mock
data:
APP_NAME: "my-mock"
APP_PORT: "8080"
APP_PATH: "/api"

关于kubernetes-helm - 错误 : UPGRADE FAILED: failed to create resource: ConfigMap in version "v1" cannot be handled as a ConfigMap,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60491872/

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