feat(deploy): add compose and in-cluster Kind deployment - #30
feat(deploy): add compose and in-cluster Kind deployment#30jenniferubah wants to merge 8 commits into
Conversation
Assisted-By: Cursor AI Signed-off-by: Jennifer Ubah <cju.cipher@gmail.com>
Assisted-By: Cursor AI Signed-off-by: Jennifer Ubah <cju.cipher@gmail.com>
Assisted-By: Cursor AI Signed-off-by: Jennifer Ubah <cju.cipher@gmail.com>
Assisted-By: Cursor AI Signed-off-by: Jennifer Ubah <cju.cipher@gmail.com>
PR Summary by QodoAdd Compose and in-cluster Kind deployment workflows
AI Description
Diagram
High-Level Assessment
Files changed (26)
|
Code Review by Qodo
1.
|
machacekondra
left a comment
There was a problem hiding this comment.
All looks good to me. The only thing is that some files are redudant or similar with what we have in the control-plane repo.
Maybe it's time to think of separating this into e2e repo? Maybe we can have discussion about this.
Assisted-By: Cursor AI Signed-off-by: Jennifer Ubah <cju.cipher@gmail.com>
Sure, we can do the refactoring into separate repo in a follow up PR |
| fi | ||
|
|
||
| echo "==> Applying manifests (image: ${IMAGE})" | ||
| kubectl apply -k "${K8S_DIR}" |
There was a problem hiding this comment.
k8s-deploy.sh builds and loads ${IMAGE} from ENVIRONMENT_AGENT_VERSION, but kubectl apply -k still uses the hardcoded newTag: dev in kustomization. Anything other than dev loads the right image into Kind then schedules :dev.
Prefer kustomize edit set image or kubectl set image
| See [in-cluster.md](docs/in-cluster.md) for full detail. | ||
|
|
||
| ```bash | ||
| kind create cluster --name dcm-local |
There was a problem hiding this comment.
In-cluster quick start uses plain kind create cluster.
On some hosts (Docker Desktop, rootless Podman) neither 127.0.0.1:30081 nor the node InternalIP is reachable, so make k8s-verify fails even when the pod is healthy. Maybe a small Kind config with extraPortMappings for 30081 and 30422? or documentation for port-forward as the fallback?
There was a problem hiding this comment.
added the extraPortMappings config and port-forwards as a fallback in the troubleshooting section - d749d80
|
|
||
| | Variable | Default | Notes | | ||
| |----------|---------|--------| | ||
| | `AGENT_EMBEDDED_SPS` | _(in example)_ | `container`, `vm`, `cluster` | |
There was a problem hiding this comment.
Default column says (in example) but .env.example keeps AGENT_EMBEDDED_SPS commented, which is fine as opt-in. Prefer empty (set in .env) or similar so the table matches the example file.
| # DCM Environment Agent stack (standalone): NATS JetStream + environment-agent. | ||
| # | ||
| # Image version: defaults to :main. Pin with ENVIRONMENT_AGENT_VERSION in deploy/.env. | ||
| # Local dev: `make compose-up` builds the agent from the repo Containerfile. |
There was a problem hiding this comment.
Compose defaults the agent image to :main, k8s-deploy to :dev. Each path builds and tags its own image, so switching from compose to in-cluster does not pick up the image you just built on the other path. Can we use one default tag for both workflows?
There was a problem hiding this comment.
Updated it to default to dev for both workflows. d749d80
| kubeconfig-for-compose: | ||
| ./deploy/scripts/kubeconfig-for-compose.sh |
There was a problem hiding this comment.
make kubeconfig-for-compose runs ./deploy/scripts/kubeconfig-for-compose.sh.
That needs the file to be executable so the target fails with permission denied on a fresh clone.
k8s-host-urls.sh avoids this by calling bash in the Makefile.
Prefer chmod +x here, or invoke via bash like the other scripts.
| - rbac.yaml | ||
| - environment-agent.yaml | ||
|
|
||
| # Image tag should match ENVIRONMENT_AGENT_VERSION in deploy/scripts/k8s-deploy.sh (default: dev). |
There was a problem hiding this comment.
Comment says the tag should match k8s-deploy.sh, but the script never updates this file. Either wire the tag in the script or soften the comment so it does not imply automatic sync.
There was a problem hiding this comment.
Updated the comment
Assisted-By: Cursor AI Signed-off-by: Jennifer Ubah <cju.cipher@gmail.com>
Assisted-By: Cursor AI Signed-off-by: Jennifer Ubah <cju.cipher@gmail.com>
Assisted-By: Cursor AI Signed-off-by: Jennifer Ubah <cju.cipher@gmail.com>
Summary
deploy/compose.yaml) for NATS + environment-agent with Kind helpers pointing to utilities scriptsdeploy/k8s/) withmake k8s-deploy, NodePort access, andk8s-host-urls.shfor verify/publishdeploy/samples/,make publish-creates/make k8s-publish-creates) and deployment docs (DEPLOY.md,compose-kind.md,in-cluster.md)Type of Change
Stacked PR Status
Assisted-By: Cursor AI