From d64463d13c23d85f6342cce230621f21ee78ab5d Mon Sep 17 00:00:00 2001 From: Kjeld Schouten-Lebbing Date: Sun, 6 Feb 2022 14:01:33 +0100 Subject: [PATCH] feat(common): add an initial inotify patch (#1854) * feat(common): add an initial inotify patch * turn two around --- charts/library/common/Chart.yaml | 2 +- ..._autopermissions.yaml => _autopermissions.tpl} | 0 .../common/templates/lib/controller/_inotify.tpl | 15 +++++++++++++++ .../common/templates/lib/controller/_pod.tpl | 1 + 4 files changed, 17 insertions(+), 1 deletion(-) rename charts/library/common/templates/lib/controller/{_autopermissions.yaml => _autopermissions.tpl} (100%) create mode 100644 charts/library/common/templates/lib/controller/_inotify.tpl diff --git a/charts/library/common/Chart.yaml b/charts/library/common/Chart.yaml index e73e7948738..df778eb41bc 100644 --- a/charts/library/common/Chart.yaml +++ b/charts/library/common/Chart.yaml @@ -15,4 +15,4 @@ maintainers: name: common sources: null type: library -version: 8.14.5 +version: 8.15.0 diff --git a/charts/library/common/templates/lib/controller/_autopermissions.yaml b/charts/library/common/templates/lib/controller/_autopermissions.tpl similarity index 100% rename from charts/library/common/templates/lib/controller/_autopermissions.yaml rename to charts/library/common/templates/lib/controller/_autopermissions.tpl diff --git a/charts/library/common/templates/lib/controller/_inotify.tpl b/charts/library/common/templates/lib/controller/_inotify.tpl new file mode 100644 index 00000000000..57eb329f37e --- /dev/null +++ b/charts/library/common/templates/lib/controller/_inotify.tpl @@ -0,0 +1,15 @@ +{{/* +This template serves as the blueprint for the mountPermissions job that is run +before chart installation. +*/}} +{{- define "common.controller.inotify" -}} +- name: inotify + image: {{ .Values.alpineImage.repository }}:{{ .Values.alpineImage.tag }} + securityContext: + runAsUser: 0 + privileged: true + command: + - "/bin/sh" + - "-c" + - "sysctl -w fs.inotify.max_user_watches=524288 && sysctl -w fs.inotify.max_user_instances=512 " +{{- end -}} diff --git a/charts/library/common/templates/lib/controller/_pod.tpl b/charts/library/common/templates/lib/controller/_pod.tpl index af3971f2fd0..b1235f94743 100644 --- a/charts/library/common/templates/lib/controller/_pod.tpl +++ b/charts/library/common/templates/lib/controller/_pod.tpl @@ -51,6 +51,7 @@ terminationGracePeriodSeconds: {{ . }} {{- end }} initContainers: {{- include "common.controller.autopermissions" . | nindent 2 }} + {{- include "common.controller.inotify" . | nindent 2 }} {{- include "common.dependencies.postgresql.init" . | nindent 2 }} {{- if .Release.IsInstall }} {{- if .Values.installContainers }}