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