Skip to content

Commit

Permalink
discard audit log to prevent full fs
Browse files Browse the repository at this point in the history
Signed-off-by: phac008 <[email protected]>
  • Loading branch information
phac008 committed Nov 25, 2024
1 parent 0ea8488 commit 838b346
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ spec:
name: vault-crossplane-providerconfig
forProvider:
options:
file_path: /vault/audit/audit.log
# file_path: /vault/audit/audit.log
file_path: discard
type: file
30 changes: 0 additions & 30 deletions platform-apps/charts/vault/values-uibklab.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,36 +96,6 @@ vault:
- ALL
privileged: false
runAsNonRoot: true

- name: audit-cleanup
image: hashicorp/vault:1.17.2
env:
- name: VAULT_ADDR
valueFrom:
secretKeyRef:
name: sx-vault-env-vars
key: VAULT_ADDR
command:
- /bin/sh
- -c
- |
while true; do
echo "waiting for tomorrow :-)"
sleep 86400 # Runs daily, after 1 day
echo "Truncating log file..."
truncate -s 0 /vault/audit/audit.log
done
volumeMounts:
- name: vault-root-token
mountPath: /vault-root-token
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
privileged: false
runAsNonRoot: true

- name: auto-unsealer
image: hashicorp/vault:1.17.2
env:
Expand Down

0 comments on commit 838b346

Please sign in to comment.