- Introduced log ingestion configuration in values files for centralStorage, content, notification, and payment services. - Updated deployment templates to conditionally include OpenTelemetry annotations and volume mounts based on log ingestion settings. - Added OpenTelemetry RBAC configurations for service accounts and cluster roles to enable logging. - Implemented OpenTelemetry collector configuration to process logs and export them to Loki. - Ensured compatibility with existing Helm chart structure and maintained backward compatibility for services without log ingestion enabled. Signed-off-by: zhenyus <zhenyus@mathmast.com>
46 lines
953 B
YAML
46 lines
953 B
YAML
{{- if .Values.logIngest.enabled }}
|
|
---
|
|
apiVersion: v1
|
|
kind: ServiceAccount
|
|
metadata:
|
|
name: {{ .Release.Name }}-otel-collector
|
|
namespace: {{ .Release.Namespace }}
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: ClusterRole
|
|
metadata:
|
|
name: {{ .Release.Name }}-otel-collector
|
|
rules:
|
|
- apiGroups: [""]
|
|
resources:
|
|
- pods
|
|
- namespaces
|
|
- nodes
|
|
verbs:
|
|
- get
|
|
- watch
|
|
- list
|
|
- apiGroups: ["apps"]
|
|
resources:
|
|
- replicasets
|
|
- deployments
|
|
- statefulsets
|
|
- daemonsets
|
|
verbs:
|
|
- get
|
|
- watch
|
|
- list
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: ClusterRoleBinding
|
|
metadata:
|
|
name: {{ .Release.Name }}-otel-collector
|
|
roleRef:
|
|
apiGroup: rbac.authorization.k8s.io
|
|
kind: ClusterRole
|
|
name: {{ .Release.Name }}-otel-collector
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: {{ .Release.Name }}-otel-collector
|
|
namespace: {{ .Release.Namespace }}
|
|
{{- end }} |