Skip to content

Renaming the default Fluentd buffer PVC #1368

@cbuto

Description

@cbuto

Is your feature request related to a problem? Please describe.
When deploying the logging-operator in GCP using the GCP CSI driver, its possible to run into limitations due to the default name of the Fluentd buffer PVC.

Example error from the CSI driver:

...
failed to insert zonal disk: unknown Insert disk error: googleapi: Error 400: Invalid value for field 'resource.labels': ''. Label value 'logging-operator-logging-fluentd-buffer-logging-operator-logging-fluentd-0' violates format constraints. The value can only contain lowercase letters, numeric characters, underscores and dashes. The value can be at most 63 characters long. International characters are allowed., invalid
...

Unfortunately, its not possible to override this name like:

bufferStorageVolume:
  pvc:
    source:
      # update the name here
      claimName: buf
    spec:
      accessModes:
        - ReadWriteOnce
      resources:
        requests:
          storage: 10Gi
      volumeMode: Filesystem

This is because updating the claimName results in an error in the statefulset when the buffer-metrics-sidecar is enabled:

 "logging-operator-logging-fluentd-0" is invalid: spec.containers[2].volumeMounts[0].name: Not found: "logging-operator-logging-fluentd-buffer"

I believe this is because that volumeMount name is hardcoded to the default of fluentd-buffer:

Name: r.Logging.QualifiedName(v1beta1.DefaultFluentdBufferStorageVolumeName),
MountPath: bufferPath,

Describe the solution you'd like
When the fluentd.bufferStorageVolume.pvc.source.claimName name is set, the buffer metrics sidecar container should be updated to use the new volume mount name.

Describe alternatives you've considered
N/A

Additional context
Somewhat related to #1327

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions