From 631be775f5f43bed3d61fed7d2cd7aea1553afa1 Mon Sep 17 00:00:00 2001 From: miwr Date: Mon, 31 Mar 2025 13:28:37 +0200 Subject: [PATCH] chown logrotate:logrotate /var/lib/logrotate.status --- .../grant-priviledges-to-logrotate.yaml | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 template/stacks/ref-implementation/openbao-logging/grant-priviledges-to-logrotate.yaml diff --git a/template/stacks/ref-implementation/openbao-logging/grant-priviledges-to-logrotate.yaml b/template/stacks/ref-implementation/openbao-logging/grant-priviledges-to-logrotate.yaml new file mode 100644 index 0000000..7db4e5b --- /dev/null +++ b/template/stacks/ref-implementation/openbao-logging/grant-priviledges-to-logrotate.yaml @@ -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 \ No newline at end of file