Skip to content

Commit

Permalink
Merge pull request #301 from rh-dluong/add-logrotate-template
Browse files Browse the repository at this point in the history
[HAMMER] Changed template to add miq-log config map
  • Loading branch information
carbonin authored Aug 14, 2018
2 parents 8ad3851 + 230e81b commit af1a8b0
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions templates/miq-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,24 @@ objects:
admin-password: "${APPLICATION_ADMIN_PASSWORD}"
database-url: postgresql://${DATABASE_USER}:${DATABASE_PASSWORD}@${DATABASE_SERVICE_NAME}/${DATABASE_NAME}?encoding=utf8&pool=5&wait_timeout=5
v2-key: "${V2_KEY}"
- apiVersion: v1
kind: ConfigMap
metadata:
name: miq-logs-config
data:
miq_logs.conf: |
/var/www/miq/vmdb/log/*.log /var/www/miq/vmdb/log/apache/*.log {
daily
dateext
missingok
rotate 14
notifempty
compress
copytruncate
lastaction
/sbin/service httpd reload > /dev/null 2>&1 || true
endscript
}
- apiVersion: v1
kind: ConfigMap
metadata:
Expand Down Expand Up @@ -421,6 +439,9 @@ objects:
volumeMounts:
- name: "${NAME}-server"
mountPath: "/persistent"
- name: miq-logs-config
mountPath: "/etc/logrotate.d/miq_logs.conf"
subPath: miq_logs.conf
env:
- name: ALLOW_INSECURE_SESSION
value: 'true'
Expand Down Expand Up @@ -456,6 +477,10 @@ objects:
exec:
command:
- "/opt/manageiq/container-scripts/sync-pv-data"
volumes:
- name: miq-logs-config
configMap:
name: miq-logs-config
serviceAccount: miq-orchestrator
serviceAccountName: miq-orchestrator
terminationGracePeriodSeconds: 90
Expand Down

0 comments on commit af1a8b0

Please sign in to comment.