Files
cloud-host/backend/helm/cloudhost-app/templates/_log-shipper.tpl
T
keyhan 35dd771f63 Add unified logs platform with Helm-managed central Elasticsearch.
Deploy cloudhost-logging on cluster registration, ship app and optional service logs to ES with owner isolation, and fix Kibana 8.12 auth via kibana_system.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-15 15:56:33 +03:30

47 lines
1.1 KiB
Smarty

{{/*
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: 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 }}