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 028d2bf5deabaebf1dda264a2bed6c8606ed9736..e99fd1c7efb9d727845ca1eea013b14ff88d91d3 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: