mirror of
https://github.com/harivansh-afk/agentikube.git
synced 2026-04-15 07:04:44 +00:00
helm release
This commit is contained in:
parent
44fe1e1f5c
commit
305c77eec9
2 changed files with 84 additions and 66 deletions
45
.github/workflows/release-helm.yml
vendored
Normal file
45
.github/workflows/release-helm.yml
vendored
Normal file
|
|
@ -0,0 +1,45 @@
|
||||||
|
name: Release Helm Chart
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- "v*"
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
packages: write
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
env:
|
||||||
|
REGISTRY: ghcr.io
|
||||||
|
CHART_PATH: chart/agentikube
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup Helm
|
||||||
|
uses: azure/setup-helm@v4
|
||||||
|
|
||||||
|
- name: Log in to GHCR
|
||||||
|
run: echo "${{ secrets.GITHUB_TOKEN }}" | helm registry login ${{ env.REGISTRY }} -u ${{ github.actor }} --password-stdin
|
||||||
|
|
||||||
|
- name: Extract version from tag
|
||||||
|
id: version
|
||||||
|
run: echo "version=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
|
- name: Set chart version
|
||||||
|
run: |
|
||||||
|
sed -i "s/^version:.*/version: ${{ steps.version.outputs.version }}/" ${{ env.CHART_PATH }}/Chart.yaml
|
||||||
|
sed -i "s/^appVersion:.*/appVersion: \"${{ steps.version.outputs.version }}\"/" ${{ env.CHART_PATH }}/Chart.yaml
|
||||||
|
|
||||||
|
- name: Lint
|
||||||
|
run: helm lint ${{ env.CHART_PATH }}/
|
||||||
|
|
||||||
|
- name: Package
|
||||||
|
run: helm package ${{ env.CHART_PATH }}/ --destination .helm-pkg
|
||||||
|
|
||||||
|
- name: Push to GHCR
|
||||||
|
run: helm push .helm-pkg/agentikube-${{ steps.version.outputs.version }}.tgz oci://${{ env.REGISTRY }}/${{ github.repository_owner }}
|
||||||
105
README.md
105
README.md
|
|
@ -3,108 +3,81 @@
|
||||||
[](https://github.com/harivansh-afk/agentikube/blob/main/go.mod)
|
[](https://github.com/harivansh-afk/agentikube/blob/main/go.mod)
|
||||||
[](https://github.com/harivansh-afk/agentikube/releases/latest)
|
[](https://github.com/harivansh-afk/agentikube/releases/latest)
|
||||||
|
|
||||||
A Helm package used for spinning up isolated stateful agent sandboxes via k8 pods
|
Isolated stateful agent sandboxes on Kubernetes
|
||||||
|
|
||||||
<img width="1023" height="745" alt="image" src="https://github.com/user-attachments/assets/d62b6d99-b6bf-4ac3-9fb3-9b8373afbbec" />
|
<img width="1023" height="745" alt="image" src="https://github.com/user-attachments/assets/d62b6d99-b6bf-4ac3-9fb3-9b8373afbbec" />
|
||||||
|
|
||||||
## What it does
|
## Install
|
||||||
|
|
||||||
- **`init`** - Installs CRDs, checks prerequisites, ensures your namespace exists
|
|
||||||
- **`up`** - Renders and applies Kubernetes manifests from templates (`--dry-run` to preview)
|
|
||||||
- **`create <handle>`** - Spins up a sandbox for a user with provider credentials
|
|
||||||
- **`list`** - Shows all sandboxes with status, age, and pod name
|
|
||||||
- **`status`** - Warm pool numbers, sandbox count, Karpenter node count
|
|
||||||
- **`ssh <handle>`** - Drops you into a sandbox pod shell
|
|
||||||
- **`destroy <handle>`** - Tears down a single sandbox
|
|
||||||
- **`down`** - Removes shared infra but keeps existing user sandboxes
|
|
||||||
|
|
||||||
## Quick start
|
|
||||||
|
|
||||||
### Option A: Helm chart
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# 1. Create your values file
|
helm install agentikube oci://ghcr.io/harivansh-afk/agentikube \
|
||||||
cat > my-values.yaml <<EOF
|
-n sandboxes --create-namespace \
|
||||||
|
-f my-values.yaml
|
||||||
|
```
|
||||||
|
|
||||||
|
Create a `my-values.yaml` with your cluster details:
|
||||||
|
|
||||||
|
```yaml
|
||||||
compute:
|
compute:
|
||||||
clusterName: my-eks-cluster
|
clusterName: my-eks-cluster
|
||||||
storage:
|
storage:
|
||||||
filesystemId: fs-0123456789abcdef0
|
filesystemId: fs-0123456789abcdef0
|
||||||
sandbox:
|
sandbox:
|
||||||
image: my-registry/sandbox:latest
|
image: my-registry/sandbox:latest
|
||||||
EOF
|
|
||||||
|
|
||||||
# 2. Install
|
|
||||||
helm install agentikube ./chart/agentikube \
|
|
||||||
-n sandboxes --create-namespace \
|
|
||||||
-f my-values.yaml
|
|
||||||
|
|
||||||
# 3. Create a sandbox and jump in
|
|
||||||
agentikube create demo --provider openai --api-key <key>
|
|
||||||
agentikube ssh demo
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Option B: CLI only
|
See [`values.yaml`](chart/agentikube/values.yaml) for all options.
|
||||||
|
|
||||||
|
## CLI
|
||||||
|
|
||||||
|
The Go CLI handles runtime operations that are inherently imperative:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# 1. Copy and fill in your config
|
|
||||||
cp agentikube.example.yaml agentikube.yaml
|
|
||||||
# Edit: namespace, EFS filesystem ID, sandbox image, compute settings
|
|
||||||
|
|
||||||
# 2. Set things up
|
|
||||||
agentikube init
|
|
||||||
agentikube up
|
|
||||||
|
|
||||||
# 3. Create a sandbox and jump in
|
|
||||||
agentikube create demo --provider openai --api-key <key>
|
agentikube create demo --provider openai --api-key <key>
|
||||||
agentikube list
|
agentikube list
|
||||||
agentikube ssh demo
|
agentikube ssh demo
|
||||||
|
agentikube status
|
||||||
|
agentikube destroy demo
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Build it with `go build ./cmd/agentikube` or `make build`.
|
||||||
|
|
||||||
## What gets created
|
## What gets created
|
||||||
|
|
||||||
Running `up` applies these to your cluster:
|
The Helm chart installs:
|
||||||
|
|
||||||
- Namespace, StorageClass (`efs-sandbox`), SandboxTemplate
|
- StorageClass (`efs-sandbox`) backed by your EFS filesystem
|
||||||
- Optionally: SandboxWarmPool, NodePool + EC2NodeClass (Karpenter)
|
- SandboxTemplate defining the pod spec
|
||||||
|
- NetworkPolicy for ingress/egress rules
|
||||||
|
- SandboxWarmPool (optional, enabled by default)
|
||||||
|
- Karpenter NodePool + EC2NodeClass (optional, when `compute.type: karpenter`)
|
||||||
|
|
||||||
Running `create <handle>` adds:
|
Each `agentikube create <handle>` then adds a Secret, SandboxClaim, and workspace PVC for that user.
|
||||||
|
|
||||||
- A Secret and SandboxClaim per user
|
|
||||||
- A workspace PVC backed by EFS
|
|
||||||
|
|
||||||
## Project layout
|
## Project layout
|
||||||
|
|
||||||
```
|
```
|
||||||
cmd/agentikube/main.go # entrypoint
|
cmd/agentikube/ CLI entrypoint
|
||||||
internal/config/ # config structs + validation
|
internal/ config, manifest rendering, kube helpers
|
||||||
internal/manifest/ # template rendering
|
chart/agentikube/ Helm chart
|
||||||
internal/manifest/templates/ # k8s YAML templates (used by CLI)
|
scripts/ CRD download helper
|
||||||
internal/kube/ # kube client helpers
|
|
||||||
internal/commands/ # command implementations
|
|
||||||
chart/agentikube/ # Helm chart
|
|
||||||
scripts/ # helper scripts (CRD download)
|
|
||||||
agentikube.example.yaml # example config
|
|
||||||
Makefile # build/install/fmt/vet/helm
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Build and test locally
|
## Development
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
go build ./...
|
make build # compile CLI
|
||||||
go test ./...
|
make helm-lint # lint the chart
|
||||||
go run ./cmd/agentikube --help
|
make helm-template # dry-run render
|
||||||
|
go test ./... # run tests
|
||||||
# Smoke test manifest generation
|
|
||||||
./agentikube up --dry-run --config agentikube.example.yaml
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Good to know
|
## Good to know
|
||||||
|
|
||||||
- `storage.type` is `efs` only for now
|
- Storage is EFS-only for now
|
||||||
- `kubectl` needs to be installed (used by `init` and `ssh`)
|
- `kubectl` must be installed (used by `init` and `ssh`)
|
||||||
- Fargate is validated in config but templates only cover the Karpenter path so far
|
- Fargate is validated in config but templates only cover Karpenter so far
|
||||||
- No Go tests written yet - `go test` passes but reports no test files
|
- [k9s](https://k9scli.io/) is great for browsing sandbox resources
|
||||||
- [k9s](https://k9scli.io/) is great for browsing sandbox resources (`brew install derailed/k9s/k9s`)
|
|
||||||
|
|
||||||
## Context
|
## Context
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue