Merge "[AAI] Make aai log level configurable"
[oom.git] / kubernetes / common / common / templates / _log.tpl
index 3ae536a..993c482 100644 (file)
@@ -17,7 +17,7 @@
 {{- define "common.log.sidecar" -}}
 {{- if .Values.global.centralizedLoggingEnabled }}
 - name: {{ include "common.name" . }}-filebeat
-  image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
+  image: {{ include "repositoryGenerator.image.logging" . }}
   imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
   volumeMounts:
   - name: filebeat-conf
     mountPath: {{ .Values.log.path }}
   - name: filebeat-data
     mountPath: /usr/share/filebeat/data
+  resources:
+    requests:
+      cpu: "10m"
+      memory: "5Mi"
+    limits:
+      cpu: "100m"
+      memory: "20Mi"
 {{- end -}}
 {{- end -}}
 
 {{- define "common.log.volumes" -}}
-{{- if .Values.global.centralizedLoggingEnabled }}
+{{- $dot := default . .dot }}
+{{- if $dot.Values.global.centralizedLoggingEnabled }}
+{{- $configMapName := printf "%s-filebeat" (default (include "common.fullname" $dot) .configMapNamePrefix) }}
 - name: filebeat-conf
   configMap:
-    name: {{ include "common.fullname" . }}-filebeat
+    name: {{ $configMapName }}
 - name: filebeat-data
   emptyDir: {}
 {{- end -}}