- 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:
parent
c79114f463
commit
6acd284b83
1 changed files with 21 additions and 6 deletions
|
@ -6,13 +6,24 @@ server:
|
||||||
- containerPort: 12345
|
- containerPort: 12345
|
||||||
securityContext:
|
securityContext:
|
||||||
runAsUser: 100
|
runAsUser: 100
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: log-storage
|
|
||||||
mountPath: /openbao/logs
|
|
||||||
- name: alloy-data
|
- name: alloy-data
|
||||||
mountPath: /var/lib/alloy
|
mountPath: /var/lib/alloy
|
||||||
- name: config-volume
|
- name: config-volume
|
||||||
mountPath: /etc/alloy
|
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:
|
volumes:
|
||||||
- name: log-storage
|
- name: log-storage
|
||||||
emptyDir: {}
|
emptyDir: {}
|
||||||
|
@ -20,11 +31,15 @@ server:
|
||||||
emptyDir: {}
|
emptyDir: {}
|
||||||
- name: config-volume
|
- name: config-volume
|
||||||
configMap:
|
configMap:
|
||||||
name: sidecar-container-alloy-config
|
name: sidecar-container-alloy-config
|
||||||
|
- name: host-log-storage
|
||||||
|
hostPath:
|
||||||
|
path: /var/log
|
||||||
|
type: Directory
|
||||||
|
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- mountPath: /var/log
|
- mountPath: /openbao/logs
|
||||||
name: log-storage
|
name: host-log-storage
|
||||||
readOnly: false
|
readOnly: false
|
||||||
|
|
||||||
postStart:
|
postStart:
|
||||||
|
|
Reference in a new issue