Skip to content

Commit 6c585c3

Browse files
committed
chore: merged
Signed-off-by: Alex <alexsimonjones@gmail.com>
1 parent ad1f266 commit 6c585c3

7 files changed

Lines changed: 545 additions & 30 deletions

File tree

.github/workflows/release.yaml

Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
name: Release CLI
2+
3+
on:
4+
push:
5+
tags: ["v*"]
6+
7+
permissions:
8+
contents: write
9+
packages: write
10+
11+
env:
12+
REGISTRY: ghcr.io/alexsjones/k8sclaw
13+
14+
jobs:
15+
release-cli:
16+
runs-on: ubuntu-latest
17+
strategy:
18+
matrix:
19+
include:
20+
- goos: linux
21+
goarch: amd64
22+
- goos: linux
23+
goarch: arm64
24+
- goos: darwin
25+
goarch: amd64
26+
- goos: darwin
27+
goarch: arm64
28+
steps:
29+
- uses: actions/checkout@v4
30+
31+
- uses: actions/setup-go@v5
32+
with:
33+
go-version-file: go.mod
34+
cache: true
35+
36+
- name: Build CLI
37+
env:
38+
CGO_ENABLED: "0"
39+
GOOS: ${{ matrix.goos }}
40+
GOARCH: ${{ matrix.goarch }}
41+
run: |
42+
VERSION="${GITHUB_REF_NAME}"
43+
go build -ldflags="-s -w -X main.version=${VERSION}" \
44+
-o k8sclaw ./cmd/k8sclaw
45+
46+
- name: Package
47+
run: |
48+
PLATFORM="${{ matrix.goos }}-${{ matrix.goarch }}"
49+
tar -czf "k8sclaw-${PLATFORM}.tar.gz" k8sclaw
50+
sha256sum "k8sclaw-${PLATFORM}.tar.gz" > "k8sclaw-${PLATFORM}.tar.gz.sha256"
51+
52+
- name: Upload release assets
53+
uses: softprops/action-gh-release@v2
54+
with:
55+
files: |
56+
k8sclaw-*.tar.gz
57+
k8sclaw-*.sha256
58+
59+
release-manifests:
60+
runs-on: ubuntu-latest
61+
steps:
62+
- uses: actions/checkout@v4
63+
64+
- name: Package install manifests
65+
run: |
66+
tar -czf k8sclaw-manifests.tar.gz \
67+
config/crd/bases/ \
68+
config/manager/ \
69+
config/rbac/ \
70+
config/webhook/ \
71+
config/network/
72+
73+
- name: Upload manifests
74+
uses: softprops/action-gh-release@v2
75+
with:
76+
files: k8sclaw-manifests.tar.gz
77+
78+
release-images:
79+
runs-on: ubuntu-latest
80+
strategy:
81+
matrix:
82+
image:
83+
- controller
84+
- apiserver
85+
- ipc-bridge
86+
- webhook
87+
- channel-telegram
88+
- channel-whatsapp
89+
- channel-discord
90+
- channel-slack
91+
steps:
92+
- uses: actions/checkout@v4
93+
94+
- name: Log in to GHCR
95+
uses: docker/login-action@v3
96+
with:
97+
registry: ghcr.io
98+
username: ${{ github.actor }}
99+
password: ${{ secrets.GITHUB_TOKEN }}
100+
101+
- name: Set up Docker Buildx
102+
uses: docker/setup-buildx-action@v3
103+
104+
- name: Extract metadata
105+
id: meta
106+
uses: docker/metadata-action@v5
107+
with:
108+
images: ${{ env.REGISTRY }}/${{ matrix.image }}
109+
tags: |
110+
type=semver,pattern={{version}}
111+
type=semver,pattern={{major}}.{{minor}}
112+
type=raw,value=latest
113+
114+
- name: Build and push
115+
uses: docker/build-push-action@v6
116+
with:
117+
context: .
118+
file: images/${{ matrix.image }}/Dockerfile
119+
push: true
120+
tags: ${{ steps.meta.outputs.tags }}
121+
labels: ${{ steps.meta.outputs.labels }}
122+
cache-from: type=gha
123+
cache-to: type=gha,mode=max
124+
125+
deploy-pages:
126+
runs-on: ubuntu-latest
127+
needs: release-cli
128+
permissions:
129+
pages: write
130+
id-token: write
131+
environment:
132+
name: github-pages
133+
url: ${{ steps.deployment.outputs.page_url }}
134+
steps:
135+
- uses: actions/checkout@v4
136+
137+
- name: Setup Pages
138+
uses: actions/configure-pages@v5
139+
140+
- name: Upload artifact
141+
uses: actions/upload-pages-artifact@v3
142+
with:
143+
path: .
144+
145+
- name: Deploy to GitHub Pages
146+
id: deployment
147+
uses: actions/deploy-pages@v4

CNAME

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
deploy.k8sclaw.ai
1+
deploy.k8sclaw.ai

Makefile

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,20 @@
55
REGISTRY ?= ghcr.io/alexsjones/k8sclaw
66
TAG ?= latest
77

