chown logrotate:logrotate /var/lib/logrotate.status
This commit is contained in:
parent
0107666fe2
commit
631be775f5
1 changed files with 25 additions and 0 deletions
|
@ -0,0 +1,25 @@
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: DaemonSet
|
||||||
|
metadata:
|
||||||
|
name: logrotate-priveledges
|
||||||
|
namespace: openbao
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: ologrotate-priveledges
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: logrotate-priveledges
|
||||||
|
spec:
|
||||||
|
initContainers:
|
||||||
|
- name: creator
|
||||||
|
image: busybox
|
||||||
|
command: ["/bin/sh", "-c", "useradd -u 100 logrotate && tail -f /dev/null", "chown logrotate:logrotate /var/lib/logrotate.status"]
|
||||||
|
securityContext:
|
||||||
|
runAsUser: 0
|
||||||
|
containers:
|
||||||
|
- name: running-container
|
||||||
|
image: busybox
|
||||||
|
command: ["sleep", "infinity"]
|
||||||
|
restartPolicy: Never
|
Reference in a new issue