31 lines
No EOL
700 B
YAML
31 lines
No EOL
700 B
YAML
apiVersion: apps/v1
|
|
kind: DaemonSet
|
|
metadata:
|
|
name: logrotate-priviledges
|
|
namespace: openbao
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app: logrotate-priviledges
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: logrotate-priviledges
|
|
spec:
|
|
initContainers:
|
|
- name: creator
|
|
image: busybox
|
|
command: ["/bin/sh", "-c"]
|
|
args:
|
|
- |
|
|
set -e
|
|
useradd -u 100 logrotate
|
|
chown logrotate:logrotate /var/lib
|
|
tail -f /dev/null
|
|
securityContext:
|
|
runAsUser: 0
|
|
containers:
|
|
- name: running-container
|
|
image: busybox
|
|
command: ["sleep", "infinity"]
|
|
restartPolicy: Never |