소스 검색

addon host (#4276)

Co-authored-by: sunguroku <trevor@porter.run>
sunguroku 2 년 전
부모
커밋
55937d6b64
2개의 변경된 파일6개의 추가작업 그리고 2개의 파일을 삭제
  1. 5 1
      dashboard/src/main/home/app-dashboard/apps/Addon.tsx
  2. 1 1
      dashboard/src/main/home/managed-addons/tabs/PostgresTabs.tsx

+ 5 - 1
dashboard/src/main/home/app-dashboard/apps/Addon.tsx

@@ -33,7 +33,11 @@ export const Addon: React.FC<AddonProps> = ({ addon, view }) => {
       .with("redis", () => 6379)
       .exhaustive();
 
-    return `${addon.name.value}-${addon.config.type}.${currentDeploymentTarget.namespace}.svc.cluster.local:${port}`;
+    const host = match(addon.config.type)
+      .with("postgres", () => "postgres-postgres-hl")
+      .with("redis", () => "redis-redis")
+
+    return `${host}.${currentDeploymentTarget.namespace}.svc.cluster.local:${port}`;
   }, [currentDeploymentTarget, addon.name.value]);
 
   const renderIcon = (type: ClientAddon["config"]["type"]): JSX.Element =>

+ 1 - 1
dashboard/src/main/home/managed-addons/tabs/PostgresTabs.tsx

@@ -44,7 +44,7 @@ export const PostgresTabs: React.FC<Props> = ({ index }) => {
       return "";
     }
 
-    return `postgresql://${username}:${password}@${name.value}-postgres:5432/postgres`;
+    return `postgresql://${username}:${password}@${name.value}-postgres-hl:5432/postgres`;
   }, [username, password, name.value]);
 
   return (