From 4a1e42dd5ec3c048aa3bb50f026d2b33730c22c5 Mon Sep 17 00:00:00 2001 From: Roger Steneteg <36709673+rsteneteg@users.noreply.github.com> Date: Mon, 3 Feb 2020 10:41:22 -0600 Subject: [PATCH] added ability to configure kernel setting fs.inotify.max_user_instances through init container to resolve issue with too many open files (#1620) Signed-off-by: Roger Steneteg --- production/helm/loki-stack/Chart.yaml | 2 +- production/helm/promtail/Chart.yaml | 2 +- production/helm/promtail/templates/daemonset.yaml | 11 +++++++++++ production/helm/promtail/values.yaml | 4 ++++ 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/production/helm/loki-stack/Chart.yaml b/production/helm/loki-stack/Chart.yaml index 3b250b37f8a6..47a22857a4e2 100644 --- a/production/helm/loki-stack/Chart.yaml +++ b/production/helm/loki-stack/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: "v1" name: loki-stack -version: 0.29.0 +version: 0.30.0 appVersion: v1.3.0 kubeVersion: "^1.10.0-0" description: "Loki: like Prometheus, but for logs." diff --git a/production/helm/promtail/Chart.yaml b/production/helm/promtail/Chart.yaml index 54b914895d6b..bb6316cbf82f 100644 --- a/production/helm/promtail/Chart.yaml +++ b/production/helm/promtail/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: "v1" name: promtail -version: 0.17.0 +version: 0.18.0 appVersion: v1.3.0 kubeVersion: "^1.10.0-0" description: "Responsible for gathering logs and sending them to Loki" diff --git a/production/helm/promtail/templates/daemonset.yaml b/production/helm/promtail/templates/daemonset.yaml index 66dbac5b3c3c..6a4266a5f330 100644 --- a/production/helm/promtail/templates/daemonset.yaml +++ b/production/helm/promtail/templates/daemonset.yaml @@ -37,6 +37,17 @@ spec: serviceAccountName: {{ template "promtail.serviceAccountName" . }} {{- if .Values.priorityClassName }} priorityClassName: {{ .Values.priorityClassName }} + {{- end }} + {{- if .Values.initContainer.enabled }} + initContainers: + - name: init + image: busybox + command: + - sh + - -c + - sysctl -w fs.inotify.max_user_instances={{ .Values.initContainer.fsInotifyMaxUserInstances }} + securityContext: + privileged: true {{- end }} containers: - name: promtail diff --git a/production/helm/promtail/values.yaml b/production/helm/promtail/values.yaml index abf2c56f1f0b..9f6f942beb3c 100644 --- a/production/helm/promtail/values.yaml +++ b/production/helm/promtail/values.yaml @@ -6,6 +6,10 @@ annotations: {} deploymentStrategy: RollingUpdate +initContainer: + enabled: false + fsInotifyMaxUserInstances: 128 + image: repository: grafana/promtail tag: v1.3.0