From 3b7227b3935ef9a7e2d61eeb7d392792dae5c4a0 Mon Sep 17 00:00:00 2001 From: Meg Heisler Date: Thu, 20 Feb 2020 21:17:24 -0600 Subject: [PATCH] Add ability to set the domain name in the Nagios chart This allows the ability to set the domain name in the Nagios deployment. This change goes along with a change to imageswhich will allow the ability to append the domain name to the host name in Nagios so the full FQDN appears in the dashboard. Change-Id: I512112921111e49345f19dfca70406b56dd55452 --- nagios/templates/deployment.yaml | 7 +++++++ nagios/values.yaml | 8 ++++++++ 2 files changed, 15 insertions(+) diff --git a/nagios/templates/deployment.yaml b/nagios/templates/deployment.yaml index bfbf74ee8..b99651e71 100644 --- a/nagios/templates/deployment.yaml +++ b/nagios/templates/deployment.yaml @@ -108,6 +108,10 @@ spec: mountPath: /tmp - name: nagios-confd mountPath: /opt/nagios/etc/conf.d + env: +{{- if .Values.pod.env }} +{{ include "helm-toolkit.utils.to_k8s_env_vars" .Values.pod.env | indent 12 }} +{{- end }} containers: - name: apache-proxy {{ tuple $envAll "apache_proxy" | include "helm-toolkit.snippets.image" | indent 10 }} @@ -160,6 +164,9 @@ spec: initialDelaySeconds: 60 periodSeconds: 30 env: +{{- if .Values.pod.env }} +{{ include "helm-toolkit.utils.to_k8s_env_vars" .Values.pod.env | indent 12 }} +{{- end }} - name: SNMP_NOTIF_PRIMARY_TARGET_WITH_PORT value: {{ $envAll.Values.conf.nagios.notification.snmp.primary_target }} - name: SNMP_NOTIF_SECONDARY_TARGET_WITH_PORT diff --git a/nagios/values.yaml b/nagios/values.yaml index ba8c31e0d..eff51cc14 100644 --- a/nagios/values.yaml +++ b/nagios/values.yaml @@ -238,6 +238,14 @@ pod: termination_grace_period: nagios: timeout: 30 + #env: + # + # NOTE(megheisler): This value can be used to hold + # the domain name. Functionality has been added in + # plugins to append the domain to the host name in + # the nagios dashboard + # + # NODE_DOMAIN: replicas: nagios: 1 resources: