diff --git a/templates/fluentbit-logs/daemonset.yaml b/templates/fluentbit-logs/daemonset.yaml index e384fc6c995b686a734617d7b0785454eadeb44e..017c9d67f349cb80dcf001ef334342da101de417 100644 --- a/templates/fluentbit-logs/daemonset.yaml +++ b/templates/fluentbit-logs/daemonset.yaml @@ -64,6 +64,6 @@ spec: path: /etc/machine-id type: File {{- if .Values.logs.fluentbit.extraVolumes }} - {{- toYaml .Values.logs.fluentbit.extraVolumes | nindent 4 }} + {{- toYaml .Values.logs.fluentbit.extraVolumes | nindent 8 }} {{- end }} {{- end -}} diff --git a/templates/fluentbit-metrics/statefulset.yaml b/templates/fluentbit-metrics/statefulset.yaml index 0cb8f8c98077a23f44002b36a43ad5f08e6e7021..a967d7695be004ccb48084c1502388b0b7734bb0 100644 --- a/templates/fluentbit-metrics/statefulset.yaml +++ b/templates/fluentbit-metrics/statefulset.yaml @@ -59,6 +59,6 @@ spec: emptyDir: sizeLimit: {{ .Values.metrics.fluentbit.diskMaxCache }} {{- if .Values.metrics.fluentbit.extraVolumes }} - {{- toYaml .Values.metrics.fluentbit.extraVolumes | nindent 4 }} + {{- toYaml .Values.metrics.fluentbit.extraVolumes | nindent 8 }} {{- end }} {{- end }} diff --git a/tests/fluentbit-logs/daemonset.yaml b/tests/fluentbit-logs/daemonset.yaml index d16a6537c8f96cee5c29ccb4c299449ee98663a6..e493ee1e23964d2ed7203783b13f9894130ee77a 100644 --- a/tests/fluentbit-logs/daemonset.yaml +++ b/tests/fluentbit-logs/daemonset.yaml @@ -36,16 +36,26 @@ tests: apiVersion: "apps/v1" name: it-monit-logs-collector-fluentbit not: true - - it: should deploy extra volume mounts if configured + - it: should deploy extra volumes and volume mounts if configured set: logs.enabled: true logs.fluentbit.enabled: true logs.fluentbit.extraVolumeMounts: - name: test mountPath: /test + logs.fluentbit.extraVolumes: + - name: test + configMap: + name: test-configmap asserts: - contains: path: spec.template.spec.containers[0].volumeMounts content: name: test mountPath: /test + - contains: + path: spec.template.spec.volumes + content: + name: test + configMap: + name: test-configmap diff --git a/tests/fluentbit-metrics/statefulset.yaml b/tests/fluentbit-metrics/statefulset.yaml index 597d557fc3388af0f3e422cf7733eb60094ae9af..b5fdafd300ab7b6202e1e556fcf46204724e09e8 100644 --- a/tests/fluentbit-metrics/statefulset.yaml +++ b/tests/fluentbit-metrics/statefulset.yaml @@ -27,16 +27,26 @@ tests: apiVersion: "apps/v1" name: it-monit-metrics-collector-fluentbit not: true - - it: should deploy extra volume mounts if configured + - it: should deploy extra volumes and volume mounts if configured set: metrics.enabled: true metrics.fluentbit.enabled: true metrics.fluentbit.extraVolumeMounts: - name: test mountPath: /test + metrics.fluentbit.extraVolumes: + - name: test + configMap: + name: test-configmap asserts: - contains: path: spec.template.spec.containers[0].volumeMounts content: name: test mountPath: /test + - contains: + path: spec.template.spec.volumes + content: + name: test + configMap: + name: test-configmap