turbonomic / kubeturbo

140 stars 75 forks source link

[TRB-45217] Add a new stitching attribute to kubeturbo discovered services #917

Closed SumanthKodali999 closed 1 year ago

SumanthKodali999 commented 1 year ago

Intent

Sample:

entityProperties {
    namespace: "DEFAULT"
    name: "KUBE_SYSTEM_UUID"
    value: "a67de843-6515-4dbe-9b7b-e3b148947282"
  },
  entityProperties {
    namespace: "DEFAULT"
    name: "SERVICE_NAMESPACE"
    value: "applications"
  },
  entityProperties {
    namespace: "DEFAULT"
    name: "SERVICE_NAME"
    value: "nodeport-dyna-tomcat"
  },
entityProperties {
    namespace: "DEFAULT"
    name: "DYNATRACE_SERVICE_ID"
    value: "a67de843-6515-4dbe-9b7b-e3b148947282-applications-nodeport-dyna-tomcat"
  }

Background

Changes are as follows

Testing

Entity properties in the discovery response Screenshot 2023-08-10 at 1 17 36 PM

Discovery successful Screenshot 2023-08-10 at 1 18 39 PM

Topology Dump Entity Properties Screenshot 2023-08-15 at 5 11 14 PM

Checklist

These are the items that must be done by the developer and by reviewers before the change is ready to merge. Please strikeout any items that are not applicable, but don't delete them

Audience

(@ mention any review/... groups or people that should be aware of this merge request)

SumanthKodali999 commented 1 year ago

Due to the constraints in Go related to mocking objects through interface definitions, It will be challenging to mock certain concrete types such as *ClusterScraper(GetKubernetesServiceID)within the BuildDTOs function for unit testing. Additionally, transitioning to an interface might introduce complications, as certain functions remain undefined within the interface definition of ClusterScraperInterface