Without changing any code analyze how we could implement intropy sys deploy that would…
- User
Without changing any code analyze how we could implement intropy sys deploy that would deploy the system to a local k3s
- Assistant
Without changing any code analyze how we could implement intropy sys deploy that would deploy the system to a local k3s
No code changed.
Implement intropy sys deploy as a local-development deployer that composes existing integration Kustomize overlays, validates the system topology, and applies to a selected local k3s context. Keep production deployment GitOps-only through Flux.
cmd/intropy/sys_create.go already establishes the command shape; add cmd/intropy/sys_deploy.go.internal/system/ already assembles components, topics, and connectors.internal/deploy/ already renders per-integration Kustomize trees.intropy sys deploy \
--system-dir system-host \
--environment local \
--namespace order-flow \
--images images.yaml \
--kubeconfig ~/.kube/config \
--context local \
--wait \
--output-json -
Key flags:
--system-dir: generated system host directory.--environment: initially only local; reserve staging and production.--images: required mapping from component names to immutable image references.--kubeconfig, --context, --namespace.--dry-run: render and validate only—no API calls.--wait, --timeout.--output-json: applied resources, image digests, namespace, readiness status.Do not infer image names or run arbitrary Docker builds in v1. The present templates do not define a uniform Dockerfile/build-context contract. Require supplied immutable images first; add --build only after template metadata standardizes it.
Discover and validate
Transport.File(...) connectors unless an explicit local cluster connector mapping exists.Preflight the cluster
Compose a system overlay
deploy/overlays/dev--imagesCronJobs using their schedule; loaders remain Deployments.Apply and observe
kubectl inside the published distroless CLI image.This is the real blocker. sys create deliberately emits file transports:
Transport.File("./test/<connector>")
That is correct for local Aspire-style execution, but has no safe k3s equivalent. sys deploy needs an explicit connector policy, for example:
connectors:
orders-source:
type: dapr.binding
component: orders-input
orders-destination:
type: dapr.binding
component: orders-output
For v1, support one transport family—prefer Dapr bindings/components because integration manifests already use Dapr. Reject unsupported connector types rather than silently using a PVC or in-memory substitute.
A locally built Docker image is not automatically visible to k3s containerd. Make a reachable registry an explicit prerequisite:
Avoid having the CLI mutate /etc/rancher/k3s/registries.yaml; it requires host-level privileges and is cluster administration. Preflight it and give an actionable failure message instead.
Relevant k3s documentation:
Keep sys deploy imperative only for local k3s. For staging and production:
GitRepository and Kustomization.ImageRepository, ImagePolicy, and ImageUpdateAutomation.-rc tags for CI environments; promote stable tags to production through a PR.Flux bootstrap itself commits the management manifests and creates the Git sync objects: Flux bootstrap.
cmd/intropy/sys_deploy.go — Cobra interface, signal-aware context, stdout/stderr discipline.internal/system/deploy.go or internal/systemdeployment/ — orchestration and typed result.internal/system/connectors.go — topology-to-cluster transport mapping.internal/deploy/compose.go — system-level Kustomize composition, reusing individual rendered manifests.cmd/intropy/sys_deploy_test.gointernal/system/deploy_test.goThe safest first deliverable is therefore: sys deploy --dry-run plus image/connector preflight and system-level Kustomize rendering. It resolves the currently missing contracts before introducing cluster mutations.