diff --git a/charts/library/common/Chart.yaml b/charts/library/common/Chart.yaml index 4a8a4a26810..0c54677e63a 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.16.1 +version: 8.17.0 diff --git a/charts/library/common/templates/lib/controller/_hostpatch.tpl b/charts/library/common/templates/lib/controller/_hostpatch.tpl new file mode 100644 index 00000000000..c26f709e884 --- /dev/null +++ b/charts/library/common/templates/lib/controller/_hostpatch.tpl @@ -0,0 +1,15 @@ +{{/* +This template serves as the blueprint for the mountPermissions job that is run +before chart installation. +*/}} +{{- define "common.controller.hostpatch" -}} +- name: hostpatch + image: {{ .Values.alpineImage.repository }}:{{ .Values.alpineImage.tag }} + securityContext: + runAsUser: 0 + privileged: true + command: + - "/bin/sh" + - "-c" + - ( sysctl -w fs.inotify.max_user_watches=524288 || echo "error setting inotify") && ( sysctl -w fs.inotify.max_user_instances=512 || echo "error setting inotify")&& ( chmod -x /usr/bin/docker-compose || echo "error locking docker-compose") && ( chmod -x /bin/docker-compose || echo "error locking docker-compose" ) +{{- end -}} diff --git a/charts/library/common/templates/lib/controller/_inotify.tpl b/charts/library/common/templates/lib/controller/_inotify.tpl deleted file mode 100644 index 57eb329f37e..00000000000 --- a/charts/library/common/templates/lib/controller/_inotify.tpl +++ /dev/null @@ -1,15 +0,0 @@ -{{/* -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 b1235f94743..586fc912831 100644 --- a/charts/library/common/templates/lib/controller/_pod.tpl +++ b/charts/library/common/templates/lib/controller/_pod.tpl @@ -51,7 +51,7 @@ terminationGracePeriodSeconds: {{ . }} {{- end }} initContainers: {{- include "common.controller.autopermissions" . | nindent 2 }} - {{- include "common.controller.inotify" . | nindent 2 }} + {{- include "common.controller.hostpatch" . | nindent 2 }} {{- include "common.dependencies.postgresql.init" . | nindent 2 }} {{- if .Release.IsInstall }} {{- if .Values.installContainers }}