mirror of
https://github.com/coollabsio/coolify.git
synced 2026-11-06 13:10:37 -04:00
fix(log-drain): send Coolify labels to Fluent Bit drains
Containers without the Coolify default variables sent no project, environment, or service to the drain. The fluentd driver now also sends the Coolify container labels; the built-in configs use them as a fallback and add coolify.service_name. Closes #8415 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
b83b97f7e6
commit
8d07d178f0
@@ -75,3 +75,11 @@ it('reports CloudWatch as an enabled drain that does not use Fluent Bit', functi
|
||||
->and($axiom->isLogDrainEnabled())->toBeTrue()
|
||||
->and($axiom->isFluentBitLogDrainEnabled())->toBeTrue();
|
||||
});
|
||||
|
||||
it('sends the Coolify labels with fluentd, so containers without the default variables are identified', function () {
|
||||
$server = serverWithLogDrainSettings(['is_logdrain_custom_enabled' => true]);
|
||||
|
||||
expect(generate_log_drain_configuration($server)['options'])
|
||||
->toHaveKey('env', 'COOLIFY_APP_NAME,COOLIFY_PROJECT_NAME,COOLIFY_SERVER_IP,COOLIFY_ENVIRONMENT_NAME')
|
||||
->toHaveKey('labels', 'coolify.projectName,coolify.environmentName,coolify.resourceName,coolify.serviceName');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user