Skip to content

Commit d8d6836

Browse files
committed
Initial project setup and documentation
- Add project structure and configuration files - Set up CI/CD workflow - Add comprehensive documentation - Configure development tools (.pre-commit, tox, flake8) Closes #1 Closes #2 Closes #3
1 parent e8900a1 commit d8d6836

File tree

13 files changed

+615
-53
lines changed

13 files changed

+615
-53
lines changed

.flake8

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[flake8]
2+
max-line-length = 100
3+
exclude =
4+
.tox,
5+
.git,
6+
__pycache__,
7+
build,
8+
dist,
9+
*.egg,
10+
venv
11+
extend-ignore = E203, W503

.github/workflows/test.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: ['3.8', '3.9', '3.10', '3.11']
15+
16+
steps:
17+
- uses: actions/checkout@v3
18+
19+
- name: Set up Python ${{ matrix.python-version }}
20+
uses: actions/setup-python@v4
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
24+
- name: Install dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install tox tox-gh-actions
28+
29+
- name: Test with tox
30+
run: tox
31+
32+
- name: Upload coverage to Codecov
33+
uses: codecov/codecov-action@v3
34+
with:
35+
file: ./coverage.xml
36+
fail_ci_if_error: true
37+
38+
lint:
39+
runs-on: ubuntu-latest
40+
steps:
41+
- uses: actions/checkout@v3
42+
43+
- name: Set up Python
44+
uses: actions/setup-python@v4
45+
with:
46+
python-version: '3.11'
47+
48+
- name: Install dependencies
49+
run: |
50+
python -m pip install --upgrade pip
51+
pip install tox
52+
53+
- name: Run linting
54+
run: tox -e lint

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,3 +169,11 @@ cython_debug/
169169

170170
# PyPI configuration file
171171
.pypirc
172+
173+
# Generated plugin files
174+
bin/
175+
176+
# macOS specific
177+
.DS_Store
178+
.AppleDouble
179+
.LSOverride

.pre-commit-config.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.5.0
4+
hooks:
5+
- id: trailing-whitespace
6+
- id: end-of-file-fixer
7+
- id: check-yaml
8+
- id: check-added-large-files
9+
- id: debug-statements
10+
- id: check-case-conflict
11+
12+
- repo: https://github.com/psf/black
13+
rev: 24.1.1
14+
hooks:
15+
- id: black
16+
language_version: python3
17+
18+
- repo: https://github.com/pycqa/isort
19+
rev: 5.13.2
20+
hooks:
21+
- id: isort
22+
name: isort (python)
23+
24+
- repo: https://github.com/pycqa/flake8
25+
rev: 7.0.0
26+
hooks:
27+
- id: flake8
28+
additional_dependencies: [flake8-docstrings]

