-
Notifications
You must be signed in to change notification settings - Fork 3
Local dev with echo server #64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -3,6 +3,9 @@ TAG ?= latest | |||||||||
| IMG := $(REPOSITORY):$(TAG) | ||||||||||
| CLUSTER = kind | ||||||||||
|
|
||||||||||
| .PHONY: run-local | ||||||||||
| run-local: cluster-delete cluster build docker kind-load-image echo deploy | ||||||||||
|
|
||||||||||
| .PHONY: build | ||||||||||
| build: | ||||||||||
| go build -o deployment-tracker cmd/deployment-tracker/main.go | ||||||||||
|
|
@@ -15,6 +18,13 @@ docker: | |||||||||
| kind-load-image: | ||||||||||
| kind load docker-image ${IMG} --name ${CLUSTER} | ||||||||||
|
|
||||||||||
| .PHONY: deploy | ||||||||||
| deploy: | ||||||||||
| @echo "Deploying deployment-tracker to cluster..." | ||||||||||
| kubectl apply -f deploy/manifest.yaml | ||||||||||
|
||||||||||
| kubectl apply -f deploy/manifest.yaml | |
| kubectl apply -f deploy/manifest.yaml | |
| @echo "Updating deployment image to ${IMG}..." | |
| kubectl set image deployment/deployment-tracker deployment-tracker=${IMG} -n deployment-tracker |
Copilot
AI
Mar 20, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The echo target uses kubectl run ... --restart=Always and then kubectl expose pod artifact-registry .... With --restart=Always, kubectl run creates a Deployment (not a Pod), so kubectl expose pod artifact-registry is likely to fail, and echo-delete (which deletes a Pod) won’t clean up the created Deployment. Consider creating/exposing a Deployment explicitly (and deleting the Deployment), or use a Pod (--restart=Never) and keep the expose/delete commands consistent with the created resource type.
| kubectl run artifact-registry --image=ealen/echo-server:latest --port=80 -n artifact-registry --restart=Always --labels="app=artifact-registry" | |
| kubectl run artifact-registry --image=ealen/echo-server:latest --port=80 -n artifact-registry --restart=Never --labels="app=artifact-registry" |
Copilot
AI
Mar 20, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The echo server image is referenced as ealen/echo-server:latest. Using latest makes local dev behavior non-reproducible and increases supply-chain risk because the content can change over time. Consider pinning to a specific version and (ideally) a digest, similar to how base images are pinned elsewhere in the repo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
run-localinvokes thedockertarget, which currently builds alinux/arm64image. This will fail to run on the commonamd64kind node images (and on most non-ARM developer machines). Consider making the build platform configurable (e.g.,PLATFORM ?=) or building for the kind node architecture sorun-localworks across environments.