feat(kubernetes): add PVC and PV routes to KubernetesRoutes component; update service name in configmaps

This commit is contained in:
Nawaz Dhandala
2026-03-19 19:29:54 +00:00
parent ff0a2e9c91
commit cef15e5938
3 changed files with 93 additions and 2 deletions

View File

@@ -28,6 +28,10 @@ import KubernetesClusterViewNodes from "../Pages/Kubernetes/View/Nodes";
import KubernetesClusterViewNodeDetail from "../Pages/Kubernetes/View/NodeDetail";
import KubernetesClusterViewContainers from "../Pages/Kubernetes/View/Containers";
import KubernetesClusterViewContainerDetail from "../Pages/Kubernetes/View/ContainerDetail";
import KubernetesClusterViewPVCs from "../Pages/Kubernetes/View/PersistentVolumeClaims";
import KubernetesClusterViewPVCDetail from "../Pages/Kubernetes/View/PVCDetail";
import KubernetesClusterViewPVs from "../Pages/Kubernetes/View/PersistentVolumes";
import KubernetesClusterViewPVDetail from "../Pages/Kubernetes/View/PVDetail";
import KubernetesClusterViewEvents from "../Pages/Kubernetes/View/Events";
import KubernetesClusterViewControlPlane from "../Pages/Kubernetes/View/ControlPlane";
import KubernetesClusterViewDelete from "../Pages/Kubernetes/View/Delete";
@@ -357,6 +361,70 @@ const KubernetesRoutes: FunctionComponent<ComponentProps> = (
}
/>
{/* PVCs */}
<PageRoute
path={RouteUtil.getLastPathForKey(
PageMap.KUBERNETES_CLUSTER_VIEW_PVCS,
)}
element={
<KubernetesClusterViewPVCs
{...props}
pageRoute={
RouteMap[PageMap.KUBERNETES_CLUSTER_VIEW_PVCS] as Route
}
/>
}
/>
<PageRoute
path={RouteUtil.getLastPathForKey(
PageMap.KUBERNETES_CLUSTER_VIEW_PVC_DETAIL,
2,
)}
element={
<KubernetesClusterViewPVCDetail
{...props}
pageRoute={
RouteMap[
PageMap.KUBERNETES_CLUSTER_VIEW_PVC_DETAIL
] as Route
}
/>
}
/>
{/* PVs */}
<PageRoute
path={RouteUtil.getLastPathForKey(
PageMap.KUBERNETES_CLUSTER_VIEW_PVS,
)}
element={
<KubernetesClusterViewPVs
{...props}
pageRoute={
RouteMap[PageMap.KUBERNETES_CLUSTER_VIEW_PVS] as Route
}
/>
}
/>
<PageRoute
path={RouteUtil.getLastPathForKey(
PageMap.KUBERNETES_CLUSTER_VIEW_PV_DETAIL,
2,
)}
element={
<KubernetesClusterViewPVDetail
{...props}
pageRoute={
RouteMap[
PageMap.KUBERNETES_CLUSTER_VIEW_PV_DETAIL
] as Route
}
/>
}
/>
{/* Events */}
<PageRoute
path={RouteUtil.getLastPathForKey(

View File

@@ -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

View File

@@ -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: