sivasamyk / logtrail

Kibana plugin to view, search & live tail log events
MIT License
1.4k stars 185 forks source link

handlebars not accepted in yaml #321

Closed Morriz closed 5 years ago

Morriz commented 6 years ago

Hi, as most of us use this in a Configmap, the handlebars notation in the json is giving helm errors:

unexpected "{" in command

relevant part:

apiVersion: v1
kind: ConfigMap
metadata:
  name: kibana-config
  labels:
    app: kibana
data:
  logtrail.json: |
    {
      "index_patterns" : [
        {
          "es": {
            "default_index": "kube-system-*"
          },
...
            "message_format": "[{{{object.source.host}}}::{{{object.involvedObject.name}}}] {{{object.type}}} - {{{object.involvedObject.name}}} : {{{message}}}",
            "keyword_suffix" : ""
sivasamyk commented 6 years ago

Can you try reading the logtrail.json from file like below?

apiVersion: v1
kind: ConfigMap
metadata:
  name: kibana-config
  labels:
    app: kibana
data:
  {{ (.Files.Glob "files/logtrail.json").AsConfig }}

where /files/logtrail.json contains the actual config.

sivasamyk commented 5 years ago

@Morriz Did the above suggestion worked?

sivasamyk commented 5 years ago

Closing the issue. Please reopen if you still see this issue.

Morriz commented 5 years ago

Sry, was out for a while. I will try when I am back in this part of userland ;)