Skip to content

Commit

Permalink
bug: fixing missing details (#402)
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
  • Loading branch information
AlexsJones committed Apr 4, 2024
1 parent 0eb03fa commit 0e302bd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/resources/results.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func MapResults(i integrations.Integrations, resultsSpec []v1alpha1.ResultSpec,
for _, resultSpec := range resultsSpec {
name := strings.ReplaceAll(resultSpec.Name, "-", "")
name = strings.ReplaceAll(name, "/", "")
result := GetResult(resultSpec, name, namespace, backend)
result := GetResult(resultSpec, name, namespace, backend, resultSpec.Details)
labels := map[string]string{
"k8sgpts.k8sgpt.ai/name": config.Name,
"k8sgpts.k8sgpt.ai/namespace": config.Namespace,
Expand All @@ -51,8 +51,9 @@ func MapResults(i integrations.Integrations, resultsSpec []v1alpha1.ResultSpec,
return rawResults, nil
}

func GetResult(resultSpec v1alpha1.ResultSpec, name, namespace, backend string) v1alpha1.Result {
func GetResult(resultSpec v1alpha1.ResultSpec, name, namespace, backend string, detail string) v1alpha1.Result {
resultSpec.Backend = backend
resultSpec.Details = detail
return v1alpha1.Result{
Spec: resultSpec,
ObjectMeta: metav1.ObjectMeta{
Expand Down

0 comments on commit 0e302bd

Please sign in to comment.