fluent / fluent-operator

Operate Fluent Bit and Fluentd in the Kubernetes way - Previously known as FluentBit Operator
Apache License 2.0
587 stars 250 forks source link

bug: influxdb host configured as ipv6 type, not accepting hostname #1359

Closed EvgenyAsocs closed 1 month ago

EvgenyAsocs commented 1 month ago

Describe the issue

influxDB.host field in ClusterOutput CRD define as type: ipv6. The restriction does not allow to use ipv4 or hostname in the field

To Reproduce

install fluent-operator with Helm Chart, try to apply ClusterOutput CRD:

*apiVersion: fluentbit.fluent.io/v1alpha2 kind: ClusterOutput metadata:    name: influx    namespace: fluent-operator    labels:      fluentbit.fluent.io/enabled: "true"      fluentbit.fluent.io/component: logging spec:    match: ""    influxDB:      host: 'influx.default.svc.cluster.local'      port: 8086      bucket: data1      org: default      httpToken:        valueFrom:          secretKeyRef:            key: influxdb-token      tagKeys:        - ipaddr        - unit-uuid        - unit-type        - unit-id        - pi-type        - pi-id      sequenceTag: "off"**

Expected behavior

ClusterOutput CRD would be created, but error is thrown: The ClusterOutput "influx" is invalid: spec.influxDB.host: Invalid value: "influx.default.svc.cluster.local": spec.influxDB.host in body must be of type ipv6: "influx.default.svc.cluster.local"

Your Environment

- Fluent Operator version: 3.2.0
- Container Runtime: cri-o
- Operating system: Rocky 9
- Kernel version: 5.14.0-427.13.1

How did you install fluent operator?

helm install -f custom-fluent.yaml fluent-operator -n fluent-operator https://github.com/fluent/fluent-operator/releases/download/v3.2.0/fluent-operator.tgz

custom-fluent.yaml: containerRuntime: crio fluentbit: crdsEnable: true    enable: true    additionalVolumes:      - name: file-output-node      hostPath:      path: /tmp/fluent-logs   additionalVolumesMounts:    - mountPath: /tmp/fluent-logs      mountPropagation: HostToContainer      name: file-output-node

Additional context

No response