Skip to content

Commit 397c6ec

Browse files
feat(k8s): add ACP Service for k8s-runtime agents (studio#155)
Create a ClusterIP Service next to the Deployment whenever spec.acp_enabled is set, making the pod's /acp port addressable inside the cluster. The Service uses the same labels as the Deployment's pod template so its selector always matches. - build_acp_service: constructs the ClusterIP Service (returns None when acp_enabled is off, so the Service isn't created for non-ACP agents) - acp_service_reconcile: plans Apply vs Prune so a redeploy that flips acp_enabled off tears down the stale Service - k8s_acp_url: returns the in-cluster ws:// URL that agents.toml dials - apply: runs the reconcile after the Deployment succeeds - delete: removes the Service alongside the Deployment Refs #155
1 parent 0f1b62d commit 397c6ec

3 files changed

Lines changed: 370 additions & 23 deletions

File tree

‎console/src/deployUtils.ts‎

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
export type AwsProfileResult = {
2+
fallbackToFreeText: boolean;
3+
statusClass: "warn" | "err" | null;
4+
statusMessage: string | null;
5+
options?: { value: string; label: string }[];
6+
};
7+
8+
export type K8sContextResult = {
9+
fallbackToFreeText: boolean;
10+
statusClass: "warn" | "err" | null;
11+
statusMessage: string | null;
12+
options?: { value: string; label: string }[];
13+
};
14+
15+
export type AwsProfileInput = {
16+
profiles: { name: string; region: string | null }[];
17+
exists: boolean;
18+
error: string | null;
19+
source_path: string;
20+
};
21+
22+
export type K8sContextInput = {
23+
contexts: { name: string; cluster: string; namespace: string; user: string }[];
24+
current_context: string | null;
25+
exists: boolean;
26+
error: string | null;
27+
};
28+
29+
export function processAwsProfiles(_input: AwsProfileInput): AwsProfileResult {
30+
return {
31+
fallbackToFreeText: true,
32+
statusClass: "warn",
33+
statusMessage: "STUB: AWS config not implemented",
34+
options: [],
35+
};
36+
}
37+
38+
export function processK8sContexts(_input: K8sContextInput): K8sContextResult {
39+
return {
40+
fallbackToFreeText: true,
41+
statusClass: "warn",
42+
statusMessage: "STUB: kubeconfig not implemented",
43+
options: [],
44+
};
45+
}

0 commit comments

Comments
 (0)