diff --git a/entity-types/infra-kubernetes_deployment/definition.yml b/entity-types/infra-kubernetes_deployment/definition.yml index e3f9e7c24..406316fcd 100644 --- a/entity-types/infra-kubernetes_deployment/definition.yml +++ b/entity-types/infra-kubernetes_deployment/definition.yml @@ -7,3 +7,35 @@ goldenTags: - k8s.deploymentName - k8s.clusterName - k8s.namespaceName +synthesis: + rules: + # kube-state-metrics data via opentelemetry prometheusReceiver + - compositeIdentifier: + separator: ":" + attributes: + - k8s.cluster.name + - namespace + - deployment + encodeIdentifierInGUID: true + name: deployment + conditions: + # kube-state-metrics deployment prefix + - attribute: metricName + prefix: kube_deployment_ + # identifier attributes + - attribute: deployment + present: true + - attribute: namespace + present: true + - attribute: k8s.cluster.name + present: true + # open telemetry + - attribute: newrelic.source + value: 'api.metrics.otlp' + # if service.name is present, it's a service + - attribute: service.name + present: false + # value added for test entities only + - attribute: newrelicOnly + value: "true" + diff --git a/entity-types/infra-kubernetes_persistentvolumeclaim/definition.yml b/entity-types/infra-kubernetes_persistentvolumeclaim/definition.yml index 0030f2d6f..f615f47d8 100644 --- a/entity-types/infra-kubernetes_persistentvolumeclaim/definition.yml +++ b/entity-types/infra-kubernetes_persistentvolumeclaim/definition.yml @@ -11,3 +11,34 @@ goldenTags: - k8s.pvcName - k8s.clusterName - k8s.pvcNamespace +synthesis: + rules: + # kube-state-metrics data via opentelemetry prometheusReceiver + - compositeIdentifier: + separator: ":" + attributes: + - k8s.cluster.name + - namespace + - persistentvolumeclaim + encodeIdentifierInGUID: true + name: persistentvolumeclaim + conditions: + # kube-state-metrics persistentvolumeclaim prefix + - attribute: metricName + prefix: kube_persistentvolumeclaim_ + # identifier attributes + - attribute: persistentvolumeclaim + present: true + - attribute: namespace + present: true + - attribute: k8s.cluster.name + present: true + # open telemetry + - attribute: newrelic.source + value: 'api.metrics.otlp' + # if service.name is present, it's a service + - attribute: service.name + present: false + # value added for test entities only + - attribute: newrelicOnly + value: "true" \ No newline at end of file