- 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
|
||||
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:
|
||||
|
|
Reference in a new issue