Charts: [stable/logstash] Feature request: plugins

Created on 25 Jan 2019  路  8Comments  路  Source: helm/charts

Feature Request: Allow specification of plugins to be installed in Logstash

We'd like to be able to specify plugins for Logstash to install and run on startup. This appears to be possible via spec.containers[].command in the StatefulSet and a cli option, though my Kubernetes/Helm knowledge is new and limited. I could see problems with specifying multiple plugins due to the templating language, but at least one should be possible, correct?

Are there reasons for not having this? Is there a constraint I'm not thinking of? Is there a way to do this already? Should I attempt a PR?

Thanks

lifecyclstale

Most helpful comment

I managed to get it working by copying down the entire logstash chart and adding this condition around the plugin value and its contents:

        ## logstash
        - name: {{ .Chart.Name }}
          image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
          imagePullPolicy: {{ .Values.image.pullPolicy }}
          {{- if .Values.plugin }}
          command: ["/bin/sh", "-c"]
          args: ["/usr/share/logstash/bin/logstash-plugin install {{ .Values.plugin }} ; /usr/local/bin/docker-entrypoint"]
          {{- end }}
          ports:

However, I think there should be a better way than running shell. Thoughts?

All 8 comments

I managed to get it working by copying down the entire logstash chart and adding this condition around the plugin value and its contents:

        ## logstash
        - name: {{ .Chart.Name }}
          image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
          imagePullPolicy: {{ .Values.image.pullPolicy }}
          {{- if .Values.plugin }}
          command: ["/bin/sh", "-c"]
          args: ["/usr/share/logstash/bin/logstash-plugin install {{ .Values.plugin }} ; /usr/local/bin/docker-entrypoint"]
          {{- end }}
          ports:

However, I think there should be a better way than running shell. Thoughts?

Hmm, but the better option would be use pre-build image with all plugins. Installing plugin sometime is take some times so all readiness could be difficult to achieve. The Things that could be add instead the additional value like plugin better would be expose command and args as value and intend it as yaml parsing in template.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Any further update will cause the issue/pull request to no longer be considered stale. Thank you for your contributions.

This issue is being automatically closed due to inactivity.

Any updates on this?

Indeed, running into the same thing here. the -oss image of logstash apparently does not include the 'prune' filter, which is quite useful.

Bump. I'm also interested in whether the chart can/will handle plugins without modification. If not I will do what @PosicubeBeege did.

+1 also interested, kinesis plugin is not included in the image build by default

Was this page helpful?
0 / 5 - 0 ratings