{{/* Optional log-shipper sidecar for Redis / RabbitMQ / Database pods. Requires .workloadName, .workloadType (redis|rabbitmq|database), and root context . */}} {{- define "cloudhost-app.logShipperContainers" -}} {{- if .root.Values.elasticsearch.enabled }} - name: log-shipper image: {{ include "cloudhost-app.baseImage" (dict "root" .root "image" "fluent/fluent-bit:2.2") }} resources: requests: cpu: "10m" memory: "32Mi" limits: cpu: "50m" memory: "64Mi" volumeMounts: - name: varlogpods mountPath: /var/log/pods readOnly: true - name: log-shipper-config mountPath: /fluent-bit/etc env: - name: ES_HOST value: "elasticsearch.logging.svc.cluster.local" - name: ES_PORT value: "9200" - name: ES_PASSWORD valueFrom: secretKeyRef: name: elasticsearch-credentials key: ELASTIC_PASSWORD optional: true {{- end }} {{- end }} {{- define "cloudhost-app.logShipperVolumes" -}} {{- if .root.Values.elasticsearch.enabled }} - name: varlogpods hostPath: path: /var/log/pods type: Directory - name: log-shipper-config configMap: name: {{ .workloadName }}-log-shipper-config {{- end }} {{- end }}