-
Notifications
You must be signed in to change notification settings - Fork 359
Description
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:
logging-operator/pkg/resources/fluentd/statefulset.go
Lines 389 to 390 in e183d85
| 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