fluent / fluent/fluent-operator

bug: FluentD containerports are only opened for http and forward input plugins

Open
#1,610 2 comments 1 reaction 0 assignees View on GitHub
enhancement
Dominant language
Go
Stars
682
Forks
328
Avg merge
2d 23h
Merged PRs (30d)
13

Description

# Problem
ContainerPorts for fluentd are only opened for the http and forward plugins configured in spec.globalInputs.
This makes any other fluentd input plugin unuseable.

### To Reproduce

```
apiVersion: fluentd.fluent.io/v1alpha1
kind: Fluentd
metadata:
name: fluentd
namespace: fluentd
labels:
app.kubernetes.io/name: fluentd
spec:
globalInputs:
- id: in_http
http:
bind: 0.0.0.0
port: 9880
- id: in_syslog
customPlugin:
config: |

@type syslog
@id in_syslog
tag foo
port 5140
bind 0.0.0.0

...
```

Will create a fluentd container with ports `metrics:2021,http:9880`.
The customPlugin port (or any other input plugins) are not being created.

### Expected behavior

Container has open ports for every configured input plugin or the fluentd CRD allows to specify ports like the fluentbit CRD.

### Your Environment

```markdown
- Fluent Operator version: v3.3
```

### How did you install fluent operator?

_No response_

### Additional context

# Code-References
It looks like that the containerPorts are statically coded to be only useable by the forward and http plugin.
- https://github.com/fluent/fluent-operator/blob/master/pkg/operator/sts.go#L211
- https://github.com/fluent/fluent-operator/blob/master/pkg/operator/sts.go#L221

# Other issues which are correlated to this
- The inputs.fluentd.fluent.io CRD is also not opening ports.

# Contribution
With some guidance I am also open to make a contribution.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.