From 209bf1d6b161683ee64600416fab884dd4940724 Mon Sep 17 00:00:00 2001 From: bravof Date: Tue, 7 Jul 2020 14:23:30 -0400 Subject: [PATCH] fix(touch): touch now with emptyDir --- .../charts/snmpexporter/templates/deployment.yaml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/snmp_ee_vnf/helm-charts/eechart/charts/snmpexporter/templates/deployment.yaml b/snmp_ee_vnf/helm-charts/eechart/charts/snmpexporter/templates/deployment.yaml index 8cddcdaf..64dd9ec7 100644 --- a/snmp_ee_vnf/helm-charts/eechart/charts/snmpexporter/templates/deployment.yaml +++ b/snmp_ee_vnf/helm-charts/eechart/charts/snmpexporter/templates/deployment.yaml @@ -19,10 +19,12 @@ spec: initContainers: - name: cleanup image: busybox:1.28 - command: ['sh', '-c', 'if [ -f "/etc/snmp_exporter/generator.yml" ]; then touch /etc/snmp_exporter/ok.init; fi'] + command: ['sh', '-c', 'if [ -f "/etc/snmp_exporter/generator.yml" ]; then touch /etc/internalcomm/ok.init; fi'] volumeMounts: - name: config-volume mountPath: /etc/snmp_exporter + - name: internal-comm + mountPath: /etc/internalcomm - name: init-config image: busybox:1.28 command: ['sh', '-c', 'if [ ! -f "/etc/snmp_exporter/snmp.yml" ]; then cp /etc/snmp_exporter_init/snmp.yml /etc/snmp_exporter; fi'] @@ -41,12 +43,14 @@ spec: volumeMounts: - name: config-volume mountPath: /etc/snmp_exporter + - name: internal-comm + mountPath: /etc/internalcomm livenessProbe: exec: command: - /bin/sh - -c - - if [ ! -f "/etc/snmp_exporter/generator.yml" ] || [ -f "/etc/snmp_exporter/ok.init" ]; then exit 0; else exit 1; fi + - if [ ! -f "/etc/snmp_exporter/generator.yml" ] || [ -f "/etc/internalcomm/ok.init" ]; then exit 0; else exit 1; fi resources: {{- toYaml .Values.resources | nindent 12 }} volumes: @@ -56,4 +60,6 @@ spec: - name: init-config-volume configMap: name: snmp-init-config + - name: internal-comm + emptyDir: {} \ No newline at end of file -- GitLab