Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions ansible/roles/kolla-openstack/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,10 @@ kolla_openstack_custom_config_include_globs_default:
glob: swift/**
- enabled: '{{ kolla_enable_telegraf | bool }}'
glob: telegraf/**
- enabled: '{{ kolla_enable_watcher | bool }}'
glob: watcher.conf
- enabled: '{{ kolla_enable_watcher | bool }}'
glob: watcher/**

# Extra items to add to kolla_openstack_custom_config_include_globs_default
# to produce kolla_openstack_custom_config_include_globs.
Expand Down Expand Up @@ -817,3 +821,9 @@ kolla_enable_swift: false

# Whether to enable telegraf
kolla_enable_telegraf: true

###############################################################################
# Watcher configuration.

# Whether to enable watcher
kolla_enable_watcher: false
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ provisioner:
kolla_enable_prometheus: true
kolla_enable_swift: true
kolla_enable_telegraf: true
kolla_enable_watcher: true
lint:
name: ansible-lint
scenario:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
- prometheus/prometheus.yml.d
# Example of non-ini files that should be templated but not merged
- fluentd/input/
- watcher

- name: Ensure extra INI configuration files exist
copy:
Expand Down Expand Up @@ -75,6 +76,7 @@
- nova.conf
- octavia.conf
- placement.conf
- watcher.conf

- name: Ensure extra YAML configuration files exist
copy:
Expand Down Expand Up @@ -114,6 +116,10 @@
format1 /^(?<Timestamp>\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\.\d{3}) \[(?<log_level>\w+)\] (?<Payload>.*)/
</parse>
</source>
- dest: watcher/policy.yaml
content: |
---
"my_custom_rule": "role:custom_role"
loop_control:
label: "{{ item.dest }}"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ def test_service_ini_file(host, path):
'nova.conf',
'octavia.conf',
'placement.conf',
'watcher.conf',
'backup.my.cnf'])
def test_service_ini_file_extra_confs(host, path):
# Tests config added via extra config files
Expand All @@ -94,7 +95,8 @@ def test_service_ini_file_extra_confs(host, path):
'ironic/ironic-agent.kernel',
'nova/nova-libvirt/cacert.pem',
'nova/nova-libvirt/clientcert.pem',
'nova/nova-libvirt/clientkey.pem'])
'nova/nova-libvirt/clientkey.pem',
'watcher/policy.yaml'])
def test_service_non_ini_file(host, path):
# TODO(mgoddard): Check config file contents.
path = os.path.join('/etc/kolla/config', path)
Expand Down
2 changes: 2 additions & 0 deletions doc/source/configuration/reference/kolla-ansible.rst
Original file line number Diff line number Diff line change
Expand Up @@ -749,6 +749,8 @@ which files are supported.
``prometheus/*`` Prometheus configuration.
``swift/*`` Extended swift configuration.
``telegraf/*`` Extended Telegraf configuration.
``watcher.conf`` Watcher configuration.
``watcher/*`` Extended Watcher configuration.
=============================== =======================================================

Configuring an OpenStack Component
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
features:
- Adds support for custom Watcher configuration via ``watcher.conf`` and
``watcher/*`` files.