feat: Add lightweight Minikube smoke test #58

Open
martin wants to merge 1 commit from minikube/init into main
Owner

Summary

  • Add just recipes to start an isolated Minikube profile, load an image, apply the recurring-events Deployment and Service, port-forward locally, and delete the profile.
  • Document the lightweight smoke-test workflow and its component limitations.

Validation

  • just build dev
  • just fmt
  • just --list
  • git diff --check

End-to-end Minikube execution was not run because Minikube is not installed in the development environment.

## Summary - Add just recipes to start an isolated Minikube profile, load an image, apply the `recurring-events` Deployment and Service, port-forward locally, and delete the profile. - Document the lightweight smoke-test workflow and its component limitations. ## Validation - `just build dev` - `just fmt` - `just --list` - `git diff --check` End-to-end Minikube execution was not run because Minikube is not installed in the development environment.
feat: Add minikube profile
All checks were successful
ci/woodpecker/pr/pr-review Pipeline was successful
0c33f4c365
martin self-assigned this 2026-10-06 16:27:08 +00:00
Collaborator

Review Summary

Solid, well-scoped addition. The recipe set is coherent (start → load → apply → forward → delete), profile-scoped with --profile cluster-local and --context=cluster-local everywhere so it can't touch the real clusters, minikube-delete has a confirm guard, and the namespace creation is idempotent. I verified against the repo: both applied manifest paths exist (manifests/dev/recurring-events/{Deployment,Service}-*.yaml), the Service exposes port: 80 so 8080:80 is correct, the Deployment has no external ConfigMap/Secret/ServiceAccount dependencies so it genuinely runs standalone, and correctly omitting IngressRoute-recurring-events-route.yaml (Traefik CRD) is documented.

A few minor, non-blocking findings around first-run reliability and doc wording — nothing that warrants blocking the PR.


*🤖 Review by opencode (opencode/mimo-v2.6-flash-free) — verdict: approve

# Review Summary Solid, well-scoped addition. The recipe set is coherent (start → load → apply → forward → delete), profile-scoped with `--profile cluster-local` and `--context=cluster-local` everywhere so it can't touch the real clusters, `minikube-delete` has a confirm guard, and the namespace creation is idempotent. I verified against the repo: both applied manifest paths exist (`manifests/dev/recurring-events/{Deployment,Service}-*.yaml`), the Service exposes `port: 80` so `8080:80` is correct, the Deployment has no external ConfigMap/Secret/ServiceAccount dependencies so it genuinely runs standalone, and correctly omitting `IngressRoute-recurring-events-route.yaml` (Traefik CRD) is documented. A few minor, non-blocking findings around first-run reliability and doc wording — nothing that warrants blocking the PR. --- *🤖 Review by opencode (opencode/mimo-v2.6-flash-free) — verdict: **approve** <!-- forgejo-opencode-review -->
clank-bot left a comment

Code review findings from opencode.

Code review findings from opencode. <!-- forgejo-opencode-review -->
@ -192,0 +200,4 @@
```bash
# Check the Nix configuration and start an isolated local cluster
just build dev
Collaborator
[style] `just build dev` writes to `./result` and does not touch `manifests/dev/`, which is what `minikube-apply-recurring-events` actually reads — so this step doesn't "check" anything the subsequent apply uses, and the comment may mislead readers into thinking it refreshes what gets deployed. Either use `just switch dev` here, or reword to note that applying uses the committed `manifests/dev/` (partially covered by the note at lines 217-219).
<!-- forgejo-opencode-review --> [style] `just build dev` writes to `./result` and does not touch `manifests/dev/`, which is what `minikube-apply-recurring-events` actually reads — so this step doesn't "check" anything the subsequent apply uses, and the comment may mislead readers into thinking it refreshes what gets deployed. Either use `just switch dev` here, or reword to note that applying uses the committed `manifests/dev/` (partially covered by the note at lines 217-219).
@ -188,0 +204,4 @@
kubectl --context=cluster-local apply \
-f manifests/dev/recurring-events/Deployment-recurring-events.yaml \
-f manifests/dev/recurring-events/Service-recurring-events-svc.yaml
kubectl --context=cluster-local patch deployment recurring-events -n dev --type=json \
Collaborator
[style] Applying the Deployment with `imagePullPolicy: Always` and only afterwards patching it to `IfNotPresent` leaves a race: a pod can be created from the unpatched template and hit `ImagePullBackOff` (registry pull of a locally-loaded image) before the patch rolls the ReplicaSet, so the smoke test may appear broken for 10-30s on first run. Also, JSON patch `op: replace` fails hard if the field is ever absent from the generated manifest. Consider mutating the manifest before applying instead, e.g. `sed 's/imagePullPolicy: Always/imagePullPolicy: IfNotPresent/' manifests/dev/recurring-events/Deployment-recurring-events.yaml | kubectl --context=cluster-local apply -f -`, which removes both the race and the fragile path-based patch.
<!-- forgejo-opencode-review --> [style] Applying the Deployment with `imagePullPolicy: Always` and only afterwards patching it to `IfNotPresent` leaves a race: a pod can be created from the unpatched template and hit `ImagePullBackOff` (registry pull of a locally-loaded image) before the patch rolls the ReplicaSet, so the smoke test may appear broken for 10-30s on first run. Also, JSON patch `op: replace` fails hard if the field is ever absent from the generated manifest. Consider mutating the manifest before applying instead, e.g. `sed 's/imagePullPolicy: Always/imagePullPolicy: IfNotPresent/' manifests/dev/recurring-events/Deployment-recurring-events.yaml | kubectl --context=cluster-local apply -f -`, which removes both the race and the fragile path-based patch.
@ -188,0 +210,4 @@
# Forward the local service to http://localhost:8080 (stop with Ctrl-C)
[group("Minikube")]
minikube-port-forward-recurring-events:
kubectl --context=cluster-local port-forward -n dev svc/recurring-events-svc 8080:80
Collaborator
[bug] Nothing waits for the Deployment to be ready before port-forwarding, so the documented sequence `minikube-apply-recurring-events` → `minikube-port-forward-recurring-events` can fail on first run if no endpoints are ready yet (especially with the pull-policy race above). Consider having the apply recipe end with `kubectl --context=cluster-local rollout status deployment/recurring-events -n dev --timeout=120s`, or document that the forward may need to be retried.
<!-- forgejo-opencode-review --> [bug] Nothing waits for the Deployment to be ready before port-forwarding, so the documented sequence `minikube-apply-recurring-events` → `minikube-port-forward-recurring-events` can fail on first run if no endpoints are ready yet (especially with the pull-policy race above). Consider having the apply recipe end with `kubectl --context=cluster-local rollout status deployment/recurring-events -n dev --timeout=120s`, or document that the forward may need to be retried.
All checks were successful
ci/woodpecker/pr/pr-review Pipeline was successful
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin minikube/init:minikube/init
git switch minikube/init

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff minikube/init
git switch minikube/init
git rebase main
git switch main
git merge --ff-only minikube/init
git switch minikube/init
git rebase main
git switch main
git merge --no-ff minikube/init
git switch main
git merge --squash minikube/init
git switch main
git merge --ff-only minikube/init
git switch main
git merge minikube/init
git push origin main
Sign in to join this conversation.
No reviewers
No labels
automerge
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
martin/cluster!58
No description provided.