From a0a812904a10289aacb4c5517f94183c30f28d0d Mon Sep 17 00:00:00 2001 From: Katarzyna Kujawa Date: Thu, 13 Apr 2023 13:48:03 +0200 Subject: [PATCH] fix(otellogs): add option to configure imagePullSecrets for otellogs daemonset --- .changelog/2984.fixed.txt | 1 + .../sumologic/templates/logs/collector/otelcol/daemonset.yaml | 4 ++++ .../testdata/goldenfile/logs_otc_daemonset/complex.input.yaml | 2 ++ .../goldenfile/logs_otc_daemonset/complex.output.yaml | 2 ++ 4 files changed, 9 insertions(+) create mode 100644 .changelog/2984.fixed.txt diff --git a/.changelog/2984.fixed.txt b/.changelog/2984.fixed.txt new file mode 100644 index 0000000000..a8ae8515b8 --- /dev/null +++ b/.changelog/2984.fixed.txt @@ -0,0 +1 @@ +fix(otellogs): configure imagePullSecrets for otellogs daemonset \ No newline at end of file diff --git a/deploy/helm/sumologic/templates/logs/collector/otelcol/daemonset.yaml b/deploy/helm/sumologic/templates/logs/collector/otelcol/daemonset.yaml index aa382ccdd5..ae44c830dc 100644 --- a/deploy/helm/sumologic/templates/logs/collector/otelcol/daemonset.yaml +++ b/deploy/helm/sumologic/templates/logs/collector/otelcol/daemonset.yaml @@ -67,6 +67,10 @@ spec: {{- else }} priorityClassName: {{ include "sumologic.metadata.name.priorityclass" $ctx | quote }} {{- end }} +{{- if $.Values.sumologic.pullSecrets }} + imagePullSecrets: +{{ toYaml $.Values.sumologic.pullSecrets | indent 8 }} +{{- end }} containers: - args: - --config=/etc/otelcol/config.yaml diff --git a/tests/helm/testdata/goldenfile/logs_otc_daemonset/complex.input.yaml b/tests/helm/testdata/goldenfile/logs_otc_daemonset/complex.input.yaml index 4809eac513..4dbad4daca 100644 --- a/tests/helm/testdata/goldenfile/logs_otc_daemonset/complex.input.yaml +++ b/tests/helm/testdata/goldenfile/logs_otc_daemonset/complex.input.yaml @@ -3,6 +3,8 @@ sumologic: collector: otelcol: enabled: true + pullSecrets: + - name: myRegistryKeySecretName fluent-bit: enabled: false diff --git a/tests/helm/testdata/goldenfile/logs_otc_daemonset/complex.output.yaml b/tests/helm/testdata/goldenfile/logs_otc_daemonset/complex.output.yaml index 1df9bd47b0..7c9349ee18 100644 --- a/tests/helm/testdata/goldenfile/logs_otc_daemonset/complex.output.yaml +++ b/tests/helm/testdata/goldenfile/logs_otc_daemonset/complex.output.yaml @@ -41,6 +41,8 @@ spec: runAsGroup: 0 runAsUser: 0 priorityClassName: "prio" + imagePullSecrets: + - name: myRegistryKeySecretName containers: - args: - --config=/etc/otelcol/config.yaml