فهرست منبع

addon host (#4276)

Co-authored-by: sunguroku <trevor@porter.run>
sunguroku 2 سال پیش
والد
کامیت
55937d6b64

+ 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 (