Przeglądaj źródła

jupyter增加入参

liweiquan 2 lat temu
rodzic
commit
cf70ffae41
7 zmienionych plików z 13 dodań i 4 usunięć
  1. 3 1
      app/crud/programme.py
  2. 2 0
      data/data.sql
  3. 2 1
      development.ini
  4. 2 1
      idctest.ini
  5. 1 0
      production.ini
  6. 2 1
      sxkj.ini
  7. 1 0
      txtest.ini

+ 3 - 1
app/crud/programme.py

@@ -14,6 +14,7 @@ tag = config.get('PROGRAMME', 'tag')
 host = config.get('PROGRAMME', 'host')
 chart = config.get('PROGRAMME', 'chart')
 path_type = config.get('PROGRAMME', 'path_type')
+ingress_class = config.get('PROGRAMME', 'ingress_class', vars=DefaultOption(config, 'PROGRAMME', INGRESS_CLASS = None))
 
 def check_password(password: str):
     p_bool = bool(re.search(r"(?:,|/|\$)", password))
@@ -63,7 +64,8 @@ def start_jupyter(db: Session, item: schemas.ProgrammeId):
         'host': host,
         'release_name': db_item.release_name,
         'chart': chart,
-        'path_type': path_type
+        'path_type': path_type,
+        'ingress_class': ingress_class if ingress_class else ""
     }
     c_res = send_util.create_jupyter(jupyter_create_data)
     j_data = c_res['data'] if 'data' in c_res.keys() else None

+ 2 - 0
data/data.sql

@@ -35,6 +35,7 @@ CREATE TABLE `job_jdbc_datasource` (
 -- ----------------------------
 -- Table structure for job_info
 -- ----------------------------
+DROP TABLE IF EXISTS `job_info`;
 CREATE TABLE `job_info` (
   `id` bigint(20) NOT NULL AUTO_INCREMENT,
   `cron_select_type` tinyint(4) NOT NULL COMMENT '周期选择类型',
@@ -456,6 +457,7 @@ MODIFY COLUMN `user_id` varchar(50) NOT NULL COMMENT '创建人、分享人' AFT
 -- ----------------------------
 -- Table structure for project_user_relation
 -- ----------------------------
+DROP TABLE IF EXISTS `programme`;
 CREATE TABLE `programme` (
   `id` bigint NOT NULL AUTO_INCREMENT,
   `name` varchar(50) NOT NULL COMMENT '名称',

+ 2 - 1
development.ini

@@ -80,4 +80,5 @@ ordinary_image = SXKJ:32775/jupyterlab0
 tag = sxkj
 host = aihub-dag.sxkj.com
 chart = aihub-dag-jupyter.tgz
-path_type = ImplementationSpecific
+path_type = ImplementationSpecific
+ingress_class = ''

+ 2 - 1
idctest.ini

@@ -111,4 +111,5 @@ ordinary_image = registry.cn-hangzhou.aliyuncs.com/sxtest/jupyterlab
 tag = idctest
 host = aihub-dag-idctest.digitalyili.com
 chart = aihub-dag-jupyter.tgz
-path_type = ImplementationSpecific
+path_type = ImplementationSpecific
+ingress_class = public

+ 1 - 0
production.ini

@@ -102,3 +102,4 @@ tag = txtest
 host = aihub-dag-test.digitalyili.com
 chart = aihub-dag-jupyter.tgz
 path_type = ImplementationSpecific
+ingress_class = public

+ 2 - 1
sxkj.ini

@@ -88,4 +88,5 @@ ordinary_image = SXKJ:32775/jupyterlab0
 tag = sxkj
 host = aihub-dag.sxkj.com
 chart = aihub-dag-jupyter.tgz
-path_type = ImplementationSpecific
+path_type = ImplementationSpecific
+ingress_class = ''

+ 1 - 0
txtest.ini

@@ -100,3 +100,4 @@ tag = txtest
 host = aihub-dag-test.digitalyili.com
 chart = aihub-dag-jupyter.tgz
 path_type = ImplementationSpecific
+ingress_class = public