CONTRIBUTING.md

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
# Contributing to Helm Values Manager
2+
3+
We love your input! We want to make contributing to Helm Values Manager as easy and transparent as possible, whether it's:
4+
5+
- Reporting a bug
6+
- Discussing the current state of the code
7+
- Submitting a fix
8+
- Proposing new features
9+
- Becoming a maintainer
10+
11+
## Development Process
12+
13+
We use GitHub to host code, to track issues and feature requests, as well as accept pull requests.
14+
15+
1. Fork the repo and create your branch from `main`.
16+
2. If you've added code that should be tested, add tests.
17+
3. If you've changed APIs, update the documentation.
18+
4. Ensure the test suite passes.
19+
5. Make sure your code passes all code quality checks.
20+
6. Issue that pull request!
21+
22+
## Development Setup
23+
24+
1. Clone your fork:
25+
```bash
26+
git clone https://github.com/YOUR-USERNAME/helm-values-manager
27+
cd helm-values-manager
28+
```
29+
30+
2. Create a virtual environment:
31+
```bash
32+
python -m venv venv
33+
source venv/bin/activate # On Windows: .\venv\Scripts\activate
34+
```
35+
36+
3. Install development dependencies:
37+
```bash
38+
pip install -e ".[dev]"
39+
```
40+
41+
4. Install pre-commit hooks:
42+
```bash
43+
pre-commit install
44+
```
45+
46+
## Code Quality Standards
47+
48+
We use several tools to maintain code quality:
49+
50+
### Pre-commit Hooks
51+
52+
We use pre-commit to run various checks before each commit. The hooks include:
53+
54+
- Code formatting with `black`
55+
- Import sorting with `isort`
56+
- Style guide enforcement with `flake8`
57+
- YAML validation
58+
- Check for large files
59+
- Debug statement checks
60+
- Case conflict checks
61+
- Trailing whitespace removal
62+
- End of file fixes
63+
64+
To run all checks manually:
65+
```bash
66+
pre-commit run --all-files
67+
```
68+
69+
### Testing
70+
71+
We use `pytest` for testing and `tox` for testing against multiple Python versions.
72+
73+
Run all tests:
74+
```bash
75+
tox
76+
```
77+
78+
Run tests for a specific Python version:
79+
```bash
80+
tox -e py39 # For Python 3.9
81+
```
82+
83+
### Documentation
84+
85+
- Use docstrings for all public modules, functions, classes, and methods
86+
- Follow Google style for docstrings
87+
- Keep the README.md and other documentation up to date
88+
89+
## Pull Request Process
90+
91+
1. Update the README.md with details of changes to the interface, if applicable.
92+
2. Update the documentation with any new features or changes.
93+
3. The PR may be merged once you have the sign-off of at least one maintainer.
94+
95+
## Any contributions you make will be under the MIT Software License
96+
97+
In short, when you submit code changes, your submissions are understood to be under the same [MIT License](LICENSE) that covers the project. Feel free to contact the maintainers if that's a concern.
98+
99+
## Report bugs using GitHub's [issue tracker](https://github.com/zipstack/helm-values-manager/issues)
100+
101+
We use GitHub issues to track public bugs. Report a bug by [opening a new issue](https://github.com/zipstack/helm-values-manager/issues/new).
102+
103+
## Write bug reports with detail, background, and sample code
104+
105+
**Great Bug Reports** tend to have:
106+
107+
- A quick summary and/or background
108+
- Steps to reproduce
109+
- Be specific!
110+
- Give sample code if you can.
111+
- What you expected would happen
112+
- What actually happens
113+
- Notes (possibly including why you think this might be happening, or stuff you tried that didn't work)
114+
115+
## License
116+
117+
By contributing, you agree that your contributions will be licensed under its MIT License.

README.md

Lines changed: 78 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,105 @@
1-
# **🚧 This is a work in progress not yet released for usage**
1+
# Helm Values Manager
22

3+
🚀 A powerful Helm plugin for managing values and secrets across multiple environments.
34

4-
# **Helm Values Manager 🚀**
5-
🔐 **Secure & Manage Helm Configurations and Secrets Easily!**
5+
## Features
66

7-
Helm Values Manager is a **Helm plugin** designed to simplify **configuration and secret management** across multiple **Kubernetes deployments**. It provides an intuitive **CLI** to define, validate, and securely store configuration values for Helm-based applications.
7+
- 🔐 **Secure Secret Management**: Safely handle sensitive data
8+
- 🌍 **Multi-Environment Support**: Manage values for dev, staging, prod, and more
9+
- 🔄 **Value Inheritance**: Define common values and override per environment
10+
- 🔍 **Secret Detection**: Automatically identify and protect sensitive data
11+
- 📦 **Easy Integration**: Works seamlessly with existing Helm workflows
812

9-
---
13+
## Requirements
1014

11-
## **✨ Features**
12-
- 🔴 **Deployment-Aware Configuration Management** – Define **global and per-environment configurations**.
13-
- 🔴 **Secure Secret Storage** – Integrates with
14-
- 🔴 **Google Secret Manager**
15-
- 🔴 **AWS Secrets Manager**
16-
- 🔴 **Azure Key Vault**
17-
- 🔴 **HashiCorp Vault**
18-
- 🔴 **Git-Secrets**
19-
- 🔧 **Easily Extendable** – Implement your own backend using the **SecretManager API**.
20-
- 🔴 **Autocompletion Support** – Smooth CLI experience with **Typer-based interactive commands**.
21-
- 🔴 **Validation & Missing Keys Detection** – Avoid misconfigurations with **automated checks**.
22-
- 🔴 **Extensible Secret Manager** – Easily add new **custom backends** for secret storage.
23-
- 🔴 **Seamless ArgoCD & Helm Integration** – Works **out-of-the-box** with Helm-based GitOps workflows.
15+
- Python 3.8 or higher
16+
- Helm 3.x
17+
- pip (Python package installer)
2418

25-
---
19+
## Installation
2620

27-
## **🚀 Quick Start**
28-
1️⃣ **Install the Helm Plugin**
29-
```sh
30-
helm plugin install https://github.com/your-org/helm-values-manager.git
21+
```bash
22+
helm plugin install https://github.com/zipstack/helm-values-manager
3123
```
3224

33-
2️⃣ **Initialize a New Configuration**
34-
```sh
35-
helm values-manager init my-release
25+
## Quick Start
26+
27+
1. Initialize a new configuration:
28+
```bash
29+
helm values-manager init
30+
```
31+
32+
This creates:
33+
- `values-manager.yaml` configuration file
34+
- `values` directory with environment files (`dev.yaml`, `staging.yaml`, `prod.yaml`)
35+
36+
2. View available commands:
37+
```bash
38+
helm values-manager --help
3639
```
3740

38-
3️⃣ **Define a Deployment & Add Keys**
39-
```sh
40-
helm values-manager add-deployment dev --secrets-backend=aws_secrets_manager
41-
helm values-manager add-key DATABASE_URL --required --sensitive --path=global.database.url
41+
## Development
42+
43+
### Setup Development Environment
44+
45+
1. Clone the repository:
46+
```bash
47+
git clone https://github.com/zipstack/helm-values-manager
48+
cd helm-values-manager
4249
```
4350

44-
4️⃣ **Set & Retrieve Secret Values**
45-
```sh
46-
helm values-manager add-secret DATABASE_URL=mydb://connection --deployment=dev
47-
helm values-manager get-secret DATABASE_URL --deployment=dev
51+
2. Create and activate a virtual environment:
52+
```bash
53+
python -m venv venv
54+
source venv/bin/activate # On Windows: .\venv\Scripts\activate
4855
```
4956

50-
5️⃣ **Validate Configurations**
51-
```sh
52-
helm values-manager validate
57+
3. Install development dependencies:
58+
```bash
59+
pip install -e ".[dev]"
5360
```
5461

55-
6️⃣ **Generate the Final `values.yaml`**
56-
```sh
57-
helm values-manager generate --deployment=dev
62+
4. Install pre-commit hooks:
63+
```bash
64+
pre-commit install
5865
```
5966

60-
---
67+
### Running Tests
68+
69+
Run tests with tox (will test against multiple Python versions):
70+
```bash
71+
tox
72+
```
73+
74+
Run tests for a specific Python version:
75+
```bash
76+
tox -e py39 # For Python 3.9
77+
```
78+
79+
### Code Quality
80+
81+
This project uses several tools to maintain code quality:
82+
83+
- **pre-commit**: Runs various checks before each commit
84+
- **black**: Code formatting
85+
- **isort**: Import sorting
86+
- **flake8**: Style guide enforcement
87+
88+
Run all code quality checks manually:
89+
```bash
90+
pre-commit run --all-files
91+
```
6192

62-
## **📜 Documentation**
63-
📖 **[Read the Full Documentation](https://github.com/your-org/helm-values-manager/wiki)**
64-
💡 **[View the Architecture Decision Record (ADR)](https://github.com/your-org/helm-values-manager/wiki/ADRs/001-helm-values-manager.md)**
65-
🛠 **[Contribute to the Project](https://github.com/your-org/helm-values-manager/wiki/Contribution/contributing.md)**
93+
## Contributing
6694

67-
---
95+
🙌 PRs and contributions are welcome! Let's build a better Helm secret & config manager together.
6896

69-
## **🤝 Contributing**
70-
Want to help? Check out our **[contribution guidelines](https://github.com/your-org/helm-values-manager/wiki/Contribution/contributing.md)**! We welcome issues, PRs, and feature suggestions. 🎉
97+
Please see our [Contributing Guide](CONTRIBUTING.md) for details on how to contribute to this project.
7198

72-
---
99+
## 📌 License
73100

74-
## **📌 License**
75101
🔓 Open-source under the **MIT License**.
76102

77-
---
103+
### 🌟 Star this repo if you find it useful! 🌟
78104

79-
### **🌟 Star this repo if you find it useful! 🌟**
80-
🙌 PRs and contributions are welcome! Let's build a better **Helm secret & config manager** together. 🚀
105+
[![Star](https://img.shields.io/github/stars/zipstack/helm-values-manager?style=social)](https://github.com/zipstack/helm-values-manager)

helm_values_manager/__init__.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
"""A Helm plugin to manage values and secrets across environments."""
2+
3+
__version__ = "0.1.0"
4+
__description__ = "A Helm plugin to manage values and secrets across environments."
5+
6+
from .cli import app
7+
8+
9+
def helm_values_manager():
10+
"""Entry point for the Helm plugin."""
11+
app()

0 commit comments

Comments
 (0)