Skip to content

Commit 833334a

Browse files
committed
chore: add resource metrics for datum cloud
1 parent d83f412 commit 833334a

5 files changed

Lines changed: 24 additions & 3 deletions

File tree

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
kind: CustomResourceStateMetrics
2+
spec:
3+
resources:
4+
# Creates a generic metric for all resources
5+
- groupVersionKind:
6+
group: compute.datumapis.com
7+
kind: "*"
8+
version: "*"
9+
metricNamePrefix: "datum_cloud_resource"
10+
labelsFromPath:
11+
namespace: [metadata, namespace]
12+
name: [metadata, name]
13+
metrics:
14+
- name: "info"
15+
help: "Information about the resource"
16+
each:
17+
type: Info
18+
info:
19+
labelsFromPath:
20+
uid: [metadata, uid]

config/resource-metrics/instances.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ spec:
55
group: compute.datumapis.com
66
kind: Instance
77
version: v1alpha
8-
metricNamePrefix: "instance"
8+
metricNamePrefix: "datum_cloud_compute_instance"
99
labelsFromPath:
1010
namespace: [metadata, namespace]
1111
name: [metadata, name]

config/resource-metrics/kustomization.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ configMapGenerator:
88
telemetry.datumapis.com/resource-metrics-config: "true"
99

1010
files:
11+
- general.yaml
1112
- instances.yaml
1213
- workload-deployments.yaml
1314
- workloads.yaml

config/resource-metrics/workload-deployments.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ spec:
55
group: compute.datumapis.com
66
kind: WorkloadDeployment
77
version: v1alpha
8-
metricNamePrefix: "workload_deployment"
8+
metricNamePrefix: "datum_cloud_compute_workload_deployment"
99
labelsFromPath:
1010
namespace: [metadata, namespace]
1111
name: [metadata, name]

config/resource-metrics/workloads.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ spec:
55
group: compute.datumapis.com
66
kind: Workload
77
version: v1alpha
8-
metricNamePrefix: "workload"
8+
metricNamePrefix: "datum_cloud_compute_workload"
99
labelsFromPath:
1010
namespace: [metadata, namespace]
1111
name: [metadata, name]

0 commit comments

Comments
 (0)