Davit
A safe Kubernetes deployment wrapper and TUI built with Rust.
🚢 What is a Davit?
In maritime terms, a davit is a crane-like device used to safely lower lifeboats or anchors into the water. In our context, Davit is designed to safely "lower" new container versions into our Kubernetes clusters.
✨ Features
- Safety First: Standardizes the path from Google Artifact Registry to running Pod.
- Terminal User Interface (TUI):
- Wizard Mode: Interactive selection of environments, services, and image tags (
inquire). - Dashboard Mode: Real-time rollout monitoring with split-screen logs (
ratatui).
- Wizard Mode: Interactive selection of environments, services, and image tags (
- Visual Diffs: Preview infrastructure YAML changes before applying them.
- Automated Auditing: Automatically commits and pushes changes to Git upon successful deployment.
- Deployment Info: Inspect deployed services with
davit info- refreshes the YAML sources (unless--no-fetchis passed), reads live workload state from cluster, and shows YAML vs cluster image drift together with workload status, current image version, last release commit, labels, pod details, resource usage, and recent events. - Scriptable:
--non-interactivenever prompts and fails naming the decision it could not ask, so Davit can be driven from CI or an agent.
🚀 Getting Started
Prerequisites
- Rust (Latest Stable)
kubectlgcloudgit
Configuration
Davit respects the XDG Base Directory specification. Create your configuration at:
$XDG_CONFIG_HOME/davit/config.toml
Example configuration:
[[]]
= "staging"
= "/path/to/infra-repo/k8s/staging"
= "/path/to/infra-demo-repo/k8s/staging"
= "gke_context_staging"
[[]]
= "production"
= "/path/to/infra-repo/k8s/prod"
= "gke_context_prod"
= true
Installation
Usage
# Start the full wizard
# Direct deploy
# Inspect a deployed service
# Filter by namespace
# Discover the values accepted by --env and --service
Running without a terminal
--non-interactive (also assumed when stdin is not a terminal) never prompts. Instead of
The input device is not a TTY, it reports the decision it could not ask and how to supply it:
)
)
Use davit list services to discover those values, or --namespace to narrow the choice:
# Unambiguous without quoting a rendered display name
# `-` selects the manifests that declare no namespace, as the listing shows them
# Protected environments take an explicit opt-in instead of the typed confirmation
# Validate an invocation without touching anything, and without a terminal
# Read the manifests as they are on disk, without running git pull first
🛠For Developers
Please refer to AGENT.md for coding standards, branching strategies, and contribution guidelines.
📄 License
[Insert License Information Here]