Skip to content

Commit

Permalink
DATAGO-13861: Adding support for logrotate
Browse files Browse the repository at this point in the history
  • Loading branch information
hadielaham88 authored and xiaocongji committed Jul 31, 2023
1 parent 51ed8a8 commit 67d7ca9
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 5 deletions.
1 change: 1 addition & 0 deletions templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ storage might be desired by the user.
{{- end }}
{{ end }}
{{ end }}

{{- end -}}

{{/*
Expand Down
20 changes: 20 additions & 0 deletions templates/logrotate-config-configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{{- if .Values.server.logrotate}}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "vault.fullname" . }}-logrotate-config
namespace: {{ .Release.Namespace }}
data:
logrotate.conf: |
/vault/audit/audit.log {
rotate 1
copytruncate
size 5M
missingok
compress
postrotate
pkill -HUP -f "vault server"
echo "`date`: Audit log rotated - SIGHUP exit code is $?" > /vault/audit/last-rotate-status
endscript
}
{{ end }}
5 changes: 0 additions & 5 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -331,13 +331,8 @@ server:
# By default no direct resource request is made.

image:
<<<<<<< HEAD
repository: "hashicorp/vault"
tag: "1.11.3"
=======
repository: "vault"
tag: "1.3.2"
>>>>>>> 52eb7a1 (Update to 0.4.0)
# Overrides the default Image Pull Policy
pullPolicy: IfNotPresent

Expand Down

0 comments on commit 67d7ca9

Please sign in to comment.