This commit is contained in:
zhaoke
2023-10-09 10:05:16 +08:00
parent 89401b5424
commit 33e9ab8a2a
3 changed files with 4 additions and 1 deletions
+2
View File
@@ -928,7 +928,9 @@ class InstanceModel extends model
*/
public function createInstance($app, $space, $thirdDomain, $name = '', $k8name = '', $channel = 'stable', $snippets = array())
{
$createdBy = $this->app->user->account;
if(empty($k8name)) $k8name = "{$app->chart}-" . date('YmdHis'); //name rule: chartName-userAccount-YmdHis;
if(IN_INSTALL && empty($this->app->user->account)) $createdBy = trim($this->app->company->admins, ','); //Set createdBy if in login progress;
$instanceData = new stdclass;
$instanceData->appId = $app->id;