SC-5200 Add support for LA custom configs (#15405)

Signed-off-by: Alen Komljen <alen.komljen@live.com>
This commit is contained in:
Alen Komljen
2019-07-10 12:52:26 -07:00
committed by Kubernetes Prow Robot
parent ed660bdef2
commit 95cce733d0
5 changed files with 40 additions and 1 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
apiVersion: v1
appVersion: "1.0"
version: 1.0.12
version: 1.0.13
description: Helm chart for deploying Sematext Agent to Kubernetes
keywords:
- sematext
+1
View File
@@ -54,6 +54,7 @@ The following table lists the configuration parameters of the `sematext-agent` c
| `logagent.image.tag` | The image tag | `latest` |
| `logagent.image.pullPolicy` | Image pull policy | `Always` |
| `logagent.resources` | Logagent resources | `{}` |
| `logagent.customConfigs` | Logagent custom configs | `[]` |
| `logagent.extraHostVolumeMounts` | Extra mounts | `{}` |
| `customUrl.serverBaseUrl` | Custom Base URL | `Nil` |
| `customUrl.logsReceiverUrl` | Custom Logs receiver URL | `Nil` |
@@ -0,0 +1,13 @@
{{- if .Values.logagent.customConfigs }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "sematext-agent.fullname" . }}-logagent-custom-configs
labels:
app: {{ template "sematext-agent.name" . }}-logagent
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
data:
{{ toYaml .Values.logagent.customConfigs | indent 2 }}
{{- end }}
@@ -26,6 +26,7 @@ spec:
checksum/config-agent: {{ include (print $.Template.BasePath "/configmap-agent.yaml") . | sha256sum }}
checksum/config-agent-autodisco: {{ include (print $.Template.BasePath "/configmap-agent-autodisco.yaml") . | sha256sum }}
checksum/config-logagent: {{ include (print $.Template.BasePath "/configmap-logagent.yaml") . | sha256sum }}
checksum/config-logagent-custom-configs: {{ include (print $.Template.BasePath "/configmap-logagent-custom-configs.yaml") . | sha256sum }}
checksum/secret: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }}
spec:
serviceAccountName: {{ template "sematext-agent.serviceAccountName" . }}
@@ -115,6 +116,10 @@ spec:
volumeMounts:
- name: docker-sock
mountPath: /var/run/docker.sock
{{- if .Values.logagent.customConfigs }}
- mountPath: /etc/sematext
name: logagent-config-volume
{{- end }}
{{- if .Values.logagent.extraHostVolumeMounts }}
{{- range $_, $mount := .Values.logagent.extraHostVolumeMounts }}
- name: {{ $mount.name }}
@@ -146,6 +151,11 @@ spec:
- name: lib
hostPath:
path: /host/usr/lib
{{- if .Values.logagent.customConfigs }}
- name: logagent-config-volume
configMap:
name: {{ template "sematext-agent.fullname" . }}-logagent-custom-configs
{{- end }}
{{- if .Values.logagent.extraHostVolumeMounts }}
{{- range $_, $mount := .Values.logagent.extraHostVolumeMounts }}
- name: {{ $mount.name }}
+15
View File
@@ -25,6 +25,21 @@ logagent:
config:
LOGSENE_BULK_SIZE: "1000"
LOGSENE_LOG_INTERVAL: "10000"
customConfigs: []
# logagent.conf: |-
# options:
# printStats: 60
# suppress: true
# geoipEnabled: true
# diskBufferDir: /tmp/sematext-logagent
# parser:
# patternFiles:
# - /etc/logagent/patterns.yml
# output:
# logsene:
# module: elasticsearch
# url: ${LOGSENE_RECEIVER_URL}
resources: {}
extraHostVolumeMounts: {}
# - name: <mountName>