AGENT SKILL

mecak8s-kind-manual-verify

Refresh the mecak8s image in the local mecatl-dev Kind cluster and build mecatui locally, so the user can manually verify in-flight mecatl changes against a real k8s deployment.

License 许可
Apache-2.0
所属仓库
stacklok/mecatl
最近更新
2026-11-15
Stars
★ 309
Forks
29

01 前言 Front Matter

name
mecak8s-kind-manual-verify
description
Refresh the mecak8s image in the local mecatl-dev Kind cluster and build mecatui locally, so the user can manually verify in-flight mecatl changes against a real k8s deployment.

03 SKILL.md 正文

mecak8s Kind manual verification loop

Use this when the user wants to manually exercise in-progress mecatl changes (e.g. an open PR branch) against a real mecak8s deployment, rather than only relying on offline tests. This is the "deploy to kind and build mecatui so I can click around" loop — fast iteration, not a fresh cluster bring-up.

This assumes a Kind cluster named mecatl-dev already exists (see deploy/mecak8s-kind/README.md for first-time setup via task mecak8s:kind-setup). This skill is for the iterate step, not initial provisioning.

Prerequisites

  • Working directory is the mecatl repo (or a worktree of it).
  • ko, kubectl, kind, and either docker or podman installed.
  • The mecatl-dev Kind cluster already exists (kind get clusters shows it). If it doesn't, run task mecak8s:kind-setup first — that's provisioning, not this skill's job.

Step 1 — Refresh the mecak8s image with current source

From the repo root:

task mecak8s:image-refresh

This rebuilds ko.local/mecak8s:dev from the current source tree via ko build --local --bare --tags=dev ./cmd/mecak8s, loads it straight into the running mecatl-dev Kind node (no cluster teardown), and does a rolling restart of deployment/mecak8s-mecak8s in the mecatl namespace, waiting up to 240s for the rollout to complete.

Use KIND_EXPERIMENTAL_PROVIDER=podman task mecak8s:image-refresh on a Podman host (must match whatever kind-setup was run with).

This is safe to re-run after every code change you want to test — it does not reset cluster/Redis state.

Step 2 — Build mecatui locally

task build

Produces bin/mecatui (along with bin/mecated, bin/mecademo) via the Taskfile — never a bare go build at the repo root, which drops stray binaries.

Step 3 — Connect and drive it manually

Base fixture (no Keycloak) exposes gRPC at 127.0.0.1:18080 and HTTP at 127.0.0.1:18081 via static Kind NodePort mappings — check with:

task mecak8s:kind-status

If the fixture was set up with the optional Keycloak/OIDC identity layer (task mecak8s:kind-keycloak-setup), log in and connect with the prebuilt shorthand tasks:

task mecak8s:kind-login     # adds /etc/hosts aliases (sudo, once), refreshes fixture CA, runs `mecatui login`
task mecak8s:kind-connect   # adds /etc/hosts aliases, refreshes fixture CA, runs `mecatui connect`

Both require ./bin/mecatui to already exist (Step 2) and task mecak8s:kind-keycloak-setup to have been run at least once. See the keycloak-kind-setup skill if the Keycloak layer itself needs (re-)provisioning or debugging.

Without the Keycloak layer, connect directly:

./bin/mecatui connect 127.0.0.1:18080

For identity broker or hosted AS-1 work, use the separate mecatl-idbroker profile instead (Dex upstream, mecatui login through AS-1; runs alongside mecatl-dev): task mecak8s-idbroker:kind-setup, then task mecak8s-idbroker:image-refresh to iterate. See deploy/mecak8s-idbroker/README.md.

Iterating

Repeat Step 1 (task mecak8s:image-refresh) after each code change, then reconnect with mecatui (Step 3) — no need to rebuild mecatui itself unless the TUI/client code changed.

Cleanup

This skill never tears the cluster down. To destroy the whole fixture:

task mecak8s:kind-destroy

Reference

  • deploy/mecak8s-kind/Taskfile.yml — image-refresh, kind-status, kind-login, kind-connect, kind-destroy task definitions.
  • deploy/mecak8s-kind/README.md — full fixture lifecycle, provider modes (mock vs. real via OPENROUTER_API_KEY), and the optional Keycloak layer.
  • keycloak-kind-setup skill — for provisioning/recovering the Keycloak layer itself, if this fixture uses it.

04 同仓库更多 Skills

stacklok
stacklok/mecatl

repo-fact

Use when asked for this repository's registered fact or codeword. Loads the canonical answer format.

★ 309
stacklok
stacklok/mecatl

greet

Use when asked to greet someone with the ceremonial mecatl greeting. Loads the exact greeting format.

★ 309
stacklok
stacklok/mecatl

go-table-tests

Write idiomatic table-driven Go tests that stay offline and follow this repo's conventions.

★ 309
stacklok
stacklok/mecatl

commit-style

Write Conventional-Commits messages for this repo, with the required Co-Authored-By trailer.

★ 309
stacklok
stacklok/mecatl

tech-writer

Use when writing or substantively editing user-facing documentation: drafting a new page, rewriting or restructuring an existing one, adding a major section, or turning engineering material (PR descriptions, specs, release notes, rough notes) into docs. Writes clear, focused technical documentation following the Diataxis framework and Mecatl's canonical style guide. Use it even when the request doesn't mention writing quality; it governs how documentation gets written. Not for editorial review of finished work.

★ 309
stacklok
stacklok/mecatl

perf-optimization

Profile-driven performance optimization of mecatl using the offline benchmark + scenario harness. Use when optimizing allocations or latency, reducing allocs/op or memory, profiling a Go benchmark, pinpointing a hotspot with pprof, proving a win with benchstat, adding a regression benchmark, wiring profile-guided optimization (PGO), or investigating "why is this slow / allocating" or a suspected perf regression. Covers task bench, task perf:scenarios, memprofile -> pprof, benchstat A/B, allocs-first gating, PGO setup, and the discipline (follow the profile not the hypothesis; keep pure-perf changes byte-identical; mutation-test cache guards; skip the wrong abstraction). NOT for the live perf MCP server (use perf-mcp-interpretation) or non-mecatl Go profiling.

★ 309