Skip to content

Commit 7e9345b

Browse files
chris-sandersDexterYanhedge-sparrow
authored
Add wg-easy applicaiton example with helmfile and taskfile flow (#39)
* Add wg-easy application example with helmfile and taskfile flow * Update port configuration and expose utility tasks - Change web/HTTPS ports from 80/443 to 30080/30443 - Configure explicit nodePort values for Traefik - Make utility tasks public by removing internal flags - Fix helmfile command execution with eval - Enable web route configuration in wg-easy values * Parameterize application name with default value of wg-easy * Update kubeconfig file naming convention * Try splitting sdk into it's own chart and deploying * Roll back sdk in helmfile will need a seperate path through replicated release for that * Using environments to enable local vs SaaS release testing, but I don't like it * First pass at docs * docs(wg-easy): Add prerequisites section to development workflow * Refactor Taskfile to improve k3s traefik removal workflow * Update documentation to reference setup-kubeconfig instead of get-kubeconfig * refactor: Enhance GCP VM creation and SSH connection with robust retry and timeout logic * add verify kubeconfig * add list cluster and use dotenv to update chart release version * update taskfile to fix promote fail and add release lint inspect * add example env * add development md * remove delelopment md * Use REPLICATED_APP for app name we already have to have this set to work with the replicated CLI * Consistent naming for release tasks * task dep * update docs * add design md to use AI for choosing right tools and start to create a development workflow * Remove unrelated change and update doc * rollback unrelated change * remove unrelated change * update doc * more <noun>-<verb> naming * scrape namespaces from helmChart resources * remove additionalNamespaces from global appliation manifest * Add script to automatically set helmChart versions from Chart.yaml * Inline version script --------- Co-authored-by: Dexter Yan <[email protected]> Co-authored-by: hedge-sparrow <[email protected]> Co-authored-by: Ash <[email protected]>
1 parent 7ee101b commit 7e9345b

38 files changed

+2483
-0
lines changed

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,10 @@ Thumbs.db
3030
*.pyo
3131
*.pyd
3232
__pycache__/
33+
34+
# wg-easy specific
35+
*.kubeconfig
36+
applications/wg-easy/release/
37+
applications/wg-easy/*/charts/
38+
applications/wg-easy/*/Chart.lock
39+
.aider*

applications/wg-easy/README.md

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# WG-Easy Helm Chart Development Pattern
2+
3+
This repository demonstrates a structured approach to developing and deploying Helm charts with Replicated integration. It focuses on a progressive development workflow that builds complexity incrementally, allowing developers to get fast feedback at each stage.
4+
5+
## Core Principles
6+
7+
The WG-Easy Helm Chart pattern is built on five fundamental principles:
8+
9+
### 1. Progressive Complexity
10+
11+
Start simple with individual chart validation and progressively move to more complex environments. This allows issues to be caught early when they are easier to fix.
12+
13+
- Begin with local chart validation
14+
- Move to single chart deployments
15+
- Progress to multi-chart integration
16+
- Finally test in production-like environments
17+
18+
### 2. Fast Feedback Loops
19+
20+
Get immediate feedback at each development stage by automating testing and validation. This shortens the overall development cycle.
21+
22+
- Automated chart validation
23+
- Quick cluster creation and deployment
24+
- Standardized testing at each stage
25+
- Fast iteration between changes
26+
27+
### 3. Reproducible Steps
28+
29+
Ensure consistent environments and processes across all stages of development, eliminating "works on my machine" issues.
30+
31+
- Consistent chart configurations
32+
- Automated environment setup
33+
- Deterministic dependency management
34+
- Standardized deployment procedures
35+
36+
### 4. Modular Configuration
37+
38+
Allow different components to own their configuration independently, which can be merged at release time.
39+
40+
- Per-chart configuration files
41+
- Automatic configuration merging
42+
- Clear ownership boundaries
43+
- Simplified collaborative development
44+
45+
### 5. Automation First
46+
47+
Use tools to automate repetitive tasks, reducing human error and increasing development velocity.
48+
49+
- Task-based workflow automation
50+
- Helmfile for orchestration
51+
- Automated validation and testing
52+
- Streamlined release process
53+
54+
## Repository Structure
55+
56+
```
57+
applications/wg-easy/
58+
├── charts/templates/ # Common templates shared across charts
59+
├── cert-manager/ # Wrapped cert-manager chart
60+
├── cert-manager-issuers/ # Chart for cert-manager issuers
61+
├── replicated/ # Root Replicated configuration
62+
├── replicated-sdk/ # Replicated SDK chart
63+
├── taskfiles/ # Task utility functions
64+
├── traefik/ # Wrapped Traefik chart
65+
├── wg-easy/ # Main application chart
66+
├── helmfile.yaml # Defines chart installation order
67+
└── Taskfile.yaml # Main task definitions
68+
```
69+
70+
## Architecture Overview
71+
72+
![Architecture Diagram](docs/architecture.png)
73+
74+
Key components:
75+
- **Taskfile**: Orchestrates the workflow with automated tasks
76+
- **Helmfile**: Manages chart dependencies and installation order
77+
- **Wrapped Charts**: Encapsulate upstream charts for consistency
78+
- **Shared Templates**: Provide reusable components across charts
79+
- **Replicated Integration**: Enables enterprise distribution
80+
81+
## Learn More
82+
83+
- [Chart Structure Guide](docs/chart-structure.md)
84+
- [Development Workflow](docs/development-workflow.md)
85+
- [Task Reference](docs/task-reference.md)
86+
- [Replicated Integration](docs/replicated-integration.md)
87+
- [Example Patterns](docs/examples.md)
88+
89+
---
90+
91+
This pattern is designed to be adaptable to different applications and requirements. Feel free to modify it to suit your specific needs.

0 commit comments

Comments
 (0)