From 7cdd7af6a49d815874c0a0f4ad58e88713dae04f Mon Sep 17 00:00:00 2001 From: Mili Date: Thu, 6 Aug 2026 10:49:34 +0200 Subject: [PATCH] Revert "Revert "Replicaset namespace relationship (#3119)" (#3130)" This reverts commit 5f1cbdf9614a25ba7526b58e67b7f76995387ce2. --- ...ACE-to-INFRA-KUBERNETES_REPLICASET.stg.yml | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 relationships/synthesis/INFRA-KUBERNETES_NAMESPACE-to-INFRA-KUBERNETES_REPLICASET.stg.yml diff --git a/relationships/synthesis/INFRA-KUBERNETES_NAMESPACE-to-INFRA-KUBERNETES_REPLICASET.stg.yml b/relationships/synthesis/INFRA-KUBERNETES_NAMESPACE-to-INFRA-KUBERNETES_REPLICASET.stg.yml new file mode 100644 index 000000000..7a7b6088e --- /dev/null +++ b/relationships/synthesis/INFRA-KUBERNETES_NAMESPACE-to-INFRA-KUBERNETES_REPLICASET.stg.yml @@ -0,0 +1,62 @@ +relationships: + - name: k8sNamespaceContainsReplicaSet + version: "1" + origins: + - Kubernetes Integration + conditions: + - attribute: eventType + anyOf: [ "K8sReplicasetSample" ] + - attribute: entityGuid + present: true + - attribute: namespaceName + present: true + - attribute: clusterName + present: true + - attribute: podsDesired + regex: "^[1-9][0-9]*$" + relationship: + expires: PT75M + relationshipType: CONTAINS + source: + lookupGuid: + candidateCategory: KUBERNETES_NAMESPACE + fields: + - field: k8s.clusterName + attribute: clusterName + - field: k8s.namespaceName + attribute: namespaceName + target: + extractGuid: + attribute: entityGuid + entityType: + value: KUBERNETES_REPLICASET + - name: otelKsmK8sNamespaceContainsReplicaSet + # use kube-state-metrics kube_replicaset_owner + version: "1" + origins: + - OpenTelemetry + conditions: + - attribute: metricName + anyOf: [ "kube_replicaset_owner" ] + relationship: + expires: PT75M + relationshipType: CONTAINS + source: + buildGuid: + account: + lookup: true + domain: + value: INFRA + type: + value: KUBERNETES_NAMESPACE + identifier: + fragments: + - attribute: k8s.cluster.name + - value: ":" + - attribute: k8s.namespace.name + hashAlgorithm: FARM_HASH + target: + extractGuid: + attribute: entity.guid + entityType: + value: KUBERNETES_REPLICASET \ No newline at end of file