diff --git a/pkg/controller/servicemesh/memberroll/controller.go b/pkg/controller/servicemesh/memberroll/controller.go index cab2a07d97..db2f8d78e9 100644 --- a/pkg/controller/servicemesh/memberroll/controller.go +++ b/pkg/controller/servicemesh/memberroll/controller.go @@ -726,15 +726,13 @@ func getNamespaces(members *maistrav1.ServiceMeshMemberList) []string { // Returns the Service Mesh ControlPlane mode // Used for the internal custom metrics func getMeshMode(mesh *maistrav2.ServiceMeshControlPlane) (string, error) { - isClusterWide, found, err := mesh.Status.AppliedValues.Istio.GetBool("global.clusterWide") + isClusterWide, _, err := mesh.Status.AppliedValues.Istio.GetBool("global.clusterWide") if err != nil { return "", err } - if !found { - return internalmetrics.ControlPlaneModeValueMultiTenant, nil - } if isClusterWide { return internalmetrics.ControlPlaneModeValueClusterScoped, nil + } else { + return internalmetrics.ControlPlaneModeValueMultiTenant, nil } - return "", nil }