π Enterprise-grade CLI for Helmfile operations and Kubernetes deployments - Built with Rust
- π Advanced Helmfile Linting - Environment-specific validation with strict mode
- π Safe Deployments - Production confirmations, dry-run modes, and rollback capabilities
- βΈοΈ Kubernetes Integration - Direct manifest deployment with multi-cluster support
- π Rollback System - Individual release or full environment rollback functionality
- π Status Monitoring - Detailed release and pod status checking
- β Template Validation - YAML syntax checking and Helmfile template rendering
- βοΈ Configuration Management - Persistent settings with YAML configuration
- π Multi-cluster Support - Context switching with connectivity tests
- π Comprehensive Logging - Structured JSON logging with audit trails
- π‘οΈ Safety First - Production deployment confirmations and dry-run modes
Ensure you have the following tools installed:
helmfile- Install Helmfilehelm- Install Helmkubectl- Install kubectl
# Clone or extract the project
git clone https://github.com/akmshasan/helmctl
cd helmctl
# Build the project
make build
# Install system-wide (optional)
make install# Download from releases (when available)
curl -L -o helmctl <download-url>
chmod +x helmctl
sudo mv helmctl /usr/local/bin/helmctl config init
helmctl config show# Basic linting
helmctl lint -f helmfile.yaml -e development
# Strict mode (fail on warnings)
helmctl lint -f helmfile.yaml -e production --strict
# Template validation only
helmctl lint -f helmfile.yaml --template-only# Dry-run deployment
helmctl deploy -f helmfile.yaml -e staging --dry-run
# Production deployment with confirmation
helmctl deploy -f helmfile.yaml -e production --concurrency 3
# Deploy with diff preview
helmctl deploy -f helmfile.yaml -e development --diff
# Skip dependency updates
helmctl deploy -f helmfile.yaml -e development --skip-deps# Deploy manifest with dry-run
helmctl k8s-deploy -m app.yaml --dry-run
# Deploy to specific namespace with wait
helmctl k8s-deploy -m app.yaml -n production --wait --timeout 600
# Deploy with specific context
helmctl k8s-deploy -m app.yaml --context prod-cluster# Rollback specific release to specific revision
helmctl rollback -f helmfile.yaml -e production -r app-name --revision 2
# Rollback all releases in environment
helmctl rollback -f helmfile.yaml -e staging
# Rollback with context switching
helmctl rollback -f helmfile.yaml -e production --context prod-cluster# Check status of all releases
helmctl status -f helmfile.yaml -e development
# Check specific release status
helmctl status -f helmfile.yaml -e staging -r redis-cache
# Detailed status with Kubernetes info
helmctl status -f helmfile.yaml -e production --detailed# Validate YAML syntax only
helmctl validate -f helmfile.yaml --syntax-only
# Full template validation with rendering
helmctl validate -f helmfile.yaml -e development
# Validate with verbose output
helmctl validate -f helmfile.yaml -e staging --verbose# Show current configuration
helmctl config show
# Initialize with defaults
helmctl config init
# Set configuration values
helmctl config set default_environment staging
helmctl config set default_concurrency 3
helmctl config set preferred_context prod-cluster
# Get configuration values
helmctl config get default_environmentdefault_environment- Default environment for operationsdefault_concurrency- Default concurrency level for deploymentsdefault_timeout- Default timeout for operations (seconds)auto_update_repos- Automatically update Helm repositoriespreferred_context- Default Kubernetes contextlog_level- Logging level (debug, info, warn, error)
# List available contexts
helmctl context list
# Switch to a context
helmctl context use staging-cluster
# Show current context with details
helmctl context currentCreate a configuration file in your project directory:
# Default settings
default_environment: development
default_concurrency: 2
default_timeout: 300
auto_update_repos: true
preferred_context: minikube
log_level: info
# Custom repositories
repositories:
- name: bitnami
url: https://charts.bitnami.com/bitnami
- name: stable
url: https://charts.helm.sh/stable
- name: prometheus-community
url: https://prometheus-community.github.io/helm-charts
- name: grafana
url: https://grafana.github.io/helm-charts- Global:
~/.helmctl.yaml- User-wide settings - Local:
./helmctl.yaml- Project-specific settings - Override: Use
-c/--configflag to specify custom config file
- Interactive confirmations before production deployments
- Dry-run modes for all destructive operations
- Context verification before operations
- Strict linting with configurable warning levels
- Dependency checking - Validates required tools are installed
- File validation - Checks for file existence before operations
- Command validation - Verifies external commands are available
- Graceful failures with descriptive error messages
# Development workflow
make dev # Full development workflow
make quality # Run all quality checks
make test # Run tests
make lint # Lint code
make fmt # Format code
# Building
make build # Build release version
make build-optimized # Build with maximum optimizations
make debug # Build debug version
# Installation
make install # Install to system PATH
make uninstall # Remove from system
# Documentation
make docs # Generate and open documentation
# Utilities
make clean # Clean build artifacts
make audit # Security audit
make update # Update dependencies
make watch # Watch for changes and rebuildThe project includes comprehensive quality checks:
- Clippy linting with strict rules
- Rustfmt formatting enforcement
- Unit and integration tests
- Security auditing with cargo-audit
- Documentation generation
helmctl/
βββ Cargo.toml # Project configuration
βββ Makefile # Build system
βββ README.md # This file
βββ src/
β βββ main.rs # Entry point
β βββ cli.rs # CLI definitions
β βββ config.rs # Configuration management
β βββ utils.rs # Shared utilities
β βββ commands/ # Command implementations
β βββ mod.rs
β βββ lint.rs
β βββ deploy.rs
β βββ k8s.rs
β βββ rollback.rs
β βββ status.rs
β βββ validate.rs
β βββ config_cmd.rs
β βββ context.rs
βββ tests/ # Integration tests
βββ examples/ # Example configurations
βββ docs/ # Documentation
# In your CI/CD pipeline
helmctl lint -f helmfile.yaml -e staging --strict
helmctl deploy -f helmfile.yaml -e staging --dry-run
helmctl deploy -f helmfile.yaml -e staging
helmctl status -f helmfile.yaml -e staging --detailed# Local development
helmctl config set default_environment development
helmctl lint -f helmfile.yaml
helmctl deploy -f helmfile.yaml --dry-run
helmctl deploy -f helmfile.yaml# Production deployment with safety checks
helmctl context use production-cluster
helmctl lint -f helmfile.yaml -e production --strict
helmctl deploy -f helmfile.yaml -e production --diff
helmctl deploy -f helmfile.yaml -e production
helmctl status -f helmfile.yaml -e production --detailed# Debugging failed deployments
helmctl status -f helmfile.yaml -e staging --detailed
helmctl validate -f helmfile.yaml -e staging --verbose
helmctl rollback -f helmfile.yaml -e staging# helmfile.yaml
repositories:
- name: bitnami
url: https://charts.bitnami.com/bitnami
environments:
development:
values:
- environments/development.yaml
production:
values:
- environments/production.yaml
releases:
- name: nginx
chart: bitnami/nginx
version: "15.4.4"
values:
- values/nginx-{{ .Environment.Name }}.yaml# environments/development.yaml
nginx:
replicaCount: 1
service:
type: NodePort
resources:
requests:
memory: "64Mi"
cpu: "50m"# Ensure required tools are installed
which helmfile helm kubectl
# Install missing tools
# Helmfile: https://github.com/helmfile/helmfile#installation
# Helm: https://helm.sh/docs/intro/install/
# kubectl: https://kubernetes.io/docs/tasks/tools/# Update Helm repositories
helm repo update
# Check repository list
helm repo list
# Add missing repositories manually
helm repo add bitnami https://charts.bitnami.com/bitnami# List available contexts
kubectl config get-contexts
# Set correct context
kubectl config use-context <context-name>
# Verify connection
kubectl cluster-infoUse --verbose flag with any command to get detailed output:
helmctl deploy -f helmfile.yaml -e development --verboseEnable logging to file for debugging:
helmctl --log-file ./logs/helmctl.log deploy -f helmfile.yaml- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes following the coding standards
- Run quality checks:
make quality - Test your changes:
make test - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
- Follow Rust best practices and idioms
- Maintain test coverage for new features
- Update documentation for user-facing changes
- Run
make qualitybefore submitting PRs - Use meaningful commit messages
This project is licensed under the MIT License - see the LICENSE file for details.
- Helmfile team for the excellent Helmfile tool
- Helm community for the Helm package manager
- Kubernetes community for the orchestration platform
- Rust community for the amazing programming language and ecosystem
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Documentation: Wiki
Made with β€οΈ and Rust π¦