Skip to content

Commit

Permalink
add fluentd plugins config
Browse files Browse the repository at this point in the history
  • Loading branch information
slamdev committed Sep 9, 2020
1 parent 28b0289 commit 32c76eb
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 6 deletions.
2 changes: 1 addition & 1 deletion charts/fluentd/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: fluentd
description: |-
Helm chart to deploy [fluentd](http://www.fluentd.org/).
type: application
version: 0.0.2
version: 0.0.3
appVersion: v1.11.2
home: https://github.com/slamdev/helm-charts/tree/master/charts/fluentd
icon: https://www.fluentd.org/assets/img/miscellany/fluentd-logo_2x.png
Expand Down
3 changes: 2 additions & 1 deletion charts/fluentd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ fluentd
=======
Helm chart to deploy [fluentd](http://www.fluentd.org/).

Current chart version is `0.0.2`
Current chart version is `0.0.3`

Source code can be found [here](https://github.com/slamdev/helm-charts/tree/master/charts/fluentd)

Expand All @@ -27,6 +27,7 @@ Source code can be found [here](https://github.com/slamdev/helm-charts/tree/mast
| livenessProbe.httpGet.port | string | `"http-monitoring"` | port for liveness probe |
| nameOverride | string | `""` | override name of the chart |
| nodeSelector | object | `{}` | node for scheduler pod assignment |
| plugins | list | `[]` | list of plugins to be installed when container starts |
| podAnnotations | object | `{}` | annotations to add to the pod |
| podSecurityContext | object | `{}` | specifies security settings for a pod |
| readinessProbe.httpGet.path | string | `"/metrics"` | path for readiness probe |
Expand Down
12 changes: 8 additions & 4 deletions charts/fluentd/templates/_pod.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ spec:
securityContext:
{{- toYaml .Values.securityContext | nindent 8 }}
image: "{{ .Values.image.repository }}:{{ include "fluentd.tag" . }}"
command:
- tini
- --
- /opt/entrypoint.sh
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- with .Values.containerPorts }}
ports:
Expand All @@ -41,17 +45,17 @@ spec:
- name: {{ include "fluentd.fullname" . }}
mountPath: /fluentd/etc/custom/fluent.conf
subPath: fluent.conf
- name: {{ include "fluentd.fullname" . }}
mountPath: /opt/entrypoint.sh
subPath: entrypoint.sh
{{- with .Values.volumeMounts }}
{{- toYaml . | nindent 8 }}
{{- end }}
volumes:
- name: {{ include "fluentd.fullname" . }}
configMap:
name: {{ include "fluentd.fullname" . }}
items:
- key: fluent.conf
path: fluent.conf
mode: 292 # 0444
defaultMode: 0777
{{- with .Values.volumes }}
{{- toYaml . | nindent 4 }}
{{- end }}
Expand Down
6 changes: 6 additions & 0 deletions charts/fluentd/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,9 @@ metadata:
data:
fluent.conf: |-
{{ .Values.fluentdConf | nindent 4 }}
entrypoint.sh: |-
#!/bin/sh
{{- range $plugin := .Values.plugins }}
fluent-gem install {{ $plugin }}
{{- end }}
exec /fluentd/entrypoint.sh
4 changes: 4 additions & 0 deletions charts/fluentd/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ nameOverride: ""
# fullnameOverride -- full name of the chart.
fullnameOverride: ""

# plugins -- list of plugins to be installed when container starts
plugins: []
# - fluent-plugin-s3

serviceAccount:
# serviceAccount.create -- specifies whether a service account should be created
create: false
Expand Down

0 comments on commit 32c76eb

Please sign in to comment.