From 161e5b4f18e86194fe05d148105fb3f4454dc48b Mon Sep 17 00:00:00 2001 From: Momchil Bozhinov Date: Tue, 16 Feb 2021 12:54:46 +0200 Subject: [PATCH] * Merge with parent --- php/clonos.php | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/php/clonos.php b/php/clonos.php index 2a4eddfb..9c2c648e 100644 --- a/php/clonos.php +++ b/php/clonos.php @@ -2021,6 +2021,19 @@ class ClonOS { return $arr; } + function ccmd_getFreeCname(){ + $arr=array(); + $res=$this->CBSD::run("freejname default_jailname=kube", []); + if($res['error']){ + $arr['error']=true; + $arr['error_message']=$err['error_message']; + }else{ + $arr['error']=false; + $arr['freejname']=$res['message']; + } + return $arr; + } + function ccmd_k8sCreate(){ $form=$this->form; $res=array(); @@ -2066,7 +2079,9 @@ class ClonOS { if($form['kubelet_master']=='on') $res['kubelet_master']="1"; } - $url='http://144.76.225.238/api/v1/create/move'; + $cname=$form['cname']; + + $url='http://144.76.225.238/api/v1/create/'.$cname; $result=$this->postCurl($url,$res); return $result;