[stable/fluentd] Added support for plugin installation (#16705)

* Added support for plugin installation via chart

Signed-off-by: Aaron Layfield <aaron.layfield@gmail.com>

* Removed testing default values

Signed-off-by: Aaron Layfield <aaron.layfield@gmail.com>

* Increment Chart Version

Signed-off-by: Aaron Layfield <aaron.layfield@gmail.com>

* Adding check on plugin list empty

Signed-off-by: Aaron Layfield <aaron.layfield@gmail.com>
This commit is contained in:
Aaron Layfield
2019-09-20 10:13:48 -07:00
committed by Kubernetes Prow Robot
parent ddf94be24a
commit 96e13e8cc8
5 changed files with 19 additions and 1 deletions
+1 -1
View File
@@ -2,7 +2,7 @@ apiVersion: v1
description: A Fluentd Elasticsearch Helm chart for Kubernetes.
icon: https://raw.githubusercontent.com/fluent/fluentd-docs/master/public/logo/Fluentd_square.png
name: fluentd
version: 2.0.3
version: 2.1.3
appVersion: v2.4.0
home: https://www.fluentd.org/
sources:
+2
View File
@@ -65,6 +65,8 @@ Parameter | Description | Default
`nodeSelector` | node labels for pod assignment | `{}`
`replicaCount` | desired number of pods | `1` ???
`resources` | pod resource requests & limits | `{}`
`plugins.enabled` | Enable Plugins Installation | `false`
`plugins.pluginsList` | List of plugins to install | `[]`
`rbac.create` | Specifies whether RBAC resources should be created | `true`
`serviceAccount.create` | Specifies whether a service account should be created. | `true`
`serviceAccount.name` | Name of the service account.
+8
View File
@@ -27,3 +27,11 @@ data:
@type prometheus_output_monitor
</source>
{{- end }}
{{- if and (.Values.plugins.enabled) (gt (len .Values.plugins.pluginsList) 0) }}
install-plugins.sh: |-
#!/bin/sh
{{- range $plugin := .Values.plugins.pluginsList }}
fluent-gem install {{ $plugin }}
{{- end }}
exec /run.sh
{{- end }}
+4
View File
@@ -43,6 +43,9 @@ spec:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if and (.Values.plugins.enabled) (gt (len .Values.plugins.pluginsList) 0) }}
command: ["/bin/sh", "-c", "/etc/fluent/config.d/install-plugins.sh"]
{{- end }}
env:
- name: OUTPUT_HOST
value: {{ .Values.output.host | quote }}
@@ -99,6 +102,7 @@ spec:
- name: config-volume-{{ template "fluentd.fullname" . }}
configMap:
name: {{ template "fluentd.fullname" . }}
defaultMode: 0777
{{- if and .Values.persistence.enabled (not .Values.autoscaling.enabled) }}
- name: buffer
persistentVolumeClaim:
+4
View File
@@ -27,6 +27,10 @@ extraEnvVars:
# name: secret_name
# key: secret_key
plugins:
enabled: false
pluginsList: []
service:
annotations: {}
type: ClusterIP