8+
# Tool versions
9+
CONTROLLER_GEN_VERSION ?= v0.17.2
10+
811
# Go parameters
912
GOCMD = go
1013
GOBUILD = $(GOCMD) build
1114
GOTEST = $(GOCMD) test
1215
GOVET = $(GOCMD) vet
1316
GOMOD = $(GOCMD) mod
1417

18+
# Local tool binaries
19+
LOCALBIN ?= $(shell pwd)/bin
20+
CONTROLLER_GEN ?= $(LOCALBIN)/controller-gen
21+
1522
# Binary output directory
1623
BIN_DIR = bin
1724

@@ -64,12 +71,18 @@ tidy: ## Run go mod tidy
6471

6572
##@ Code Generation
6673

67-
generate: ## Generate code (deepcopy, CRD manifests)
68-
controller-gen object:headerFile="hack/boilerplate.go.txt" paths="./api/..."
69-
controller-gen rbac:roleName=k8sclaw-manager-role crd webhook paths="./..." output:crd:artifacts:config=config/crd/bases
74+
.PHONY: controller-gen
75+
controller-gen: $(CONTROLLER_GEN) ## Install controller-gen locally
76+
$(CONTROLLER_GEN):
77+
@mkdir -p $(LOCALBIN)
78+
GOBIN=$(LOCALBIN) $(GOCMD) install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_GEN_VERSION)
79+
80+
generate: controller-gen ## Generate code (deepcopy, CRD manifests)
81+
$(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./api/..."
82+
$(CONTROLLER_GEN) rbac:roleName=k8sclaw-manager-role crd webhook paths="./..." output:crd:artifacts:config=config/crd/bases
7083

71-
manifests: ## Generate CRD manifests
72-
controller-gen crd paths="./api/..." output:crd:artifacts:config=config/crd/bases
84+
manifests: controller-gen ## Generate CRD manifests
85+
$(CONTROLLER_GEN) crd paths="./api/..." output:crd:artifacts:config=config/crd/bases
7386

7487
##@ Docker
7588

README.md

Lines changed: 42 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,35 @@
11
# K8sClaw
22
---
33
<p align="center">
4-
<img src="icon.svg" alt="llmfit icon" width="128" height="128">
4+
<img src="icon.svg" alt="k8sclaw icon" width="128" height="128">
55
</p>
66

7-
87
**Kubernetes-native AI Agent Management Platform**
98

109
K8sClaw decomposes a monolithic AI agent gateway into a multi-tenant, horizontally scalable system where every sub-agent runs as an ephemeral Kubernetes pod.
1110

11+
### Quick install (macOS / Linux)
12+
13+
```bash
14+
curl -fsSL https://deploy.k8sclaw.ai/install.sh | sh
15+
```
16+
17+
Downloads the latest CLI binary from GitHub and installs it to `/usr/local/bin` (or `~/.local/bin`).
18+
19+
### Deploy to your cluster
20+
21+
```bash
22+
k8sclaw install
23+
```
24+
25+
That's it. This downloads the release manifests and applies CRDs, controllers, webhook, RBAC, and network policies to your current `kubectl` context.
26+
27+
To remove:
28+
29+
```bash
30+
k8sclaw uninstall
31+
```
32+
1233
## Architecture
1334

1435
```
@@ -89,47 +110,39 @@ k8sclaw/
89110

90111
## Prerequisites
91112

92-
- Go 1.23+
93-
- Docker
94113
- Kubernetes cluster (v1.28+)
95114
- NATS with JetStream enabled
96115
- PostgreSQL with pgvector extension
116+
- `kubectl` configured to your cluster
97117

98118
## Quick Start
99119

100-
### Build
120+
### Install the CLI
101121

102122
```bash
103-
# Build all binaries
104-
make build
123+
# macOS / Linux
124+
curl -fsSL https://deploy.k8sclaw.ai/install.sh | sh
105125

106-
# Build all Docker images
107-
make docker-build
108-
109-
# Build a specific component
110-
make build-controller
111-
make build-apiserver
126+
# Or build from source
127+
make build-k8sclaw
112128
```
113129

114-
### Deploy
130+
### Deploy K8sClaw
115131

116132
```bash
117-
# Install CRDs
118-
make install
133+
# Install to your cluster
134+
k8sclaw install
119135

120-
# Deploy to cluster
121-
make deploy
136+
# Or install a specific version
137+
k8sclaw install --version v0.1.0
122138

123139
# Create a sample ClawInstance
124-
kubectl apply -f config/samples/clawinstance_sample.yaml
140+
kubectl apply -f https://raw.githubusercontent.com/AlexsJones/k8sclaw/main/config/samples/clawinstance_sample.yaml
125141
```
126142

127-
### CLI
143+
### Use the CLI
128144

129145
```bash
130-
# Build the CLI
131-
make build-k8sclaw
132-
133146
# List instances
134147
k8sclaw instances list
135148

@@ -143,6 +156,12 @@ k8sclaw features enable browser-automation --policy default-policy
143156
k8sclaw features list --policy default-policy
144157
```
145158

159+
### Remove K8sClaw
160+
161+
```bash
162+
k8sclaw uninstall
163+
```
164+
146165
## Development
147166

148167
```bash

0 commit comments

Comments
 (0)