Skip to content

Commit 00de15b

Browse files
committed
docs: add repository guidelines and best practices for development
1 parent 4e1fa49 commit 00de15b

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

AGENTS.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Repository Guidelines
2+
3+
## Project Structure & Module Organization
4+
5+
This repository contains a Helm 3 application chart for a Redis cluster. Chart metadata lives in `Chart.yaml`, while user-facing defaults are defined in `values.yaml`. Kubernetes resources are under `templates/`: `_helpers.tpl` contains reusable named templates, `statefulset.yaml` defines Redis and exporter containers, and the remaining files define services, ConfigMaps, initialization scripts, and monitoring resources. CI and release workflows live in `.github/workflows/`. Keep parameter documentation in `README.md` synchronized with changes to `values.yaml`.
6+
7+
## Build, Test, and Development Commands
8+
9+
- `helm lint .` performs basic chart and template validation.
10+
- `helm template redis-cluster .` renders all manifests locally for inspection.
11+
- `helm template redis-cluster . -f custom-values.yaml` tests a specific configuration.
12+
- `helm kubeconform .` runs the same Kubernetes schema validation used by CI; install the `jtyr/kubeconform-helm` plugin first.
13+
- `helm package . --dependency-update` creates a distributable chart archive.
14+
15+
Before submitting changes, run both `helm lint .` and `helm kubeconform .`. Render targeted values whenever a feature adds conditional YAML.
16+
17+
## Coding Style & Naming Conventions
18+
19+
Use two-space indentation in YAML and preserve correct nesting after Helm directives. Name values in lower camel case (`minReadySeconds`, `extraEnvs`) and Kubernetes resources in kebab case. Prefix named helpers with `redis-cluster.`, for example `redis-cluster.extraEnvs`. Use whitespace-trimming operators (`{{-` and `-}}`) carefully; always inspect rendered output when changing loops or includes. Quote string values where Kubernetes may otherwise infer booleans or numbers.
20+
21+
## Testing Guidelines
22+
23+
There is no standalone unit-test suite. Tests are rendered-manifest and schema checks. Cover both enabled and disabled branches, empty lists, multiple list entries, and nested objects such as `valueFrom`. Never commit credentials in test values; use placeholders.
24+
25+
## Commit & Pull Request Guidelines
26+
27+
Recent history follows Conventional Commit-style subjects: `feat:`, `chore:`, `ci:`, and `style:`. Use an imperative, concise subject, such as `feat: add Redis environment variables`. Pull requests should explain behavior changes, list validation commands run, link relevant issues, and include a focused rendered YAML excerpt when template output changes. Update `README.md`, `values.yaml`, and the chart version when required for a release.
28+
29+
## Security & Configuration Tips
30+
31+
Do not place real Redis passwords or registry tokens in committed values or rendered manifests. Prefer Kubernetes Secrets via `valueFrom.secretKeyRef` for sensitive environment variables.

0 commit comments

Comments
 (0)