2

Team, using jenkins for helm deploy of a chart where plugins are installed as part of it.

Am, using ConfigMap to install fluentd plugins, and getting this error on Jenkins any hint?

Error: UPGRADE FAILED: unable to decode "": Object 'Kind' is missing in '{"install-plugins.sh":"#!/bin/sh\n  fluent-gem install fluent-plugin-gelf-hs -v 1.0.4\n      \n  fluent-gem install fluent-plugin-kubernetes_metadata_filter -v 1.0.0\n      \n  fluent-gem install fluent-plugin-systemd -v 0.3.1\n      \n  fluent-gem install fluentd -v 1.0.2\n      \n  fluent-gem install gelf -v 3.0.0\n      \n  fluent-gem install json -v 2.1.0\n      \n  fluent-gem install oj -v 2.18.3"}'
err: exit status 1

Below is dry run but jenkins throwing above error

  install-plugins.sh: |-
    #!/bin/sh
      fluent-gem install fluent-plugin-gelf-hs -v 1.0.4
          
      fluent-gem install fluent-plugin-kubernetes_metadata_filter -v 1.0.0

My ConfigMap.yaml looks like below in helm chart

  {{- range $plugin,$version := .Values.plugins.pluginsList }}
    fluent-gem install -v {{ $plugin }} {{ $version }}
{{ end -}}

Not sure about the gem install format though.

AhmFM
  • 1,552
  • 3
  • 23
  • 53

1 Answers1

2

You configmap.yaml should contain full Configmap object

apiVersion: v1
kind: ConfigMap
metadata:
  name: configmap
data:
  install-plugins.sh: |-
    #!/bin/sh
    {{- range $plugin,$version := .Values.plugins.pluginsList }}
    fluent-gem install -v {{ $plugin }} {{ $version }}
    {{ end -}}
edbighead
  • 5,607
  • 5
  • 29
  • 35