Skip to content

bug: ClusterOutput.fluentbit.fluent.io "es" is invalid while upgrading from 3.3.0 to 3.4.x #1674

@jnow-neuro

Description

@jnow-neuro

Describe the issue

While upgrading chart from version 3.3.0 to 3.4.0/3.4.2 i encountered an issue with elasticsearch cluster output specification:

ClusterOutput.fluentbit.fluent.io "es" is invalid: [spec.es.httpUser: Invalid value: "string": spec.es.httpUser in body must be of type object: "string", spec.es.httpPassword: Invalid value: "string": spec.es.httpPassword in body must be of type object: "string"]

My output configuration in values:

      es:
        enable: true
        traceError: true
        host: "elastic.host"
        port: 443
        enableTLS: true
        suppressTypeName: "On"
        logstashFormat: false
        tls:
          verify: Off
        httpUser: 
          valueFrom:
            secretKeyRef:
              key: elasticsearchUser
              name: fluent-operator
        httpPassword:
          valueFrom:
            secretKeyRef:
              key: elasticsearchPassword
              name: fluent-operator

Desired object showed in argo:

kind: ClusterOutput
metadata:
  labels:
    app.kubernetes.io/instance: fluent
    fluentbit.fluent.io/component: logging
    fluentbit.fluent.io/enabled: 'true'
  name: es
spec:
  es:
    bufferSize: 20MB
    generateID: true
    host: elastic.host
    httpPassword: >-
      map[valueFrom:map[secretKeyRef:map[key:elasticsearchPassword
      name:fluent-operator]]]
    httpUser: >-
      map[valueFrom:map[secretKeyRef:map[key:elasticsearchUser
      name:fluent-operator]]]
    index: k8s-test
    logstashFormat: true
    logstashPrefix: k8s-test
    port: 443
    replaceDots: false
    suppressTypeName: 'On'
    timeKey: '@timestamp'
    traceError: true
    writeOperation: create
  matchRegex: (?:kube|service)\.(.*)

I checked CRD and found out that httpUser/httpPassword should be an object instead of string. It looks like changes from #1555 broke this.

To Reproduce

Render fluent-operator using helm

Expected behavior

Specification should be followed by template renders.

Your Environment

- Fluent Operator version: 3.4.2
- Container Runtime:
- Operating system:
- Kernel version:

How did you install fluent operator?

via ArgoCD

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions