feat: krbctl CLI — interactive compose.yaml and config.json generators - #244
Merged
Conversation
Copilot
AI
changed the title
feat: add krbctl CLI with interactive compose and config commands
feat: krbctl CLI — interactive compose.yaml and config.json generators
Aug 17, 2026
Copilot created this pull request from a session on behalf of
maansaake
August 17, 2026 09:37
View session
maansaake
marked this pull request as ready for review
August 17, 2026 19:55
Co-authored-by: maansaake <15028979+maansaake@users.noreply.github.com>
…neration
Replace raw bufio.Scanner stdin prompts in krbctl with charmbracelet/huh
interactive forms, providing a polished, navigable TUI experience.
Changes:
- Add charmbracelet/huh dependency
- compose: rewrite all prompts as huh Confirm form groups
- compose: update grafana service mounts to include grafana.ini and
dashboard JSON files alongside existing provisioning YAMLs
- config: rewrite all prompts (Input, Select, Confirm, MultiSelect)
- config: add observability config section (after kerberos section):
- MultiSelect for Prometheus scrape targets (kerberos/echo/connector/jaeger)
- Select for Grafana database backend (postgres/sqlite)
- Confirm for Grafana anonymous access
- Generates prometheus.yml, grafana/grafana.ini (slim — [database] +
[auth.anonymous] only), grafana/grafana-datasources.yml,
grafana/grafana-dashboards.yml, grafana dashboard JSONs, jaeger.yml
- config: add admin-connector section generating connector.json
- Embed Grafana dashboard JSON files from test/config/grafana/ at build time
- Add unit tests for all new builder functions (12 tests)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The release-assets job in callable-cli.yaml requested contents: write, but callers (pull-request.yaml, main.yaml) only grant contents: read. A reusable workflow cannot request more permission than its caller grants, so GitHub rejected the whole invocation at startup (startup_failure). Move release asset building into a standalone release-cli.yaml triggered only on release: published (contents: write), and add Go module + build caching to that job. callable-cli.yaml now only builds and tests (contents: read). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
mr-jeeves
Bot
force-pushed
the
copilot/kerberos-cli-foundation
branch
from
August 18, 2026 05:28
fda945b to
12a4121
Compare
Compose/config form and generation improvements: - Left-align huh confirm buttons for consistent yes/no rows - Combine config's fixed prompts into a single navigable multi-group form (shift+tab back/forth); keep the dynamic backend loop as its own step - Replace plain-text "at least one backend" output with inline huh validation - Offer echo as a router backend up front (echo:15000); allow finishing without manual backends when echo is registered - Per-backend basic auth toggle instead of a single global auth section - Always enable Kerberos observability; keep obs-STACK file generation as a separate, clearly-labeled optional section - Split admin-connector on/off into its own section; drop the unused admin-target-URL prompt - Replace connector origin input with an allow/deny-all CORS confirm - Dynamic Prometheus scrape targets: kerberos + jaeger + registered backends (backends scraped at :9464), connector auto-added when included - Hard-code compose ports/versions; drop all env-var injection; use the default Prometheus port 9464 for every service - Trim compose host port publishing to kerberos gw/admin, grafana, jaeger - Add a shared krbdata volume (/data/krb.db) for Kerberos and the connector when Postgres is disabled, with matching persistence config - Set LOG_VERBOSITY=0 for services that configure it - Update unit tests to cover the new behavior Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds krbctl, an interactive deployment scaffolding CLI.
Changes:
- Generates Kerberos configuration and Compose deployments.
- Embeds observability and connector configuration assets.
- Adds CLI build, test, install, and release automation.
Reviewed changes
Copilot reviewed 17 out of 19 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
Makefile |
Adds CLI build and release targets. |
go.mod |
Adds CLI dependencies. |
go.sum |
Records dependency checksums. |
test/suites/go.sum |
Updates test dependency checksums. |
cmd/krbctl/main.go |
Adds the CLI entry point. |
cmd/krbctl/cmd/root.go |
Defines the root Cobra command. |
cmd/krbctl/cmd/compose.go |
Implements Compose generation. |
cmd/krbctl/cmd/config.go |
Implements interactive config generation. |
cmd/krbctl/cmd/connectorconfig.go |
Generates connector configuration. |
cmd/krbctl/cmd/obsconfig.go |
Generates observability configuration. |
cmd/krbctl/cmd/assets/jaeger/config-ui.json |
Provides Jaeger UI settings. |
cmd/krbctl/cmd/assets/grafana/prometheus.json |
Adds a Prometheus dashboard. |
cmd/krbctl/cmd/assets/grafana/kerberos_runtime.json |
Adds a runtime dashboard. |
cmd/krbctl/cmd/assets/grafana/kerberos_http.json |
Adds an HTTP dashboard. |
cmd/admin-connector/main.go |
Logs the connector target. |
.github/workflows/callable-cli.yaml |
Builds and tests the CLI. |
.github/workflows/release-cli.yaml |
Publishes CLI release artifacts. |
.github/workflows/pull-request.yaml |
Runs CLI checks on pull requests. |
.github/workflows/main.yaml |
Runs CLI checks on the main branch. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
krbctl, a Cobra-based CLI for scaffolding a Kerberos production deployment, with two interactive commands that prompt for the sections relevant to each operator's setup.krbctl compose [-o compose.yaml]Generates a
compose.yamlvia four yes/no prompts.kerberosis always included; everything else is optional:nonewhen excludedkerberosgains adepends_onconditionkrbctl config [-o config.json]Generates a base
config.jsonthrough guided prompts:gateway.router.backendsarrayobservabilityblock with runtime metrics enabledStructure
Cobra was added as the only new dependency (
github.com/spf13/cobra v1.9.1). Commands register flags in constructor functions rather thaninit()to comply with the project linter rules.