Giovanni Tirloni | 52306ad | 2024-04-12 15:35:05 -0300 | [diff] [blame] | 1 | {{- if not .Values.loki.existingSecretForConfig -}} |
| 2 | apiVersion: v1 |
| 3 | {{- if eq .Values.loki.configStorageType "Secret" }} |
| 4 | kind: Secret |
| 5 | {{- else }} |
| 6 | kind: ConfigMap |
| 7 | {{- end }} |
| 8 | metadata: |
| 9 | name: {{ tpl .Values.loki.externalConfigSecretName . }} |
| 10 | namespace: {{ $.Release.Namespace }} |
| 11 | labels: |
| 12 | {{- include "loki.labels" . | nindent 4 }} |
| 13 | {{- if eq .Values.loki.configStorageType "Secret" }} |
| 14 | data: |
| 15 | config.yaml: {{ include "loki.calculatedConfig" . | b64enc }} |
| 16 | {{- else }} |
| 17 | data: |
| 18 | config.yaml: | |
| 19 | {{ include "loki.calculatedConfig" . | nindent 4 }} |
| 20 | {{- end -}} |
| 21 | {{- end }} |