ConfigMap rsyslog conf files for k8

This commit is contained in:
Christian Adams 2020-04-06 16:32:02 -04:00
parent 4d5507d344
commit e740340793
3 changed files with 26 additions and 3 deletions

View File

@ -214,6 +214,7 @@
- 'deployment'
- 'supervisor'
- 'launch_awx'
- 'rsyslog'
no_log: true
- name: Apply Deployment
@ -225,6 +226,7 @@
- "{{ deployment }}"
- "{{ supervisor }}"
- "{{ launch_awx }}"
- "{{ rsyslog }}"
no_log: true
- name: Delete any existing management pod

View File

@ -98,7 +98,7 @@ spec:
mountPath: "/var/run/supervisor"
- name: rsyslog-socket
mountPath: "/var/run/rsyslog"
- name: rsyslog-config
- name: rsyslog-dir
mountPath: "/var/lib/awx/rsyslog/"
{% if ca_trust_dir is defined %}
- name: {{ kubernetes_deployment_name }}-ca-trust-dir
@ -148,6 +148,11 @@ spec:
subPath: supervisor_task.conf
readOnly: true
- name: {{ kubernetes_deployment_name }}-rsyslog-config
mountPath: "/var/lib/awx/rsyslog/rsyslog.conf"
subPath: rsyslog.conf
readOnly: true
- name: {{ kubernetes_deployment_name }}-secret-key
mountPath: "/etc/tower/SECRET_KEY"
subPath: SECRET_KEY
@ -184,7 +189,7 @@ spec:
mountPath: "/var/run/supervisor"
- name: rsyslog-socket
mountPath: "/var/run/rsyslog"
- name: rsyslog-config
- name: rsyslog-dir
mountPath: "/var/lib/awx/rsyslog/"
{% if ca_trust_dir is defined %}
- name: {{ kubernetes_deployment_name }}-ca-trust-dir
@ -331,7 +336,7 @@ spec:
emptyDir: {}
- name: rsyslog-socket
emptyDir: {}
- name: rsyslog-config
- name: rsyslog-dir
emptyDir: {}
{% if ca_trust_dir is defined %}
- name: {{ kubernetes_deployment_name }}-ca-trust-dir
@ -409,6 +414,12 @@ spec:
- key: supervisor-task-config
path: 'supervisor_task.conf'
- name: {{ kubernetes_deployment_name }}-rsyslog-config
configMap:
name: {{ kubernetes_deployment_name }}-rsyslog-config
items:
- key: rsyslog-config
path: 'rsyslog.conf'
- name: {{ kubernetes_deployment_name }}-secret-key
secret:

View File

@ -0,0 +1,10 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ kubernetes_deployment_name }}-rsyslog-config
namespace: {{ kubernetes_namespace }}
data:
rsyslog-config: |
$WorkDirectory /var/lib/awx/rsyslog
$IncludeConfig /etc/rsyslog.d/*.conf