From cf131bacb26ec1e3b2e09baa6a12b0a693c9a0fa Mon Sep 17 00:00:00 2001 From: "KHIYANI, RAHUL (rk0850)" Date: Wed, 5 Aug 2020 10:29:30 -0500 Subject: [PATCH] Add missing security context template to nagios init container This change adds security context template at container level to implement readOnly-fs flag Change-Id: Ibd4f8a916bcd74c1d89aa360e89d4477cd01d367 --- nagios/templates/deployment.yaml | 1 + nagios/values.yaml | 2 ++ 2 files changed, 3 insertions(+) diff --git a/nagios/templates/deployment.yaml b/nagios/templates/deployment.yaml index ca0342c98..75776c981 100644 --- a/nagios/templates/deployment.yaml +++ b/nagios/templates/deployment.yaml @@ -101,6 +101,7 @@ spec: - name: define-nagios-hosts {{ tuple $envAll "nagios" | include "helm-toolkit.snippets.image" | indent 10 }} {{ tuple $envAll $envAll.Values.pod.resources.nagios | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }} +{{ dict "envAll" $envAll "application" "monitoring" "container" "define_nagios_hosts" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 10 }} command: - /usr/lib/nagios/plugins/define-nagios-hosts.py - --object_file_loc diff --git a/nagios/values.yaml b/nagios/values.yaml index c98955ec9..d43fa69ed 100644 --- a/nagios/values.yaml +++ b/nagios/values.yaml @@ -212,6 +212,8 @@ pod: pod: runAsUser: 0 container: + define_nagios_hosts: + readOnlyRootFilesystem: false apache_proxy: readOnlyRootFilesystem: false nagios: