Support customising telegraf configuration files

Kayobe was not copying the telegraf configuration files in the generated
kolla config directory.

Closes-Bug: #2052819
Change-Id: I93296b0671aeab9f2cd01de73da42071448a9f2a
This commit is contained in:
Will Szumski 2024-02-20 16:22:37 +00:00
parent 5244733d75
commit e39b9a94cd
4 changed files with 19 additions and 0 deletions

View File

@ -160,6 +160,8 @@ kolla_openstack_custom_config_include_globs_default:
glob: sahara/**
- enabled: '{{ kolla_enable_swift | bool }}'
glob: swift/**
- enabled: '{{ kolla_enable_telegraf | bool }}'
glob: telegraf/**
# Extra items to add to kolla_openstack_custom_config_include_globs_default
# to produce kolla_openstack_custom_config_include_globs.
@ -272,6 +274,10 @@ kolla_openstack_custom_config_rules_default:
- glob: "**/*wsgi*.conf"
strategy: template
priority: 1000
# NOTE(wszumksi): Telegraf uses toml for its configuration files
- glob: telegraf/**
strategy: template
priority: 1000
# INI files
- glob: "**/*.conf"
strategy: "{{ kolla_openstack_custom_config_ini_merge_strategy_default }}"
@ -830,3 +836,9 @@ kolla_extra_sahara:
# Whether to enable swift.
kolla_enable_swift: false
###############################################################################
# Telegraf configuration.
# Whether to enable telegraf
kolla_enable_telegraf: true

View File

@ -147,6 +147,7 @@ provisioner:
[extra-sahara.conf]
foo=bar
kolla_enable_swift: true
kolla_enable_telegraf: true
lint:
name: ansible-lint
scenario:

View File

@ -749,6 +749,7 @@ which files are supported.
``sahara.conf`` Sahara configuration.
``sahara/*`` Extended sahara configuration.
``swift/*`` Extended swift configuration.
``telegraf/*`` Extended Telegraf configuration.
=============================== =======================================================
Configuring an OpenStack Component

View File

@ -0,0 +1,5 @@
---
features:
- |
Custom telegraf configuration is now supported. See :kayobe-doc:`Kayobe documentation on
configuring kolla-ansible services <configuration/reference/kolla-ansible.html>`.