-
Notifications
You must be signed in to change notification settings - Fork 309
Description
Describe the issue
The current operator code does not allow setting multiple forward or http inputs inside a single Fluentd sts, since the name conflicts.
Specifically the issue seems to be here:
ports = append(ports, corev1.ContainerPort{
Name: DefaultForwardName,
ContainerPort: forwardPort,
Protocol: corev1.ProtocolTCP,
})
Since DefaultForwardName is harcoded, the operator has the error "StatefulSet.apps \"fluentd\" is invalid: spec.template.spec.containers[0].ports[2].name: Duplicate value: \"forward\"".
To Reproduce
Set the globalInputs inside the Fluentd like so:
globalInputs:
- forward:
bind: 0.0.0.0
port: 24224
addTagPrefix: alpha
- forward:
bind: 0.0.0.0
port: 25224
addTagPrefix: beta
Expected behavior
Its expected that the operator will allow multiple http / forward inputs on different ports.
The simple solution can be adding the port number to the port name as a suffix, for example, forward-25224. (also for the Service created).
This can be a breaking change depending on the user implementation, and might be mitigated by keeping the name the same if http / forward exists only once.
Your Environment
- Fluent Operator version: 3.5.0Workaround
The workaround is to create a separate Fluentd deployment for the new pipeline, or find another way to differentiate the records other than the input port.
How did you install fluent operator?
helm
Additional context
No response