mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 00:32:12 +02:00
feat(kubernetes): add PVC and PV routes to KubernetesRoutes component; update service name in configmaps
This commit is contained in:
@@ -130,12 +130,30 @@ data:
|
||||
- sources:
|
||||
- from: connection
|
||||
|
||||
# Stamp with cluster name
|
||||
# Stamp with cluster name and default service name
|
||||
resource:
|
||||
attributes:
|
||||
- key: k8s.cluster.name
|
||||
value: {{ .Values.clusterName | quote }}
|
||||
action: upsert
|
||||
- key: service.name
|
||||
value: "kubernetes-agent-{{ .Values.clusterName }}"
|
||||
action: upsert
|
||||
|
||||
# Set service.name from deployment/statefulset/daemonset name when available
|
||||
transform:
|
||||
log_statements:
|
||||
- context: resource
|
||||
statements:
|
||||
- set(attributes["service.name"], attributes["k8s.deployment.name"]) where attributes["k8s.deployment.name"] != nil and attributes["k8s.deployment.name"] != ""
|
||||
- set(attributes["service.name"], attributes["k8s.statefulset.name"]) where attributes["k8s.statefulset.name"] != nil and attributes["k8s.statefulset.name"] != "" and attributes["k8s.deployment.name"] == nil
|
||||
- set(attributes["service.name"], attributes["k8s.daemonset.name"]) where attributes["k8s.daemonset.name"] != nil and attributes["k8s.daemonset.name"] != "" and attributes["k8s.deployment.name"] == nil and attributes["k8s.statefulset.name"] == nil
|
||||
metric_statements:
|
||||
- context: resource
|
||||
statements:
|
||||
- set(attributes["service.name"], attributes["k8s.deployment.name"]) where attributes["k8s.deployment.name"] != nil and attributes["k8s.deployment.name"] != ""
|
||||
- set(attributes["service.name"], attributes["k8s.statefulset.name"]) where attributes["k8s.statefulset.name"] != nil and attributes["k8s.statefulset.name"] != "" and attributes["k8s.deployment.name"] == nil
|
||||
- set(attributes["service.name"], attributes["k8s.daemonset.name"]) where attributes["k8s.daemonset.name"] != nil and attributes["k8s.daemonset.name"] != "" and attributes["k8s.deployment.name"] == nil and attributes["k8s.statefulset.name"] == nil
|
||||
|
||||
batch:
|
||||
send_batch_size: 1024
|
||||
@@ -163,6 +181,7 @@ data:
|
||||
- memory_limiter
|
||||
- k8sattributes
|
||||
- resource
|
||||
- transform
|
||||
- batch
|
||||
exporters:
|
||||
- otlphttp
|
||||
@@ -173,6 +192,7 @@ data:
|
||||
- memory_limiter
|
||||
- k8sattributes
|
||||
- resource
|
||||
- transform
|
||||
- batch
|
||||
exporters:
|
||||
- otlphttp
|
||||
|
||||
@@ -151,12 +151,15 @@ data:
|
||||
- sources:
|
||||
- from: connection
|
||||
|
||||
# Stamp all telemetry with the cluster name
|
||||
# Stamp all telemetry with the cluster name and service name
|
||||
resource:
|
||||
attributes:
|
||||
- key: k8s.cluster.name
|
||||
value: {{ .Values.clusterName | quote }}
|
||||
action: upsert
|
||||
- key: service.name
|
||||
value: "kubernetes-agent-{{ .Values.clusterName }}"
|
||||
action: upsert
|
||||
|
||||
# Batch telemetry for efficient export
|
||||
batch:
|
||||
|
||||
Reference in New Issue
Block a user