Skip to content
Snippets Groups Projects
Commit 4c74ca75 authored by lavado's avatar lavado
Browse files

Merge branch 'snmp_package2' into 'master'

fix(touch): touch now with emptyDir

See merge request !57
parents 0384d035 209bf1d6
No related branches found
No related tags found
1 merge request!57fix(touch): touch now with emptyDir
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment