Add feature to specify a custom endpoint name for a host
- Render Endpoint and Zone with a different name per host - Add custom variable `_director_custom_endpoint_name` to a host with that name - Update `command_endpoint` behavior in services to use custom var or hostname - Includes a feature flag that needs to be enabled
This commit is contained in:
parent
8237d84cdb
commit
4f959572f2
|
@ -252,14 +252,11 @@ class IcingaHost extends IcingaObject implements ExportInterface
|
|||
$config->configFile($pre . 'agent_zones')->addObject($zone);
|
||||
}
|
||||
|
||||
protected function renderCustom_endpoint_name()
|
||||
protected function renderCustom_endpoint_name($value)
|
||||
{
|
||||
// When feature flag feature_custom_endpoint is enabled, render custom var
|
||||
if ($this->connection->settings()->get('feature_custom_endpoint') === 'y') {
|
||||
return c::renderKeyValue(
|
||||
'vars._director_custom_endpoint_name',
|
||||
c::renderPhpValue($this->get('custom_endpoint_name'))
|
||||
);
|
||||
return c::renderKeyValue('vars._director_custom_endpoint_name', c::renderString($value));
|
||||
}
|
||||
|
||||
return '';
|
||||
|
|
Loading…
Reference in New Issue