Error: UPGRADE FAILED: failed to create resource: ConfigMap in version "v1" cannot be handled as a ConfigMap

3/2/2020

Per this spec on github and these helm instructions I'm trying to upgrade our Helm installation of datadog using the following syntax:

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

However I'm getting the error below regardless of any attempt at altering the syntax of the prometheus_url value (putting the url in quotes, escaping the quotes, etc):

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|...

If I add the --dry-run --debug flags I get the following yaml output:

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

The Yaml output appears to mesh with the integration as specified on this github page.

-- NealR
datadog
kubernetes-helm

0 Answers