From b3259641fddb77ef7dee708f5fdf467313a1daec Mon Sep 17 00:00:00 2001 From: Aditya Thebe Date: Mon, 8 Jan 2024 18:16:12 +0545 Subject: [PATCH] chore: cleanup --- scrapers/kubernetes/kubernetes.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/scrapers/kubernetes/kubernetes.go b/scrapers/kubernetes/kubernetes.go index 08511d7d..6217d53b 100644 --- a/scrapers/kubernetes/kubernetes.go +++ b/scrapers/kubernetes/kubernetes.go @@ -114,10 +114,6 @@ func (kubernetes KubernetesScraper) Scrape(ctx api.ScrapeContext) v1.ScrapeResul }) } - // If there's a "aws-node" pod from aws-node daemon set - // - extract AWS_ROLE_ARN env and link the node the pod is running on to that EKS::IAM:role - // - extract VPC_ID and add it the Kubernetes::node, and Kubernetes::Cluster as labels and relationships - // - extract CLUSTER_NAME and add it Kubernetes::Cluster as spec, and link to Kubernetes::Cluster to AWS::EKS Cluster on cluster name and account id if obj.GetLabels()["app.kubernetes.io/name"] == "aws-node" { for _, ownerRef := range obj.GetOwnerReferences() { if ownerRef.Kind == "DaemonSet" && ownerRef.Name == "aws-node" { @@ -303,10 +299,8 @@ func (kubernetes KubernetesScraper) Scrape(ctx api.ScrapeContext) v1.ScrapeResul } if obj.GetKind() == "ConfigMap" && obj.GetName() == "aws-auth" { - // If there is a aws-auth cm, then insert its contents into the cluster JSON at aws-auth cm, ok := obj.Object["data"].(map[string]any) if ok { - // Extract the account ID from the roles var accountID string if mapRolesYAML, ok := cm["mapRoles"].(string); ok { accountID = extractAccountIDFromARN(mapRolesYAML)