- name: logrotate

image: alpine:latest
      command: ["/bin/sh", "-c", "while true; do /usr/sbin/logrotate /etc/logrotate.conf; sleep 60; done"]
      securityContext:
        runAsUser: 100
      volumeMounts:
        - name: host-log-storage
          mountPath: /openbao/logs
        - name: logrotate-config
          mountPath: /etc/logrotate.conf
          subPath: logrotate.conf
This commit is contained in:
miwr 2025-03-31 10:03:59 +02:00
parent c79114f463
commit 6acd284b83

View file

@ -6,13 +6,24 @@ server:
- containerPort: 12345
securityContext:
runAsUser: 100
volumeMounts:
- name: log-storage
mountPath: /openbao/logs
volumeMounts:
- name: alloy-data
mountPath: /var/lib/alloy
- name: config-volume
mountPath: /etc/alloy
- name: host-log-storage
mountPath: /openbao/logs
- name: logrotate
image: alpine:latest
command: ["/bin/sh", "-c", "while true; do /usr/sbin/logrotate /etc/logrotate.conf; sleep 60; done"]
securityContext:
runAsUser: 100
volumeMounts:
- name: host-log-storage
mountPath: /openbao/logs
- name: logrotate-config
mountPath: /etc/logrotate.conf
subPath: logrotate.conf
volumes:
- name: log-storage
emptyDir: {}
@ -20,11 +31,15 @@ server:
emptyDir: {}
- name: config-volume
configMap:
name: sidecar-container-alloy-config
name: sidecar-container-alloy-config
- name: host-log-storage
hostPath:
path: /var/log
type: Directory
volumeMounts:
- mountPath: /var/log
name: log-storage
- mountPath: /openbao/logs
name: host-log-storage
readOnly: false
postStart: