Skip to content

Commit 5ea4b10

Browse files
mjudeikisclaude
andauthored
feat(app-studio): build → promote-to-production loop, build-doctor, private-image pull (#420)
* feat(app-studio): build → promote-to-production loop with build-doctor + private-image pull Close the app-studio dev→build→launch loop and everything the live testing surfaced. Core flow: a bound template scaffolds a per-component GitHub Actions build into the repo; Railpack builds+pushes one image per component to ghcr; the Code provider crawls the packages into Package CRs (tags+digests); app-studio reads those to gate promotion; promote stands up a separate <project>-prod instance of the same template running the built digests; the infra provider bridges a ghcr image-pull secret onto the runtime namespace's default SA so private images pull. app-studio: - imageInput link on template dev components; per-component build.json + matrix workflow (build+push only, no evidence-commit-back); build status + promote read ghcr Package CRs (no git evidence). - promote_project + POST /promote + GET /promotion; Publish & Promote portal tab (build status, Promote/Redeploy, prod URL). Fix: promote now provisions the artifact (production) environment (reconcileProjectLiveBindings only did live). - build-doctor: check_project_build + get_build_logs + rebuild_project; CI self-heals on template-bind and on commit (one idempotent ensure, no force UI). - ensureProjectRegistryPullSecret: mint a ghcr dockerconfigjson tenant Secret from the Code connection token at promote. code provider: - Package pipeline carries per-version tags/digests + imageRepository. - WorkflowRunReader/Dispatcher backend caps + RepositoryBuildStatus CR/controller + build_status/rebuild MCP tools (GitHub Actions status/logs/re-run). - oauth: request `workflow` scope (required to commit .github/workflows/*). infra provider: - application secret-bridge controller also bridges <instance>-registry into the runtime namespace + attaches it to the default ServiceAccount (all templates). Also folds in unrelated in-flight working-tree changes (agents provider, Tiltfiles, docs, databricks) at the author's request. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * chore(app-studio,infra): fully remove deploy_project_runtime + pull-secret finalizer cleanup - infra: the application secret-bridge controller now finalizer-guards the registry pull Secret + its default-SA imagePullSecrets entry, cleaning both on instance delete (only instances that create the state carry the finalizer, so dev churn stays independent of the controller). - app-studio: remove the superseded deploy_project_runtime tool entirely — the Eino graph tool, spec, AppDeployment types (from the shared runtime-workflow input/result), and all wiring. Tests that used it as a runtime-tool example now use restart_runtime. Also folds in unrelated in-flight agents-provider working-tree changes per the author's request. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 30e79b8 commit 5ea4b10

133 files changed

Lines changed: 17138 additions & 763 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/settings.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
11
{
22
"permissions": {
3+
"allow": [
4+
"Skill(deep-research)",
5+
"Skill(deep-research:*)",
6+
"WebFetch(domain:www.cloudwego.io)",
7+
"WebFetch(domain:aider.chat)",
8+
"WebFetch(domain:docs.openhands.dev)",
9+
"WebFetch(domain:www.openhands.dev)",
10+
"WebFetch(domain:arxiv.org)",
11+
"WebFetch(domain:blog.stackblitz.com)",
12+
"WebFetch(domain:blog.replit.com)",
13+
"WebFetch(domain:docs.replit.com)",
14+
"WebFetch(domain:developers.openai.com)",
15+
"WebFetch(domain:openai.com)",
16+
"WebFetch(domain:opencode.ai)",
17+
"WebFetch(domain:replit.com)",
18+
"WebFetch(domain:support.bolt.new)",
19+
"WebFetch(domain:cursor.com)",
20+
"WebFetch(domain:*)"
21+
],
322
"additionalDirectories": [
423
"/Users/mjudeikis/go/src/github.com/kcp-dev/kcp/pkg/reconciler/apis/apibinding"
524
]

Makefile

Lines changed: 96 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY: dev-edge-create dev-run-edge build test lint fix-lint codegen crds clean certs dev-setup run-dex run-hub run-hub-static run-hub-embedded run-hub-embedded-static run-hub-standalone run-hub-embedded-graphql run-kcp dev-login dev-login-static dev-create-workload dev dev-infra dev-run-kcp path boilerplate verify-boilerplate verify-codegen ldflags tools docker-build docker-build-hub docker-build-agent docker-build-dex docker-build-dev-agent load-dev-agent-image docker-push-dex verify help-dev dev-status dev-clean-hooks helm-build-local helm-push-local helm-clean build-quickstart-provider build-quickstart-provider-portal build-kuery-provider build-kuery-provider-portal run-provider-kuery kuery-db-up kuery-db-down install-provider-kuery init-provider-kuery uninstall-provider-kuery run-provider-quickstart install-provider-quickstart init-provider-quickstart uninstall-provider-quickstart build-infrastructure-provider build-infrastructure-provider-portal codegen-infrastructure-provider run-provider-infrastructure install-provider-infrastructure init-provider-infrastructure uninstall-provider-infrastructure build-app-studio-provider build-app-studio-provider-portal codegen-app-studio-provider app-studio-db-up app-studio-db-down run-provider-app-studio install-provider-app-studio init-provider-app-studio uninstall-provider-app-studio build-code-provider build-code-provider-portal codegen-code-provider run-provider-code install-provider-code init-provider-code uninstall-provider-code build-databricks-provider build-databricks-provider-portal codegen-databricks-provider run-provider-databricks install-provider-databricks init-provider-databricks uninstall-provider-databricks dev-kro-up dev-kro-down dev-kro-seed dev-kro-register-self e2e-infrastructure portal-provider-symlinks build-mcp-provider-portal build-kubernetes-edges-provider-portal build-server-edges-provider-portal e2e-provider e2e-provider-flags e2e-provider-all
1+
.PHONY: dev-edge-create dev-run-edge build test lint fix-lint codegen crds clean certs dev-setup run-dex run-hub run-hub-static run-hub-embedded run-hub-embedded-static run-hub-standalone run-hub-embedded-graphql run-kcp dev-login dev-login-static dev-create-workload dev dev-infra dev-run-kcp path boilerplate verify-boilerplate verify-codegen ldflags tools docker-build docker-build-hub docker-build-agent docker-build-dex docker-build-dev-agent load-dev-agent-image docker-push-dex verify help-dev dev-status dev-clean-hooks helm-build-local helm-push-local helm-clean build-quickstart-provider build-quickstart-provider-portal build-kuery-provider build-kuery-provider-portal run-provider-kuery kuery-db-up kuery-db-down install-provider-kuery init-provider-kuery uninstall-provider-kuery run-provider-quickstart install-provider-quickstart init-provider-quickstart uninstall-provider-quickstart build-infrastructure-provider build-infrastructure-provider-portal codegen-infrastructure-provider run-provider-infrastructure install-provider-infrastructure init-provider-infrastructure uninstall-provider-infrastructure build-app-studio-provider build-app-studio-provider-portal codegen-app-studio-provider app-studio-db-up app-studio-db-down run-provider-app-studio install-provider-app-studio init-provider-app-studio uninstall-provider-app-studio build-agents-provider build-agents-provider-portal codegen-agents-provider run-provider-agents install-provider-agents init-provider-agents uninstall-provider-agents build-code-provider build-code-provider-portal codegen-code-provider run-provider-code install-provider-code init-provider-code uninstall-provider-code build-databricks-provider build-databricks-provider-portal codegen-databricks-provider run-provider-databricks install-provider-databricks init-provider-databricks uninstall-provider-databricks dev-kro-up dev-kro-down dev-kro-seed dev-kro-register-self e2e-infrastructure portal-provider-symlinks build-mcp-provider-portal build-kubernetes-edges-provider-portal build-server-edges-provider-portal e2e-provider e2e-provider-flags e2e-provider-all
22

33
BINDIR ?= bin
44
GOFLAGS ?=
@@ -139,6 +139,12 @@ build-app-studio-provider-portal: ## Build the App Studio provider's micro-front
139139
build-app-studio-provider: build-app-studio-provider-portal ## Build the App Studio provider binary (portal embedded)
140140
cd providers/app-studio && go build $(GOFLAGS) -o $(CURDIR)/$(BINDIR)/app-studio-provider .
141141

142+
build-agents-provider-portal: ## Build the agents provider's micro-frontend (Vite + TS → portal/dist)
143+
cd providers/agents/portal && npm install --no-audit --no-fund && npm run build
144+
145+
build-agents-provider: build-agents-provider-portal ## Build the agents provider binary (portal embedded)
146+
cd providers/agents && go build $(GOFLAGS) -o $(CURDIR)/$(BINDIR)/agents-provider .
147+
142148
build-code-provider-portal: ## Build the code provider's micro-frontend (Vite + Vue → portal/dist)
143149
cd providers/code/portal && npm install --no-audit --no-fund && npm run build
144150

@@ -182,12 +188,25 @@ codegen-code-provider: $(CONTROLLER_GEN) $(KCP_APIGEN_GEN) ## Codegen for the co
182188
$(CURDIR)/$(CONTROLLER_GEN) crd paths="./apis/..." \
183189
output:crd:artifacts:config=$(CURDIR)/providers/code/config/crds
184190
./$(KCP_APIGEN_GEN) --input-dir providers/code/config/crds --output-dir providers/code/config/kcp
185-
@for r in connections repositories repositorycommits repositorycheckouts deploykeys collaborators packages; do \
191+
@for r in connections repositories repositorycommits repositorycheckouts repositorybuildstatuses deploykeys collaborators packages; do \
186192
cp providers/code/config/kcp/apiresourceschema-$$r.code.kedge.faros.sh.yaml \
187193
providers/code/deploy/chart/files/schemas/$$r.code.kedge.faros.sh.yaml; \
188194
done
189195
./hack/ensure-boilerplate.sh
190196

197+
codegen-agents-provider: $(CONTROLLER_GEN) $(KCP_APIGEN_GEN) ## Codegen for the agents provider's local API (+ chart schemas)
198+
@mkdir -p providers/agents/config/crds providers/agents/config/kcp providers/agents/deploy/chart/files/schemas
199+
cd providers/agents && \
200+
$(CURDIR)/$(CONTROLLER_GEN) object paths="./apis/..." && \
201+
$(CURDIR)/$(CONTROLLER_GEN) crd paths="./apis/..." \
202+
output:crd:artifacts:config=$(CURDIR)/providers/agents/config/crds
203+
./$(KCP_APIGEN_GEN) --input-dir providers/agents/config/crds --output-dir providers/agents/config/kcp
204+
@for r in agents connections agentschedules agenttriggers agentruns; do \
205+
cp providers/agents/config/kcp/apiresourceschema-$$r.agents.kedge.faros.sh.yaml \
206+
providers/agents/deploy/chart/files/schemas/$$r.agents.kedge.faros.sh.yaml; \
207+
done
208+
./hack/ensure-boilerplate.sh
209+
191210
codegen-app-studio-provider: $(CONTROLLER_GEN) $(KCP_APIGEN_GEN) ## Codegen for the App Studio provider's local API (+ manifest + chart schema)
192211
@mkdir -p providers/app-studio/config/crds providers/app-studio/config/kcp providers/app-studio/deploy/chart/files/schemas
193212
cd providers/app-studio && \
@@ -902,6 +921,20 @@ APP_STUDIO_POSTGRES_USER ?= appstudio
902921
APP_STUDIO_POSTGRES_PASSWORD ?= appstudio
903922
APP_STUDIO_POSTGRES_DB ?= appstudio
904923

924+
# --- agents provider (long-running personal AI agents) ---
925+
AGENTS_PORT ?= 8087
926+
AGENTS_HUB_URL ?= https://localhost:9443
927+
AGENTS_TOKEN ?= $(STATIC_AUTH_TOKEN)
928+
AGENTS_KCP_KUBECONFIG ?= $(KCP_DATA_DIR)/admin.kubeconfig
929+
AGENTS_KCP_SERVER ?= https://localhost:6443
930+
AGENTS_WORKSPACE_PATH ?= root:kedge:providers:agents
931+
AGENTS_PROVIDER_KUBECONFIG ?= $(KCP_DATA_DIR)/agents-provider.kubeconfig
932+
AGENTS_SCHEMAS_DIR ?= providers/agents/deploy/chart/files/schemas
933+
AGENTS_MANIFEST ?= providers/agents/manifest.yaml
934+
AGENTS_PROVIDER_MANIFEST ?= providers/agents/provider.yaml
935+
# Postgres store backend is not wired yet; dev runs use the in-memory store.
936+
AGENTS_IN_MEMORY_STORE ?= true
937+
905938
## Run the infrastructure provider binary locally. Heartbeats to the hub on
906939
## $(KROMC_HUB_URL); TLS verification skipped (dev cert is self-signed).
907940
## KRO_KUBECONFIG is left unset by default → provider serves the baked-in
@@ -1129,6 +1162,67 @@ uninstall-provider-app-studio: ## Delete App Studio CatalogEntry
11291162
--insecure-skip-tls-verify \
11301163
delete -f $(APP_STUDIO_MANIFEST) -f $(APP_STUDIO_PROVIDER_MANIFEST)
11311164

1165+
## --- agents provider dev targets (mirror app-studio; in-memory store) ---
1166+
1167+
run-provider-agents: build-agents-provider ## Run the agents provider (requires: make run-hub-embedded-static + make install-provider-agents + make init-provider-agents)
1168+
@echo "Starting agents provider on :$(AGENTS_PORT)"
1169+
@echo " hub: $(AGENTS_HUB_URL)"
1170+
@echo " store: in-memory (non-durable; Postgres backend not wired yet)"
1171+
@# Auto-source providers/agents/.env (gitignored) for local overrides.
1172+
set -a; [ -f providers/agents/.env ] && . ./providers/agents/.env || true; set +a; \
1173+
PORT=$(AGENTS_PORT) \
1174+
KEDGE_HUB_URL=$(AGENTS_HUB_URL) \
1175+
KEDGE_HUB_TOKEN=$(AGENTS_TOKEN) \
1176+
KEDGE_HUB_INSECURE=true \
1177+
KEDGE_PROVIDER_NAME=agents \
1178+
KEDGE_PROVIDER_KUBECONFIG=$${KEDGE_PROVIDER_KUBECONFIG:-$$( for f in "$(AGENTS_PROVIDER_KUBECONFIG)" "$(AGENTS_KCP_KUBECONFIG)" "$(CURDIR)/tilt-frontproxy.kubeconfig"; do [ -f "$$f" ] && echo "$$f" && break; done )} \
1179+
AGENTS_IN_MEMORY_STORE=$(AGENTS_IN_MEMORY_STORE) \
1180+
$(BINDIR)/agents-provider
1181+
1182+
install-provider-agents: ## Apply agents Provider + CatalogEntry into root:kedge:providers
1183+
@test -f $(AGENTS_KCP_KUBECONFIG) || { \
1184+
echo "kubeconfig not found at $(AGENTS_KCP_KUBECONFIG)"; \
1185+
echo "start the hub first with: make run-hub-embedded-static"; \
1186+
exit 1; \
1187+
}
1188+
kubectl --kubeconfig=$(AGENTS_KCP_KUBECONFIG) \
1189+
--server=$(AGENTS_KCP_SERVER)/clusters/root:kedge:system:providers \
1190+
--insecure-skip-tls-verify \
1191+
apply -f $(AGENTS_PROVIDER_MANIFEST) -f $(AGENTS_MANIFEST)
1192+
1193+
init-provider-agents: build-agents-provider ## Bootstrap agents APIExport + write dev provider kubeconfig
1194+
@test -f $(AGENTS_KCP_KUBECONFIG) || { \
1195+
echo "kubeconfig not found at $(AGENTS_KCP_KUBECONFIG)"; \
1196+
echo "start the hub first with: make run-hub-embedded-static"; \
1197+
exit 1; \
1198+
}
1199+
@echo "Reading provider-token from $(AGENTS_WORKSPACE_PATH) and writing $(AGENTS_PROVIDER_KUBECONFIG)"
1200+
@TOKEN=$$(kubectl --kubeconfig=$(AGENTS_KCP_KUBECONFIG) \
1201+
--server=$(AGENTS_KCP_SERVER)/clusters/$(AGENTS_WORKSPACE_PATH) \
1202+
--insecure-skip-tls-verify \
1203+
get secret -n default provider-token -o jsonpath='{.data.token}' | base64 -d); \
1204+
test -n "$$TOKEN" || { echo "provider-token Secret empty — wait for the Provider controller to provision the workspace"; exit 1; }; \
1205+
mkdir -p $(KCP_DATA_DIR); \
1206+
printf 'apiVersion: v1\nkind: Config\nclusters:\n- name: kedge\n cluster:\n server: %s\n insecure-skip-tls-verify: true\ncontexts:\n- name: kedge\n context:\n cluster: kedge\n user: kedge\ncurrent-context: kedge\nusers:\n- name: kedge\n user:\n token: %s\n' \
1207+
"$(AGENTS_KCP_SERVER)/clusters/$(AGENTS_WORKSPACE_PATH)" "$$TOKEN" \
1208+
> $(AGENTS_PROVIDER_KUBECONFIG)
1209+
@echo "Running agents-provider init (creates APIExport + schemas + endpoint slice + bind grant)"
1210+
KEDGE_PROVIDER_KUBECONFIG=$(AGENTS_PROVIDER_KUBECONFIG) \
1211+
AGENTS_WORKSPACE_PATH=$(AGENTS_WORKSPACE_PATH) \
1212+
KEDGE_SCHEMAS_DIR=$(AGENTS_SCHEMAS_DIR) \
1213+
$(BINDIR)/agents-provider init
1214+
1215+
uninstall-provider-agents: ## Delete the agents CatalogEntry + Provider
1216+
@test -f $(AGENTS_KCP_KUBECONFIG) || { \
1217+
echo "kubeconfig not found at $(AGENTS_KCP_KUBECONFIG)"; \
1218+
echo "start the hub first with: make run-hub-embedded-static"; \
1219+
exit 1; \
1220+
}
1221+
-kubectl --kubeconfig=$(AGENTS_KCP_KUBECONFIG) \
1222+
--server=$(AGENTS_KCP_SERVER)/clusters/root:kedge:system:providers \
1223+
--insecure-skip-tls-verify \
1224+
delete -f $(AGENTS_MANIFEST) -f $(AGENTS_PROVIDER_MANIFEST)
1225+
11321226
# --- Dev agent image (template-native development mode) ---
11331227
# The static control binary an init container injects into any dev-mode
11341228
# component (docs/app-studio-template-sandboxes.md §2). Scratch image,

Tiltfile

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ go build -o bin/kedge-hub ./cmd/kedge-hub
8686
# management kind cluster that kro runs in
8787
# providers-code — git repository manager (port :8083)
8888
# providers-kuery — fleet query engine (port :8084)
89+
# providers-agents — long-running personal AI agents (port :8087)
8990
#
9091
# Each provider has three resources:
9192
# <name> build + serve; auto-restarts on src change
@@ -376,6 +377,71 @@ local_resource(
376377
labels=['providers-app-studio'],
377378
)
378379

380+
# --- providers-agents ---
381+
# Long-running personal AI agents (chat, scheduled runs, tools, durable memory).
382+
# Standalone: only hard deps are the hub and a store (in-memory in dev until the
383+
# Postgres backend is wired). No app-studio/infrastructure dependency.
384+
local_resource(
385+
'agents',
386+
cmd='make build-agents-provider',
387+
serve_cmd='make run-provider-agents',
388+
deps=[
389+
'providers/agents/main.go',
390+
'providers/agents/heartbeat.go',
391+
'providers/agents/assets.go',
392+
'providers/agents/init_cmd.go',
393+
'providers/agents/api',
394+
'providers/agents/channels',
395+
'providers/agents/apis',
396+
'providers/agents/client',
397+
'providers/agents/engine',
398+
'providers/agents/llm',
399+
'providers/agents/store',
400+
'providers/agents/tenant',
401+
'providers/agents/go.mod',
402+
'providers/agents/go.sum',
403+
'providers/agents/portal/src',
404+
'providers/agents/portal/package.json',
405+
'providers/agents/portal/vite.config.ts',
406+
'providers/agents/.env',
407+
],
408+
resource_deps=['hub'],
409+
readiness_probe=probe(
410+
period_secs=5,
411+
http_get=http_get_action(port=8087, path='/healthz'),
412+
),
413+
labels=['providers-agents'],
414+
)
415+
416+
local_resource(
417+
'agents-register',
418+
cmd='make install-provider-agents',
419+
trigger_mode=TRIGGER_MODE_MANUAL,
420+
auto_init=False,
421+
resource_deps=['hub'],
422+
labels=['providers-agents'],
423+
)
424+
425+
# Creates the agents APIExport (+ schemas + endpoint slice + bind grant) so
426+
# tenants can Enable it. Run AFTER agents-register.
427+
local_resource(
428+
'agents-init',
429+
cmd='make init-provider-agents',
430+
trigger_mode=TRIGGER_MODE_MANUAL,
431+
auto_init=False,
432+
resource_deps=['hub', 'agents-register'],
433+
labels=['providers-agents'],
434+
)
435+
436+
local_resource(
437+
'agents-unregister',
438+
cmd='make uninstall-provider-agents',
439+
trigger_mode=TRIGGER_MODE_MANUAL,
440+
auto_init=False,
441+
resource_deps=['hub'],
442+
labels=['providers-agents'],
443+
)
444+
379445
# --- Dev agent image (template-native development mode) ---
380446
# The static control binary injected into dev-mode components; owned by the
381447
# infrastructure provider (docs/app-studio-template-sandboxes.md §2).

Tiltfile.cluster

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -495,6 +495,7 @@ kubectl create secret generic kcp-static-tokens -n default \
495495
# management kind cluster that kro runs in
496496
# providers-code — git repository manager (port :8083)
497497
# providers-kuery — fleet query engine (port :8084)
498+
# providers-agents — long-running personal AI agents (port :8087)
498499
#
499500
# Each provider has three resources:
500501
# <name> build + serve; auto-restarts on src change
@@ -541,6 +542,7 @@ APP_STUDIO_REWRITE_CMD, APP_STUDIO_MANIFEST_REWRITTEN = rewrite_manifest_cmd('pr
541542
CODE_REWRITE_CMD, CODE_MANIFEST_REWRITTEN = rewrite_manifest_cmd('providers/code/manifest.yaml')
542543
KUERY_REWRITE_CMD, KUERY_MANIFEST_REWRITTEN = rewrite_manifest_cmd('providers/kuery/manifest.yaml')
543544
DATABRICKS_REWRITE_CMD, DATABRICKS_MANIFEST_REWRITTEN = rewrite_manifest_cmd('providers/databricks/manifest.yaml')
545+
AGENTS_REWRITE_CMD, AGENTS_MANIFEST_REWRITTEN = rewrite_manifest_cmd('providers/agents/manifest.yaml')
544546

545547
# --- providers-quickstart ---
546548
local_resource(
@@ -599,6 +601,77 @@ local_resource(
599601
labels=['providers-quickstart'],
600602
)
601603

604+
# --- providers-agents ---
605+
# Long-running personal AI agents. Same host-binary shape as quickstart; the
606+
# manifest host URL is rewritten to the in-cluster hub. Standalone — only hard
607+
# dep is the hub (in-memory store in dev until the Postgres backend is wired).
608+
local_resource(
609+
'agents',
610+
cmd='make build-agents-provider',
611+
serve_cmd='make run-provider-agents',
612+
deps=[
613+
'providers/agents/main.go',
614+
'providers/agents/heartbeat.go',
615+
'providers/agents/assets.go',
616+
'providers/agents/init_cmd.go',
617+
'providers/agents/api',
618+
'providers/agents/channels',
619+
'providers/agents/apis',
620+
'providers/agents/client',
621+
'providers/agents/engine',
622+
'providers/agents/llm',
623+
'providers/agents/store',
624+
'providers/agents/tenant',
625+
'providers/agents/go.mod',
626+
'providers/agents/portal/src',
627+
'providers/agents/portal/package.json',
628+
'providers/agents/portal/vite.config.ts',
629+
],
630+
resource_deps=['kedge-hub'],
631+
readiness_probe=probe(
632+
period_secs=5,
633+
http_get=http_get_action(port=8087, path='/healthz'),
634+
),
635+
labels=['providers-agents'],
636+
)
637+
638+
local_resource(
639+
'agents-register',
640+
cmd=('{rewrite} && AGENTS_KCP_KUBECONFIG={kc} ' +
641+
'AGENTS_KCP_SERVER={sv} AGENTS_MANIFEST={mf} ' +
642+
'make install-provider-agents').format(
643+
rewrite=AGENTS_REWRITE_CMD, kc=KCP_ADMIN_KUBECONFIG,
644+
sv=KCP_ADMIN_SERVER, mf=AGENTS_MANIFEST_REWRITTEN),
645+
trigger_mode=TRIGGER_MODE_MANUAL,
646+
auto_init=False,
647+
resource_deps=['kedge-hub'],
648+
labels=['providers-agents'],
649+
)
650+
651+
local_resource(
652+
'agents-init',
653+
cmd=('AGENTS_KCP_KUBECONFIG={kc} AGENTS_KCP_SERVER={sv} ' +
654+
'make init-provider-agents').format(
655+
kc=KCP_ADMIN_KUBECONFIG, sv=KCP_ADMIN_SERVER),
656+
trigger_mode=TRIGGER_MODE_MANUAL,
657+
auto_init=False,
658+
resource_deps=['kedge-hub', 'agents-register'],
659+
labels=['providers-agents'],
660+
)
661+
662+
local_resource(
663+
'agents-unregister',
664+
cmd=('{rewrite} && AGENTS_KCP_KUBECONFIG={kc} ' +
665+
'AGENTS_KCP_SERVER={sv} AGENTS_MANIFEST={mf} ' +
666+
'make uninstall-provider-agents').format(
667+
rewrite=AGENTS_REWRITE_CMD, kc=KCP_ADMIN_KUBECONFIG,
668+
sv=KCP_ADMIN_SERVER, mf=AGENTS_MANIFEST_REWRITTEN),
669+
trigger_mode=TRIGGER_MODE_MANUAL,
670+
auto_init=False,
671+
resource_deps=['kedge-hub'],
672+
labels=['providers-agents'],
673+
)
674+
602675
# --- providers-app-studio ---
603676
local_resource(
604677
'app-studio-db',

0 commit comments

Comments
 (0)