["/bin/sh", "-c", "while kill -0 $(pidof main-container) 2>/dev/null; do sleep 1; done; echo 'OpenBao has crashed - giving Alloy time to collect logs...'; sleep 20"]

This commit is contained in:
miwr 2025-03-18 12:59:08 +01:00
parent 8db5e5950d
commit ef22f9e7be

View file

@ -1,24 +1,16 @@
server:
extraContainers:
- name: grafana-alloy
image: grafana/alloy:latest
ports:
- containerPort: 12345
# volumeMounts:
# - name: alloy-data
# mountPath: /var/lib/alloy/data
# securityContext:
# runAsUser: 0
- name: log-sidecar
image: busybox
command: ["/bin/sh", "-c", "while kill -0 $(pidof openbao) 2>/dev/null; do sleep 1; done; echo 'OpenBao has crashed - giving Alloy time to collect logs...'; sleep 20"]
volumeMounts:
- name: log-storage
mountPath: /var/log/
volumes:
- name: alloy-data
- name: log-storage
emptyDir: {}
# volumes:
# - name: sidecar-container-alloy-config
# configMap:
# name: sidecar-container-alloy-config
postStart:
- sh
- -c