Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions relationships/candidates/KUBERNETES_POD.stg.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
category: KUBERNETES_POD
lookups:
- entityTypes:
- domain: INFRA
type: KUBERNETES_POD
tags:
matchingMode: ALL
predicates:
- tagKeys: ["k8s.namespaceName", "k8s.namespace.name"]
field: k8s.namespaceName
- tagKeys: ["k8s.clusterName", "k8s.cluster.name"]
field: k8s.clusterName
- tagKeys: ["k8s.deploymentName", "k8s.deployment.name"]
field: k8s.deploymentName
onMatch:
onMultipleMatches: RELATE_ALL
onMiss:
action: NO_OP
- entityTypes:
- domain: INFRA
type: KUBERNETES_POD
tags:
matchingMode: ALL
predicates:
- tagKeys: ["k8s.namespaceName", "k8s.namespace.name"]
field: k8s.namespaceName
- tagKeys: ["k8s.clusterName", "k8s.cluster.name"]
field: k8s.clusterName
- tagKeys: ["k8s.nodeName", "k8s.node.name"]
field: k8s.nodeName
onMatch:
onMultipleMatches: RELATE_ALL
onMiss:
action: NO_OP
- entityTypes:
- domain: INFRA
type: KUBERNETES_POD
tags:
matchingMode: ALL
predicates:
- tagKeys: ["k8s.clusterName", "k8s.cluster.name"]
field: k8s.clusterName
- tagKeys: ["k8s.namespaceName", "k8s.namespace.name"]
field: k8s.namespaceName
- tagKeys: ["k8s.podName", "k8s.pod.name"]
field: k8s.podName
onMatch:
onMultipleMatches: RELATE_ALL
onMiss:
action: NO_OP
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ relationships:
lookupGuid:
candidateCategory: KUBERNETES_POD
fields:
- field: k8s.node.name # node name of host
- field: k8s.nodeName # node name of host
attribute: host.name # node name of pod
- field: k8s.namespace.name # namespace of host
- field: k8s.namespaceName # namespace of host
attribute: k8s.namespace.name # namespace of pod
- field: k8s.cluster.name # cluster of host
- field: k8s.clusterName # cluster of host
attribute: k8s.cluster.name # cluster of pod
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
relationships:
- name: k8sDeploymentManagesPodStg
version: "1"
origins:
- Kubernetes Integration
conditions:
- attribute: eventType
anyOf: [ "K8sPodSample" ]
relationship:
expires: PT75M
relationshipType: MANAGES
source:
buildGuid:
account:
lookup: true
domain:
value: INFRA
type:
value: KUBERNETES_DEPLOYMENT
valueInGuid: NA
identifier:
fragments:
- value: "k8s:"
- attribute: clusterName
- value: ":"
- attribute: namespaceName
- value: ":deployment:"
- attribute: deploymentName
hashAlgorithm: FARM_HASH
target:
extractGuid:
attribute: entityGuid
entityType:
value: KUBERNETES_POD
- name: otelKsmK8sDeploymentManagesPodStg
# use kube-state-metrics kube_deployment_status_condition metric
version: "1"
origins:
- OpenTelemetry
conditions:
- attribute: metricName
anyOf: [ "kube_deployment_status_condition" ]
relationship:
expires: PT2H
relationshipType: MANAGES
source:
extractGuid:
attribute: entity.guid
target:
lookupGuid:
candidateCategory: KUBERNETES_POD
fields:
- field: k8s.deploymentName # deployment name of deployment
attribute: k8s.deployment.name # deployment of pod
- field: k8s.namespaceName # namespace of deployment
attribute: k8s.namespace.name # namespace of pod
- field: k8s.clusterName # cluster of deployment
attribute: k8s.cluster.name # cluster of pod
51 changes: 51 additions & 0 deletions relationships/synthesis/INFRA-KUBERNETES_POD-to-EXT-ARGOCD.stg.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
relationships:
- name: k8sPodContainsExtArgocdStg
version: "1"
origins:
- Prometheus
conditions:
- attribute: metricName
startsWith: argocd_
- attribute: cluster_name
present: true
relationship:
expires: PT75M
relationshipType: CONTAINS
source:
lookupGuid:
candidateCategory: KUBERNETES_POD
fields:
- field: k8s.clusterName
attribute: cluster_name
- field: k8s.namespaceName
attribute: namespace
- field: k8s.podName
attribute: pod
target:
extractGuid:
attribute: entity.guid
- name: k8sPodContainsExtArgocdOtelStg
version: "1"
origins:
- OpenTelemetry
conditions:
- attribute: metricName
startsWith: argocd_
- attribute: k8s.cluster.name
present: true
relationship:
expires: PT75M
relationshipType: CONTAINS
source:
lookupGuid:
candidateCategory: KUBERNETES_POD
fields:
- field: k8s.clusterName
attribute: k8s.cluster.name
- field: k8s.namespaceName
attribute: k8s.namespace.name
- field: k8s.podName
attribute: k8s.pod.name
target:
extractGuid:
attribute: entity.guid
51 changes: 51 additions & 0 deletions relationships/synthesis/INFRA-KUBERNETES_POD-to-EXT-CALICO.stg.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
relationships:
- name: k8sPodContainsExtCalicoStg
version: "1"
origins:
- Prometheus
conditions:
- attribute: metricName
startsWith: felix_
- attribute: cluster_name
present: true
relationship:
expires: PT75M
relationshipType: CONTAINS
source:
lookupGuid:
candidateCategory: KUBERNETES_POD
fields:
- field: k8s.clusterName
attribute: cluster_name
- field: k8s.namespaceName
attribute: namespace
- field: k8s.podName
attribute: pod
target:
extractGuid:
attribute: entity.guid
- name: k8sPodContainsExtCalicoOtelStg
version: "1"
origins:
- OpenTelemetry
conditions:
- attribute: metricName
startsWith: felix_
- attribute: k8s.cluster.name
present: true
relationship:
expires: PT75M
relationshipType: CONTAINS
source:
lookupGuid:
candidateCategory: KUBERNETES_POD
fields:
- field: k8s.clusterName
attribute: k8s.cluster.name
- field: k8s.namespaceName
attribute: k8s.namespace.name
- field: k8s.podName
attribute: k8s.pod.name
target:
extractGuid:
attribute: entity.guid
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
relationships:
- name: k8sPodContainsExtCorednsStg
version: "1"
origins:
- Prometheus
conditions:
- attribute: metricName
startsWith: coredns_
- attribute: cluster_name
present: true
relationship:
expires: PT75M
relationshipType: CONTAINS
source:
lookupGuid:
candidateCategory: KUBERNETES_POD
fields:
- field: k8s.clusterName
attribute: cluster_name
- field: k8s.namespaceName
attribute: namespace
- field: k8s.podName
attribute: pod
target:
extractGuid:
attribute: entity.guid
- name: k8sPodContainsExtCorednsOtelStg
version: "1"
origins:
- OpenTelemetry
conditions:
- attribute: metricName
startsWith: coredns_
- attribute: k8s.cluster.name
present: true
relationship:
expires: PT75M
relationshipType: CONTAINS
source:
lookupGuid:
candidateCategory: KUBERNETES_POD
fields:
- field: k8s.clusterName
attribute: k8s.cluster.name
- field: k8s.namespaceName
attribute: k8s.namespace.name
- field: k8s.podName
attribute: k8s.pod.name
target:
extractGuid:
attribute: entity.guid
59 changes: 59 additions & 0 deletions relationships/synthesis/INFRA-KUBERNETES_POD-to-EXT-ENVOY.stg.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
relationships:
- name: k8sPodContainsExtEnvoyStg
version: "1"
origins:
- Prometheus
conditions:
- attribute: metricName
startsWith: envoy_
- attribute: instrumentation.provider
anyOf: ["prometheus"]
- attribute: cluster_name
present: true
- attribute: gateway_envoyproxy_io_owning_gateway_name
present: true
relationship:
expires: PT75M
relationshipType: CONTAINS
source:
lookupGuid:
candidateCategory: KUBERNETES_POD
fields:
- field: k8s.clusterName
attribute: cluster_name
- field: k8s.namespaceName
attribute: namespace
- field: k8s.podName
attribute: pod
target:
extractGuid:
attribute: entity.guid
- name: k8sPodContainsExtEnvoyOtelStg
version: "1"
origins:
- OpenTelemetry
conditions:
- attribute: metricName
startsWith: envoy_
- attribute: instrumentation.provider
anyOf: ["opentelemetry"]
- attribute: k8s.cluster.name
present: true
- attribute: k8s.pod.label.gateway.envoyproxy.io/owning-gateway-name
present: true
relationship:
expires: PT75M
relationshipType: CONTAINS
source:
lookupGuid:
candidateCategory: KUBERNETES_POD
fields:
- field: k8s.clusterName
attribute: k8s.cluster.name
- field: k8s.namespaceName
attribute: k8s.namespace.name
- field: k8s.podName
attribute: k8s.pod.name
target:
extractGuid:
attribute: entity.guid
Loading
Loading