Skip to content

Commit c53560a

Browse files
committed
Update claude.md for helm charts
1 parent 1767372 commit c53560a

File tree

1 file changed

+47
-12
lines changed

1 file changed

+47
-12
lines changed

helm-charts/CLAUDE.md

Lines changed: 47 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
66

77
This subdirectory contains the official Helm charts for Digger, an open-source CI/CD tool for Terraform. Currently maintains one chart: `digger-backend`.
88

9+
**Important**: This is part of the main digger monorepo. Helm charts are developed here but published to OCI registry for distribution.
10+
911
## Common Development Commands
1012

1113
```bash
@@ -44,37 +46,70 @@ helm upgrade digger-backend ./digger-backend/
4446
- `backend-ingress.yaml` - Ingress configuration (enabled by default)
4547

4648
### CI/CD Workflows
47-
- **Pull Request Testing**: Automatically runs `helm unittest` on PR changes
48-
- **Release Process**: On merge to main, runs linting, testing, and publishes to GitHub Pages
49+
- **Pull Request Testing** (`.github/workflows/helm-test.yml`): Runs `helm unittest` and linting on PR changes to helm-charts/
50+
- **Release Process** (`.github/workflows/helm-release.yml`): On merge to main, publishes to GitHub Container Registry at `oci://ghcr.io/diggerhq/helm-charts/digger-backend`
51+
- **Installation**: Users install directly from OCI registry, not GitHub Pages
4952

5053
### Important Configuration Patterns
5154

5255
1. **Secret Management**: The chart supports both direct values and references to existing secrets:
5356
```yaml
5457
# Direct values
55-
secrets:
56-
githubAppID: "12345"
58+
digger:
59+
secret:
60+
githubAppID: "12345" # Note: uppercase ID
61+
githubAppKeyFile: "<base64-encoded>" # Not githubAppPrivateKey
5762

5863
# Or reference existing secret
59-
existingSecret: "my-existing-secret"
64+
digger:
65+
secret:
66+
useExistingSecret: true
67+
existingSecretName: "my-existing-secret"
6068
```
69+
70+
**Critical**: Configuration uses `secret` (singular), not `secrets`. Field names are case-sensitive (e.g., `githubAppID` not `githubAppId`)
6171

62-
2. **Database Configuration**: Can use external PostgreSQL or deploy test instance:
72+
2. **Database Configuration**: PostgreSQL configuration is under `digger.postgres`:
6373
```yaml
6474
# External database
65-
postgres:
66-
enabled: false
67-
secrets:
68-
databaseURL: "postgresql://..."
75+
digger:
76+
postgres:
77+
user: "digger"
78+
database: "digger"
79+
host: "postgresql.example.com"
80+
password: "secure-password"
81+
sslmode: "require"
6982
70-
# Test database
83+
# Test database (separate top-level key)
7184
postgres:
7285
enabled: true
86+
secret:
87+
postgresPassword: "test-password"
7388
```
7489

7590
3. **Resource Configuration**: Supports standard Kubernetes resource patterns (limits, requests, nodeSelector, tolerations, affinity)
7691

7792
### Testing Strategy
7893
- Unit tests in `digger-backend/tests/` verify template rendering
7994
- Tests use helm-unittest framework with snapshot testing
80-
- CI automatically runs tests on PRs and before releases
95+
- CI automatically runs tests on PRs and before releases
96+
97+
## Monorepo Integration Notes
98+
99+
1. **Directory Structure**: Helm charts live in `/helm-charts/` subdirectory of main digger repo, with charts directly under it (not nested in `/charts/`)
100+
101+
2. **Publishing Strategy**:
102+
- Charts are developed in the main repo but published to GitHub Container Registry (OCI)
103+
- Users install from `oci://ghcr.io/diggerhq/helm-charts/digger-backend`
104+
- No longer using separate helm-charts repository or GitHub Pages
105+
106+
3. **Version Management**:
107+
- Chart version is in `Chart.yaml` (e.g., `version: 0.1.12`)
108+
- App version should match the digger backend version (e.g., `appVersion: "v0.6.106"`)
109+
- Default image tag in `values.yaml` should typically match appVersion
110+
111+
4. **Common Issues to Watch For**:
112+
- Configuration key names are case-sensitive (`githubAppID` not `githubAppId`)
113+
- Use `secret` (singular) not `secrets` in configuration
114+
- GitHub App private key field is `githubAppKeyFile` (base64 encoded), not `githubAppPrivateKey`
115+
- PostgreSQL config is under `digger.postgres`, not in a `databaseURL` field

0 commit comments

Comments
 (0)