Skip to content

Add CI that runs the demo and checks each lifecycle step - #2

Merged
HarshCasper merged 2 commits into
masterfrom
ci/assert-deployment-lifecycle
Oct 14, 2026
Merged

HarshCasper merged 2 commits into
masterfrom
ci/assert-deployment-lifecycle

Conversation

@HarshCasper

@HarshCasper HarshCasper commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

The repo had no CI, and setup.sh failed on current LocalStack.

Fixes to setup.sh:

  • The default K8S_VERSION was 1.29, which LocalStack EKS now rejects with unsupported Kubernetes version 1.29 (it supports 1.30 to 1.36). The default is now 1.35, and the README lists the variable.
  • The LocalStack wait looked for "eks": "running" with no limit. EKS reports available until its first request, so it now accepts either, and gives up after MAX_WAIT_SECONDS (default 600).
  • The wait for the cluster to become ACTIVE has the same limit.
  • k3d image import --cluster lifecycle-demo targeted a cluster that doesn't exist, because LocalStack appends a hash to the k3d cluster name (lifecycle-demo-1ac9fa4e in CI). It now looks the name up with k3d cluster list and falls back to the docker exec import if it finds none. The README troubleshooting step says the same.

New test.sh redeploys the app and checks each step the demo shows:

  • the API server accepts the manifest
  • the Deployment creates a ReplicaSet and 2 Ready pods
  • each pod is assigned to a node, with Scheduled and Started events
  • both pods are Service endpoints
  • 30 requests through the Service reach both pods, and each reports its own pod and node name through the Downward API
  • a deleted pod is replaced, and the replacement becomes Ready

New workflow installs lstk and k3d, runs ./setup.sh, AUTO=1 ./demo.sh and ./test.sh, and prints the cluster state and LocalStack logs on failure. The README documents ./test.sh.

Verified by CI: https://github.com/localstack-samples/k8s-lifecycle-demo/actions/runs/38407304457. The demo runs all 7 steps and test.sh prints all 6 PASS lines.

https://claude.ai/code/session_01DZfDmzUBPqNAu3yFKyfCNM

Run setup.sh, the demo and a new test.sh on LocalStack EKS. Bound the setup waits, accept the 'available' EKS health state, and import the image into the hashed k3d cluster name.

Claude-Session: https://claude.ai/code/session_01DZfDmzUBPqNAu3yFKyfCNM
LocalStack EKS rejects 1.29 with 'unsupported Kubernetes version'; it supports 1.30 to 1.36.

Claude-Session: https://claude.ai/code/session_01DZfDmzUBPqNAu3yFKyfCNM
@HarshCasper
HarshCasper merged commit 24256a1 into master Oct 14, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant