Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
2f7b5eb
fix typo, remove unneeded var
adamancini May 7, 2025
6a29113
remove replicated-library chart in favor of bjw-s library chart
adamancini May 7, 2025
7fd814a
refactor: improve helmChart version handling and exclude templates chart
adamancini May 7, 2025
75c254c
set ip forwarding with sysctl in pod spec
adamancini May 7, 2025
a55c1b8
set ip forwarding with sysctl in pod spec
adamancini May 7, 2025
8871051
Revert "set ip forwarding with sysctl in pod spec"
adamancini May 7, 2025
844fb02
use RELEASE_CHANNEL and RELEASE_VERSION
adamancini May 7, 2025
b36b5ac
ignore cursor indexing file
adamancini May 7, 2025
97cd848
set up wg-easy env vars
adamancini May 7, 2025
d36da3d
dont wrap the wg-easy chart
adamancini May 8, 2025
a9503fe
replicated-sdk values and wg-easy values
adamancini May 13, 2025
0ccdc35
fix securityContext scope
adamancini May 13, 2025
5e8705b
Don't double quote env vars
hedge-sparrow May 14, 2025
b8d46b4
CLAUDE.md
adamancini May 13, 2025
65b8381
update to version 14 image and default to bcrypted password_hash
adamancini May 14, 2025
4222449
update password_hash guidance and defaults
adamancini May 14, 2025
0c84c3a
s/docker/podman ;)
hedge-sparrow May 15, 2025
8cfa5fd
remove deprecated troubleshoot values
adamancini May 20, 2025
ac1773e
remove "web" ingressRoute
adamancini May 22, 2025
5c1dbc3
remove "web" ingressRoute
adamancini May 22, 2025
8dae310
update maintainers list
adamancini May 22, 2025
28d1202
Claude fixes things (#67)
chris-sanders May 27, 2025
3e105d2
add helm-uninstall task to remove all charts from cluster
adamancini May 27, 2025
342bf0d
make "web" endpoint use high port
adamancini May 27, 2025
fc99cbf
Merge branch 'main' into adamancini/bjw-template
adamancini May 27, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*.tgz

# Ignore IDE and editor folders
.cursorindexingignore
.idea/
.vscode/
*.swp
Expand Down Expand Up @@ -42,6 +43,9 @@ __pycache__/
# Cursor
.cursor/

# Claude
.claude/

# Mlflow specific
applications/mlflow/tests/.venv/
**/charts/.rendered-templates/
Expand All @@ -53,3 +57,5 @@ applications/wg-easy/release/
# SpecStory explanation file
.specstory/.what-is-this.md
*.tar.gz

**/.claude/settings.local.json
219 changes: 219 additions & 0 deletions applications/wg-easy/CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,219 @@
# CLAUDE.md for WG-Easy Helm Chart Development

This file contains common commands and workflows for working with the WG-Easy Helm chart project.

## Core Principles

The WG-Easy Helm Chart pattern is built on five fundamental principles:

### 1. Progressive Complexity

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.

- Begin with local chart validation
- Move to single chart deployments
- Progress to multi-chart integration
- Finally test in production-like environments

### 2. Fast Feedback Loops

Get immediate feedback at each development stage by automating testing and validation. This shortens the overall development cycle.

- Automated chart validation
- Quick cluster creation and deployment
- Standardized testing at each stage
- Fast iteration between changes

### 3. Reproducible Steps

Ensure consistent environments and processes across all stages of development, eliminating "works on my machine" issues.

- Consistent chart configurations
- Automated environment setup
- Deterministic dependency management
- Standardized deployment procedures

### 4. Modular Configuration

Allow different components to own their configuration independently, which can be merged at release time.

- Per-chart configuration files
- Automatic configuration merging
- Clear ownership boundaries
- Simplified collaborative development

### 5. Automation First

Use tools to automate repetitive tasks, reducing human error and increasing development velocity.

- Task-based workflow automation
- Helmfile for orchestration
- Automated validation and testing
- Streamlined release process

## Project Filesystem Layout

- `charts/` - Contains all Helm charts
- `cert-manager/` - Wrapped cert-manager chart
- `cert-manager-issuers/` - Chart for cert-manager issuers
- `replicated-sdk/` - Replicated SDK chart
- `templates/` - Common templates shared across charts
- `traefik/` - Wrapped Traefik chart
- `wg-easy/` - Main application chart
- `replicated/` - Root Replicated configuration
- `taskfiles/` - Task utility functions
- `helmfile.yaml.gotmpl` - Defines chart installation order
- `Taskfile.yaml` - Main task definitions

## Architecture Overview

Key components:
- **Taskfile**: Orchestrates the workflow with automated tasks
- **Helmfile**: Manages chart dependencies and installation order
- **Wrapped Charts**: Encapsulate upstream charts for consistency
- **Shared Templates**: Provide reusable components across charts
- **Replicated Integration**: Enables enterprise distribution

## `wg-easy` Chart

wg-easy uses the `bjw-s/common` [library chart](https://github.com/bjw-s-labs/helm-charts/tree/main) to generate Kubernetes resources. Library charts are commonly used to create DRY templates when authoring Helm charts.

Example values inputs to the bjw-s/common library chart are defined at https://github.com/bjw-s-labs/helm-charts/blob/main/charts/library/common/values.yaml and the schema for validation is defined at https://github.com/bjw-s-labs/helm-charts/blob/main/charts/library/common/values.schema.json

## `templates` Chart

The `templates` chart is imported as a dependency in Chart.yaml and is used to generate some common Kubernetes resources like Traefik routes.

## Development Environment Setup

```bash
# Start the development container
task dev:start

# Get a shell in the development container
task dev:shell

# Stop the development container
task dev:stop

# Rebuild the development container image
task dev:build-image
```

## Cluster Management

```bash
# Create a test cluster (K3s by default)
task cluster-create

# Get information about the current cluster
task cluster-list

# Set up kubeconfig for the test cluster
task setup-kubeconfig

# Expose ports for the cluster
task cluster-ports-expose

# Delete the test cluster
task cluster-delete
```

## Chart Development

```bash
# Update Helm dependencies for all charts
task dependencies-update

# Install all charts using Helmfile
task helm-install

# Run tests
task test

# Full test cycle (create cluster, deploy, test, delete)
task full-test-cycle
```

## Release Management

```bash
# Prepare release files
task release-prepare

# Create and promote a release
task release-create RELEASE_VERSION=x.y.z RELEASE_CHANNEL=Unstable

# Customer management
task customer-create CUSTOMER_NAME=example
task customer-ls
task customer-delete CUSTOMER_ID=your-customer-id
```

## Customization Options

Common variables that can be overridden:

```bash
# Cluster configuration
CLUSTER_NAME=test-cluster
K8S_VERSION=1.32.2
DISK_SIZE=100
INSTANCE_TYPE=r1.small
DISTRIBUTION=k3s

# Release configuration
RELEASE_CHANNEL=Unstable
RELEASE_VERSION=0.0.1
RELEASE_NOTES="Release notes"

# Application configuration
APP_SLUG=wg-easy-cre
```

## Claude Code Configuration

When using Claude Code with this repository, use these timeout settings for long-running operations:

- `task helm-install`: Use 1200000ms (20 minutes) timeout - double the helmfile timeout of 600s
- `task full-test-cycle`: Use 1800000ms (30 minutes) timeout - accounts for cluster creation + deployment + testing
- `task cluster-create`: Use 600000ms (10 minutes) timeout - double typical cluster creation time

Example: When running `task helm-install` via Bash tool, use `timeout: 1200000` parameter.

## Common Workflows

### Local Development

1. Start development container: `task dev:start`
2. Get a shell in the container: `task dev:shell`
3. Create a test cluster: `task cluster-create`
4. Set up kubeconfig: `task setup-kubeconfig`
5. Update dependencies: `task dependencies-update`
6. Deploy charts: `task helm-install`
7. Run tests: `task test`
8. Clean up: `task cluster-delete`

### Creating a Release

1. Update chart versions in respective `Chart.yaml` files
2. Prepare release files: `task release-prepare`
3. Create and promote release: `task release-create RELEASE_VERSION=x.y.z RELEASE_CHANNEL=Unstable`

### Testing a Release

1. Create a customer if needed: `task customer-create CUSTOMER_NAME=test-customer`
2. Create a test cluster: `task cluster-create`
3. Set up kubeconfig: `task setup-kubeconfig`
4. Expose ports: `task cluster-ports-expose`
5. Deploy application: `task helm-install`
6. Run tests: `task test`
7. Clean up: `task cluster-delete`

## Additional Resources

- [Chart Structure Guide](docs/chart-structure.md)
- [Development Workflow](docs/development-workflow.md)
- [Task Reference](docs/task-reference.md)
- [Replicated Integration](docs/replicated-integration.md)
- [Example Patterns](docs/examples.md)
Loading
Loading