From 11df378b9401a03a8511ebe8f0cd6523ee468e93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=A7=E5=8F=AF?= Date: Tue, 21 Feb 2023 09:57:10 +0800 Subject: [PATCH] feat: use juno-agent-dev image for dev env (#412) --- deployment/install.yml | 11 +++++++---- deployment/juno/data/config/initdb/juno.sql | 2 +- deployment/overlays/dev/juno-agent.yaml | 14 ++++++++++++++ deployment/overlays/dev/kustomization.yaml | 8 ++++++++ 4 files changed, 30 insertions(+), 5 deletions(-) create mode 100644 deployment/overlays/dev/juno-agent.yaml diff --git a/deployment/install.yml b/deployment/install.yml index bfbe1f2a4..2fd6d74b2 100644 --- a/deployment/install.yml +++ b/deployment/install.yml @@ -2330,7 +2330,7 @@ data: ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;\n\nINSERT INTO `app` (`aid`, `gid`, `name`, `app_name`, `create_time`, `update_time`, `level`, `lang`, `biz_domain`, `created_by`, `updated_by`, `http_port`, `rpc_port`, `govern_port`, - `hook_id`, `users`, `web_url`, `proto_dir`, `git_url`) VALUES\n(1,\t1,\t'jupiter-agent',\t'jupiter-agent',\t1673064118,\t1675836081,\t1,\t'go',\t'直播系统',\t0,\t0,\t'8011',\t'8012',\t'9999',\t0,\t'[\\\"douyu\\\"]',\t'https://github.com/douyu/jupiter-agent',\t'',\t'git@github.com/douyu/jupiter-agent.git'),\n(2,\t2,\t'juno-admin',\t'juno-admin',\t1673064118,\t1673064118,\t1,\t'go',\t'直播系统',\t0,\t0,\t'50002',\t'0',\t'50004',\t0,\t'[\\\"douyu\\\"]',\t'https://github.com/douyu/juno',\t'',\t'git@github.com/douyu/juno.git'),\n(3,\t3,\t'exampleserver',\t'exampleserver',\t1676633682,\t1676633682,\t1,\t'go',\t'直播系统',\t0,\t0,\t'9527',\t'9528',\t'9529',\t0,\t'[\\\"douyu\\\"]',\t'https://github.com/douyu/juno-layout',\t'',\t'https://github.com/douyu/juno-layout');\n\nDROP + `hook_id`, `users`, `web_url`, `proto_dir`, `git_url`) VALUES\n(1,\t1,\t'juno-agent',\t'juno-agent',\t1673064118,\t1675836081,\t1,\t'go',\t'直播系统',\t0,\t0,\t'8011',\t'8012',\t'9999',\t0,\t'[\\\"douyu\\\"]',\t'https://github.com/douyu/juno-agent',\t'',\t'git@github.com/douyu/juno-agent.git'),\n(2,\t2,\t'juno-admin',\t'juno-admin',\t1673064118,\t1673064118,\t1,\t'go',\t'直播系统',\t0,\t0,\t'50002',\t'0',\t'50004',\t0,\t'[\\\"douyu\\\"]',\t'https://github.com/douyu/juno',\t'',\t'git@github.com/douyu/juno.git'),\n(3,\t3,\t'exampleserver',\t'exampleserver',\t1676633682,\t1676633682,\t1,\t'go',\t'直播系统',\t0,\t0,\t'9527',\t'9528',\t'9529',\t0,\t'[\\\"douyu\\\"]',\t'https://github.com/douyu/juno-layout',\t'',\t'https://github.com/douyu/juno-layout');\n\nDROP TABLE IF EXISTS `app_change_map`;\nCREATE TABLE `app_change_map` (\n `id` bigint(20) NOT NULL AUTO_INCREMENT,\n `app_name` varchar(191) COLLATE utf8mb4_bin NOT NULL,\n \ `md5` varchar(191) COLLATE utf8mb4_bin NOT NULL,\n `updated_at` bigint(20) @@ -3745,7 +3745,7 @@ data: name="system.json" # 日志名称 dir="./logs" [pprof] - path = "." + path = "/tmp" [logger.biz] debug=false # 是否在命令行输出 enableConsole=false # 是否按命令行格式输出 @@ -4726,8 +4726,11 @@ spec: kompose.volume.type: configMap creationTimestamp: null labels: + appName: juno-agent io.kompose.network/deployment-default: "true" io.kompose.service: juno-agent + name: juno-agent + runEnv: dev spec: containers: - env: @@ -4743,7 +4746,7 @@ spec: value: cn-wuhan-guanggu-f1 - name: ZONE_NAME value: 武汉光谷F1区 - image: ghcr.io/douyu/juno-agent:latest + image: ghcr.io/douyu/juno-agent-dev:latest name: juno-agent ports: - containerPort: 50010 @@ -4893,7 +4896,7 @@ spec: value: cn-wuhan-guanggu-f1 - name: ZONE_NAME value: 武汉光谷F1区 - image: ghcr.io/douyu/juno-agent:latest + image: ghcr.io/douyu/juno-agent-dev:latest name: juno-agent ports: - containerPort: 50010 diff --git a/deployment/juno/data/config/initdb/juno.sql b/deployment/juno/data/config/initdb/juno.sql index 9d77deed8..19c025f01 100644 --- a/deployment/juno/data/config/initdb/juno.sql +++ b/deployment/juno/data/config/initdb/juno.sql @@ -55,7 +55,7 @@ CREATE TABLE `app` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin; INSERT INTO `app` (`aid`, `gid`, `name`, `app_name`, `create_time`, `update_time`, `level`, `lang`, `biz_domain`, `created_by`, `updated_by`, `http_port`, `rpc_port`, `govern_port`, `hook_id`, `users`, `web_url`, `proto_dir`, `git_url`) VALUES -(1, 1, 'jupiter-agent', 'jupiter-agent', 1673064118, 1675836081, 1, 'go', '直播系统', 0, 0, '8011', '8012', '9999', 0, '[\"douyu\"]', 'https://github.com/douyu/jupiter-agent', '', 'git@github.com/douyu/jupiter-agent.git'), +(1, 1, 'juno-agent', 'juno-agent', 1673064118, 1675836081, 1, 'go', '直播系统', 0, 0, '8011', '8012', '9999', 0, '[\"douyu\"]', 'https://github.com/douyu/juno-agent', '', 'git@github.com/douyu/juno-agent.git'), (2, 2, 'juno-admin', 'juno-admin', 1673064118, 1673064118, 1, 'go', '直播系统', 0, 0, '50002', '0', '50004', 0, '[\"douyu\"]', 'https://github.com/douyu/juno', '', 'git@github.com/douyu/juno.git'), (3, 3, 'exampleserver', 'exampleserver', 1676633682, 1676633682, 1, 'go', '直播系统', 0, 0, '9527', '9528', '9529', 0, '[\"douyu\"]', 'https://github.com/douyu/juno-layout', '', 'https://github.com/douyu/juno-layout'); diff --git a/deployment/overlays/dev/juno-agent.yaml b/deployment/overlays/dev/juno-agent.yaml new file mode 100644 index 000000000..cc15d95f9 --- /dev/null +++ b/deployment/overlays/dev/juno-agent.yaml @@ -0,0 +1,14 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: juno-agent +spec: + selector: + matchLabels: + io.kompose.service: juno-agent + template: + metadata: + labels: + name: juno-agent + appName: juno-agent + runEnv: dev \ No newline at end of file diff --git a/deployment/overlays/dev/kustomization.yaml b/deployment/overlays/dev/kustomization.yaml index f06c9e50f..7af97446c 100644 --- a/deployment/overlays/dev/kustomization.yaml +++ b/deployment/overlays/dev/kustomization.yaml @@ -7,3 +7,11 @@ resources: images: - name: ghcr.io/douyu/juno-admin newName: ghcr.io/douyu/juno-admin-dev + - name: ghcr.io/douyu/juno-agent + newName: ghcr.io/douyu/juno-agent-dev + +patches: + - target: + kind: Deployment + name: juno-agent + path: juno-agent.yaml