From d303d0660010b7cbf7995aaf5c6fe97ebe1ebc3b Mon Sep 17 00:00:00 2001 From: bravof Date: Tue, 7 Jul 2020 13:10:07 -0400 Subject: [PATCH] fix(exporter restart): new strategy, forgetting about day2 primitives --- .../eechart/charts/snmpexporter/templates/deployment.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 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 028d2bf5..e99fd1c7 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 @@ -18,8 +18,8 @@ spec: runAsUser: 0 initContainers: - name: cleanup - image: "ubuntu:18.04" - command: ['bash', '-c', 'rm -f /etc/snmp_exporter/generator.yml'] + image: busybox:1.28 + command: ['bash', '-c', 'if [ ! -f "/etc/snmp_exporter/generator.yml" ]; then touch /etc/snmp_exporter/ok.init; fi'] volumeMounts: - name: config-volume mountPath: /etc/snmp_exporter @@ -46,7 +46,7 @@ spec: command: - /bin/sh - -c - - if [ ! -f "/etc/snmp_exporter/generator.yml" ]; then exit 0; else exit 1; fi + - if [ ! -f "/etc/snmp_exporter/generator.yml" ] || [ -f "/etc/snmp_exporter/ok.init" ]; then exit 0; else exit 1; fi resources: {{- toYaml .Values.resources | nindent 12 }} volumes: -- GitLab