question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

wrong type for value; expected string; got []interface {}

See original GitHub issue

Chart version: 7.9.3 Kubernetes version: 19.4 Kubernetes provider: E.g. GKE (Google Kubernetes Engine) Bare Metal Helm Version: 3.4

Describe the bug: So correct me if I’m wrong (I haven’t had to do this before, and I don’t believe it’s a bug, I’m just stupid) However, I pull down/Download helm chart 7.9.3. I make changes to the logstash values.yaml, then try to deploy, and I get the following error.

helm install logstash . Error: template: logstash/templates/statefulset.yaml:52:27: executing "logstash/templates/statefulset.yaml" at <include (print .Template.BasePath "/configmap-config.yaml") .>: error calling include: template: logstash/templates/configmap-config.yaml:15:7: executing "logstash/templates/configmap-config.yaml" at <$config>: wrong type for value; expected string; got []interface {}

Steps to reproduce:

  1. vim helm-charts-7.9.3/logstash/values.yaml
  2. Add the following:
logstashConfig:
  logstash.yml: |
  http.host: "0.0.0.0"
  xpack.monitoring.elasticsearch.hosts: [ "http://elasticsearch-master:9200" ]
# Allows you to add any pipeline files in /usr/share/logstash/pipeline/
### ***warn*** there is a hardcoded logstash.conf in the image, override it first
logstashPipeline:
  logstash.conf: |
    input {
      kafka {
        bootstrap_servers=> "kafka-cp-kafka:9092"
        topics => ["systems_logs"]
        tags => ["systems_logs"]
      }
    }
    input {
      kafka {
        bootstrap_servers => "kafka-cp-kafka:9092"
        topics => ["api_request_timings"]
        tags => ["api_request_timings"]
      }
    }
    filter {
      json {
        source => "message"
        remove_field => ["message"]
      }
    }
    output {
      if "systems_logs" in [tags] {
        elasticsearch {
          hosts => [http://elasticsearch-master:9200"]
          index => "systems_logs-%{+YYY.MM.dd}"
        }
      }
      else if "api_request_timings" in [tags] {
        elasticsearch {
          hosts => [http://elasticsearch-master:9200"]
          index => "api_request_timings-%{+YYYY.MM.dd}"
        }
      }
    }````

`volumeClaimTemplate:
    accessModes: [ "ReadWriteOnce" ]
    storageClassName: "rook-ceph-block"
    resources:
      requests:
        storage: 1Gi`

`service:                                                                                                                                                                                                                                                                                                                       annotations: {}                                                                                                                                                                                                                                                                                                              type: ClusterIP                                                                                                                                                                                                                                                                                                              ports:                                                                                                                                                                                                                                                                                                                         name: beats
    port: 5044                                                                                                                                                                                                                                                                                                                     protocol: TCP
    targetPort: 5044
    name: http
    port: 8080
    protocol: TCP
    targetPort: 8080`

`  persistence:
    enabled: true`
3. then run `helm install logstash ~/helm-charts-7.9.3/logstash`

**Expected behavior:**
No error, deploy logstash.

**Provide logs and/or server output (if relevant):**
This is all I ever get, even from Debug.
`Error: template: logstash/templates/statefulset.yaml:52:27: executing "logstash/templates/statefulset.yaml" at <include (print .Template.BasePath "/configmap-config.yaml") .>: error calling include: template: logstash/templates/configmap-config.yaml:15:7: executing "logstash/templates/configmap-config.yaml" at <$config>: wrong type for value; expected string; got []interface {}`

**Any additional context:**
Like I said, I am probably retarded, but I've looked at the values from both the statefulset.yaml and the configmap-config.yaml, and everything seems to be correct when trying to pass to the tpl $config, but I don't know.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
jeff-vanslykecommented, Nov 19, 2020

Well, like I said. I’m retarded because that worked. I appreciate you putting up with me on this.

0reactions
jmlrtcommented, Nov 24, 2020

I’m closing the issue as it seem fixed now, don’t hesitate to comment it if you have any question.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[stable/keycloak] Wrong type for value; expected string; got ...
I got this error when install keycloak chart ... wrong type for value; expected string; got []interface {}.
Read more >
Kubernetes: Putting JSON value in YAML file - Stack Overflow
I am trying to create a secret from a JSON value but I keep getting this error executing "secrets.
Read more >
[SOLVED] Need help fixing loop in template - Go Forum
In my values.yaml file I have this structure for my variables: ... at <6>: wrong type for value; expected string; got map[string]interface ......
Read more >
got map[string]interface {} while installing cloudwatch exporter
Hello all ,. I am trying to install cloudwatch exporter . It gets installed when i am using default values.yaml. ... coalesce.go:163: warning: ......
Read more >
Go Playground - The Go Programming Language
... "dbdeployer.job" at <$args>: wrong type for value; expected map[string]interface {}; got map[interface {}]interface {} */}} {{- end -}} ` t := template....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found