Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
omris94 committed Feb 4, 2024
1 parent dea2482 commit f0d3962
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/operator/controllers/intents_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import (
"github.com/otterize/intents-operator/src/shared/operator_cloud_client"
"github.com/otterize/intents-operator/src/shared/reconcilergroup"
"github.com/otterize/intents-operator/src/shared/serviceidresolver"
"github.com/otterize/intents-operator/src/shared/serviceidresolver/serviceidentity"
"github.com/otterize/intents-operator/src/shared/telemetries/telemetriesconfig"
"github.com/samber/lo"
"github.com/sirupsen/logrus"
Expand Down Expand Up @@ -299,13 +300,8 @@ func (r *IntentsReconciler) InitIntentsServerIndices(mgr ctrl.Manager) error {
res = append(res, otterizev1alpha3.OtterizeInternetTargetName)
continue
}
serverName := intent.GetTargetServerName()
if intent.IsTargetServerKubernetesService() {
serverName = "svc." + serverName
}
serverNamespace := intent.GetTargetServerNamespace(intents.Namespace)
formattedServerName := otterizev1alpha3.GetFormattedOtterizeIdentity(serverName, serverNamespace)
res = append(res, formattedServerName)
service := serviceidentity.NewFromIntent(intent, intents.Namespace)
res = append(res, service.GetFormattedOtterizeIdentity())
}

return res
Expand Down

0 comments on commit f0d3962

Please sign in to comment.