Skip to content

Commit 7a3da43

Browse files
authored
chore: facilitate local dev overrides during helm installation (kagent-dev#1508)
I often want to install locally using Helm but with a large portion of the feature-set customised/disabled (minimal agents, no KMCP, database set to postgres, etc.). This is currently quite painful as, to avoid changes being tracked in git (i.e. editing `helm/kagent/values.yaml`), I need to override this all within terminal calls. What do you think about supporting the use of `.env` instead? Signed-off-by: Brian Fox <878612+onematchfox@users.noreply.github.com>
1 parent 52327c3 commit 7a3da43

3 files changed

Lines changed: 28 additions & 8 deletions

File tree

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
### dotenv template
22
python/.env
3+
.env
4+
values.local.yaml
35

46
test_results
57

DEVELOPMENT.md

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ Before you can run kagent in Kubernetes, you need to have the following tools in
2222
- **Docker Buildx** (v0.23.0+)
2323
- **Make**
2424

25-
26-
2725
### Installation Verification
2826

2927
You can verify your installation by running:
@@ -39,7 +37,6 @@ docker buildx version
3937
make --version
4038
```
4139

42-
4340
## How to run everything in Kubernetes
4441

4542
1. Create a cluster:
@@ -48,34 +45,51 @@ make --version
4845
make create-kind-cluster
4946
```
5047

51-
2. Configure the cluster and set the default namespace `kagent`:
48+
1. Configure the cluster and set the default namespace `kagent`:
5249

5350
```shell
5451
make use-kind-cluster
5552
```
5653

57-
3. Set your model provider:
54+
1. Set your model provider:
5855

5956
```shell
6057
export KAGENT_DEFAULT_MODEL_PROVIDER=openAI
6158
#or
6259
export KAGENT_DEFAULT_MODEL_PROVIDER=anthropic
6360
```
6461

65-
4. Set your providers API_KEY:
62+
1. Set your providers API_KEY:
6663

6764
```shell
6865
export OPENAI_API_KEY=your-openai-api-key
6966
#or
7067
export ANTHROPIC_API_KEY=your-anthropic-api-key
7168
```
7269

73-
5. Build images, load them into kind cluster and deploy everything using Helm:
70+
Alternatively, create a `.env` file at the repo root (gitignored). This file is
71+
loaded by the Makefile (via `-include .env`) to inject environment variables
72+
when you run `make` targets:
73+
74+
```shell
75+
OPENAI_API_KEY=your-openai-api-key
76+
```
77+
78+
1. Build images, load them into kind cluster and deploy everything using Helm:
7479

7580
```shell
7681
make helm-install
7782
```
7883

84+
To apply personal Helm overrides without committing them, create
85+
`helm/kagent/values.local.yaml` (gitignored) and set `KAGENT_HELM_EXTRA_ARGS` in
86+
your `.env` file (which is read by the Makefile when you run `make`):
87+
88+
```shell
89+
# .env
90+
KAGENT_HELM_EXTRA_ARGS=-f helm/kagent/values.local.yaml
91+
```
92+
7993
To access the UI, port-forward to the UI port on the `kagent-ui` service:
8094

8195
```shell
@@ -134,7 +148,7 @@ docker buildx create --name kagent-builder-v0.23.0 --platform linux/amd64,linux/
134148

135149
Then run the `make helm-install` command again.
136150

137-
### Run kagent and an agent locally.
151+
### Run kagent and an agent locally
138152

139153
create a minimal cluster with kind. scale kagent to 0 replicas, as we will run it locally.
140154

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# Load local overrides (gitignored) — e.g. KAGENT_HELM_EXTRA_ARGS=-f helm/kagent/values.local.yaml
2+
-include .env
3+
export
4+
15
# Image configuration
26
DOCKER_REGISTRY ?= localhost:5001
37
BASE_IMAGE_REGISTRY ?= cgr.dev

0 commit comments

Comments
 (0)