for BYOC mode: only tenant global makes sense
@@ -340,6 +340,10 @@ func (m *StandardClientManager) GetClientInfoFromContext(c echo.Context) (*Clien
clientInfo.Tenants = []string{}
}
+ // todo quick fix, ugly
+ if v1alpha1.KalmMode(v1alpha1.GetEnvKalmMode()) == v1alpha1.KalmModeBYOC {
+ clientInfo.Tenant = v1alpha1.DefaultGlobalTenantName
+ } else {
switch len(clientInfo.Tenants) {
case 0:
clientInfo.Tenant = ""
@@ -393,6 +397,7 @@ func (m *StandardClientManager) GetClientInfoFromContext(c echo.Context) (*Clien
}
}
}
+ }
m.SetImpersonation(&clientInfo, c.Request().Header.Get("Kalm-Impersonation"))
return &clientInfo, nil
