|
| 1 | +# Helm Values Manager |
| 2 | + |
| 3 | +[](https://sonarcloud.io/summary/new_code?id=Zipstack_helm-values-manager) |
| 4 | +[](https://github.com/Zipstack/helm-values-manager/actions/workflows/test.yml) |
| 5 | +[](https://results.pre-commit.ci/latest/github/Zipstack/helm-values-manager/main) |
| 6 | +[](https://github.com/Zipstack/helm-values-manager/actions/workflows/github-code-scanning/codeql) |
| 7 | +[](https://sonarcloud.io/summary/new_code?id=Zipstack_helm-values-manager) |
| 8 | +[](https://sonarcloud.io/summary/new_code?id=Zipstack_helm-values-manager) |
| 9 | +[](https://sonarcloud.io/summary/new_code?id=Zipstack_helm-values-manager) |
| 10 | +[](https://sonarcloud.io/summary/new_code?id=Zipstack_helm-values-manager) |
| 11 | + |
| 12 | +🚀 A powerful Helm plugin for managing values and secrets across multiple environments. |
| 13 | + |
| 14 | +## The Problem |
| 15 | + |
| 16 | +Managing Helm values across multiple environments (dev, staging, prod) is challenging: |
| 17 | + |
| 18 | +- 🔀 **Values Sprawl**: Values spread across multiple files become hard to track |
| 19 | +- 🔍 **Configuration Discovery**: Difficult to know what values can be configured |
| 20 | +- ❌ **Missing Values**: No validation for required values before deployment |
| 21 | +- 🔐 **Secret Management**: Sensitive data mixed with regular values |
| 22 | +- 📝 **Documentation**: Values often lack descriptions and context |
| 23 | + |
| 24 | +Helm Values Manager solves these challenges by providing a structured way to define, validate, and manage values across environments, with built-in support for documentation and secret handling. |
| 25 | + |
| 26 | +## Features |
| 27 | + |
| 28 | +- 🔐 **Secure Secret Management**: Safely handle sensitive data |
| 29 | +- 🌍 **Multi-Environment Support**: Manage values for dev, staging, prod, and more |
| 30 | +- 🔄 **Value Inheritance**: Define common values and override per environment |
| 31 | +- 🔍 **Secret Detection**: Automatically identify and protect sensitive data |
| 32 | +- 📦 **Easy Integration**: Works seamlessly with existing Helm workflows |
| 33 | + |
| 34 | +## Requirements |
| 35 | + |
| 36 | +- Python 3.9 or higher |
| 37 | +- Helm 3.x |
| 38 | +- pip (Python package installer) |
| 39 | + |
| 40 | +## Installation |
| 41 | + |
| 42 | +```bash |
| 43 | +helm plugin install https://github.com/Zipstack/helm-values-manager --version v0.1.0 |
| 44 | +``` |
| 45 | + |
| 46 | +## Quick Start |
| 47 | + |
| 48 | +1. Initialize a new configuration for your Helm release: |
| 49 | + |
| 50 | +```bash |
| 51 | +helm values-manager init --release my-app |
| 52 | +``` |
| 53 | + |
| 54 | +2. Add value configurations with descriptions and validation: |
| 55 | + |
| 56 | +```bash |
| 57 | +# Add a required configuration |
| 58 | +helm values-manager add-value-config --path app.replicas --description "Number of application replicas" --required |
| 59 | + |
| 60 | +# Add an optional configuration |
| 61 | +helm values-manager add-value-config --path app.logLevel --description "Application log level (debug/info/warn/error)" |
| 62 | +``` |
| 63 | + |
| 64 | +3. Add deployments for different environments: |
| 65 | + |
| 66 | +```bash |
| 67 | +helm values-manager add-deployment dev |
| 68 | +helm values-manager add-deployment prod |
| 69 | +``` |
| 70 | + |
| 71 | +4. Set values for each deployment: |
| 72 | + |
| 73 | +```bash |
| 74 | +# Set values for dev |
| 75 | +helm values-manager set-value --path app.replicas --value 1 --deployment dev |
| 76 | +helm values-manager set-value --path app.logLevel --value debug --deployment dev |
| 77 | + |
| 78 | +# Set values for prod |
| 79 | +helm values-manager set-value --path app.replicas --value 3 --deployment prod |
| 80 | +helm values-manager set-value --path app.logLevel --value info --deployment prod |
| 81 | +``` |
| 82 | + |
| 83 | +5. Generate values files for deployments: |
| 84 | + |
| 85 | +```bash |
| 86 | +# Generate dev values |
| 87 | +helm values-manager generate --deployment dev --output ./dev |
| 88 | + |
| 89 | +# Generate prod values |
| 90 | +helm values-manager generate --deployment prod --output ./prod |
| 91 | +``` |
| 92 | +This will create environment-specific values files: |
| 93 | + |
| 94 | +`dev/dev.my-app.values.yaml`: |
| 95 | +```yaml |
| 96 | +app: |
| 97 | + logLevel: debug |
| 98 | + replicas: '1' |
| 99 | +``` |
| 100 | +
|
| 101 | +`prod/prod.my-app.values.yaml`: |
| 102 | +```yaml |
| 103 | +app: |
| 104 | + logLevel: info |
| 105 | + replicas: '3' |
| 106 | +``` |
| 107 | + |
| 108 | +6. View available commands and options: |
| 109 | + |
| 110 | +```bash |
| 111 | +helm values-manager --help |
| 112 | +``` |
| 113 | + |
| 114 | +## Development |
| 115 | + |
| 116 | +### Setup Development Environment |
| 117 | + |
| 118 | +1. Clone the repository: |
| 119 | + |
| 120 | +```bash |
| 121 | +git clone https://github.com/zipstack/helm-values-manager |
| 122 | +cd helm-values-manager |
| 123 | +``` |
| 124 | + |
| 125 | +2. Create and activate a virtual environment: |
| 126 | + |
| 127 | +```bash |
| 128 | +python -m venv venv |
| 129 | +source venv/bin/activate # On Windows: .\venv\Scripts\activate |
| 130 | +``` |
| 131 | + |
| 132 | +3. Install development dependencies: |
| 133 | + |
| 134 | +```bash |
| 135 | +pip install -e ".[dev]" |
| 136 | +``` |
| 137 | + |
| 138 | +4. Install pre-commit hooks: |
| 139 | + |
| 140 | +```bash |
| 141 | +pre-commit install |
| 142 | +``` |
| 143 | + |
| 144 | +### Running Tests |
| 145 | + |
| 146 | +Run tests with tox (will test against multiple Python versions): |
| 147 | + |
| 148 | +```bash |
| 149 | +tox |
| 150 | +``` |
| 151 | + |
| 152 | +Run tests for a specific Python version: |
| 153 | + |
| 154 | +```bash |
| 155 | +tox -e py39 # For Python 3.9 |
| 156 | +``` |
| 157 | + |
| 158 | +### Code Quality |
| 159 | + |
| 160 | +This project uses several tools to maintain code quality: |
| 161 | + |
| 162 | +- **pre-commit**: Runs various checks before each commit |
| 163 | +- **black**: Code formatting |
| 164 | +- **isort**: Import sorting |
| 165 | +- **flake8**: Style guide enforcement |
| 166 | + |
| 167 | +Run all code quality checks manually: |
| 168 | + |
| 169 | +```bash |
| 170 | +pre-commit run --all-files |
| 171 | +``` |
| 172 | + |
| 173 | +## Contributing |
| 174 | + |
| 175 | +🙌 PRs and contributions are welcome! Let's build a better Helm secret & config manager together. |
| 176 | + |
| 177 | +Please see our [Contributing Guide](CONTRIBUTING.md) for details on how to contribute to this project. |
| 178 | + |
| 179 | +## Acknowledgments |
| 180 | + |
| 181 | +We would like to acknowledge the following AI tools that have helped in the development of this project: |
| 182 | + |
| 183 | +- **[Windsurf IDE with Cascade](https://codeium.com/windsurf)**: For providing intelligent code assistance and pair programming capabilities. Also for helping with improving and documenting the architecture. |
| 184 | +- **[Software Architect GPT](https://chatgpt.com/g/g-J0FYgDhN5-software-architect-gpt)**: For initial architectural guidance and design decisions. |
| 185 | + |
| 186 | +While these AI tools have been valuable in our development process, all code and design decisions have been carefully reviewed and validated by our development team to ensure quality and security. |
| 187 | + |
| 188 | +## 📌 License |
| 189 | + |
| 190 | +🔓 Open-source under the [MIT License](LICENSE). |
| 191 | + |
| 192 | +### 🌟 Star this repo if you find it useful! 🌟 |
| 193 | + |
| 194 | +[](https://github.com/zipstack/helm-values-manager) |
0 commit comments