Skip to content

ci: LocalStack on Kubernetes — k3d cluster + Lambda pod executor test#12

Merged
whummer merged 5 commits into
mainfrom
ci/ls-on-k8s
May 9, 2026
Merged

ci: LocalStack on Kubernetes — k3d cluster + Lambda pod executor test#12
whummer merged 5 commits into
mainfrom
ci/ls-on-k8s

Conversation

@whummer
Copy link
Copy Markdown
Owner

@whummer whummer commented May 8, 2026

Summary

  • Renames ls-k8s/ls-on-k8s/ to match the working-directory name
  • Adds LOCALSTACK_AUTH_TOKEN forwarding in cluster-up.sh via Helm --set extraEnvVars (token read from env, no-op when unset)
  • Adds .github/workflows/test-ls-on-k8s.yml that on every PR/push touching ls-on-k8s/**:
    1. Installs k3d and Helm on ubuntu-latest
    2. make cluster-up — creates a k3d cluster, deploys LocalStack via Helm with lambdaExecutor=kubernetes
    3. make test — creates two Lambda functions and verifies (a) correct payload returned, (b) a new pod appears in the namespace on async invocation
    4. Dumps LocalStack logs + pods on failure
    5. make cluster-down always runs (cleanup)

Setup required

Add secret LOCALSTACK_AUTH_TOKEN in Settings → Secrets and variables → Actions.

Test plan

  • Trigger workflow_dispatch after adding the secret and confirm all steps pass
  • Verify Lambda pod appears in k8s namespace during the slow-function test

🤖 Generated with Claude Code

@whummer whummer changed the base branch from master to main May 8, 2026 21:52
whummer and others added 2 commits May 9, 2026 13:05
… executor)

- Renames ls-k8s/ → ls-on-k8s/
- Adds .github/workflows/test-ls-on-k8s.yml: spins up a k3d cluster,
  deploys LocalStack via kubectl apply, runs Lambda integration tests,
  tears the cluster down; reads auth token from K8S_LOCALSTACK_AUTH_TOKEN secret
- Adds k8s/localstack.yaml: ServiceAccount, Role, RoleBinding, Deployment,
  NodePort Service; auth token injected via optional k8s Secret
- cluster-up.sh: creates k3d cluster, optional auth secret, kubectl apply,
  waits for health endpoint
- Makefile: kubectl-based deploy-ls target; logs/logs-follow split to avoid
  CI hang from -f flag

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Init container: drop base64 (busybox compat issue), use certificate-authority
  file path + embedded token instead of certificate-authority-data
- Add 'Debug LocalStack pod k8s setup' CI step that execs into the pod and
  prints KUBERNETES_*/KUBECONFIG env vars, /kube/config, and SA file listing

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@whummer whummer merged commit 1b844b3 into main May 9, 2026
1 check passed
@whummer whummer deleted the ci/ls-on-k8s branch May 9, 2026 11:48
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