Skip to content

Commit

Permalink
Update optimize configure to set deployment UID
Browse files Browse the repository at this point in the history
on optimizer Orion config object
  • Loading branch information
linkous8 committed Jul 6, 2023
1 parent dae6f72 commit 7e6bed5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions cmd/optimize/configure.go
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ FROM entities(k8s:deployment)[attributes("k8s.cluster.name") = "{{.Cluster}}" &&
}
// Target
newOptimizerConfig.Target.K8SDeployment.ClusterID = profilerReport["resource_metadata.cluster_id"].(string)
newOptimizerConfig.Target.K8SDeployment.DeploymentUID = profilerReport["k8s.deployment.uid"].(string)
newOptimizerConfig.Target.K8SDeployment.ClusterName = profilerReport["resource_metadata.cluster_name"].(string)
newOptimizerConfig.Target.K8SDeployment.ContainerName = profilerReport["report_contents.main_container_name"].(string)
newOptimizerConfig.Target.K8SDeployment.NamespaceName = profilerReport["resource_metadata.namespace_name"].(string)
Expand Down
1 change: 1 addition & 0 deletions cmd/optimize/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ type Suspension struct {
}
type K8SDeployment struct {
ClusterID string `json:"clusterId"`
DeploymentUID string `json:"deploymentUid"`
ClusterName string `json:"clusterName"`
ContainerName string `json:"containerName"`
NamespaceName string `json:"namespaceName"`
Expand Down

0 comments on commit 7e6bed5

Please sign in to comment.