You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> **This is a GitHub template repository.** Click "Use this template" to create a new Kubernetes aggregated API server for your own custom resources.
4
-
5
-
A production-ready template for building Kubernetes aggregated API servers. This provides all the scaffolding and boilerplate needed to create custom Kubernetes APIs that integrate seamlessly with `kubectl` and the Kubernetes ecosystem.
6
-
7
-
## What's Included
8
-
9
-
-**Full API server scaffolding**: Production-ready Kubernetes aggregated API server setup
10
-
-**Example custom resource**: `ExampleResource` showing best practices
11
-
-**OpenAPI/Swagger integration**: Automatic API documentation generation
-**Version management**: Git-based version injection
14
-
-**Development tooling**: Task-based build system, Docker support
15
-
-**Code generation**: Kubernetes code-gen integration for deepcopy and clients
16
-
17
-
The template includes a working `ExampleResource` as a concrete example. You'll customize this to create your own resources like `DataProcessing`, `BackupJob`, `AnalyticsQuery`, etc.
18
-
19
-
## Using This Template
20
-
21
-
### 1. Create Repository
22
-
Click "Use this template" on GitHub to create your new repository.
23
-
24
-
### 2. Find & Replace
25
-
26
-
Use global find-and-replace (case-sensitive) across all files:
27
-
28
-
| Find | Replace With | Example |
29
-
|------|-------------|---------|
30
-
|`github.com/example-org/example-service`| Your module path |`github.com/myorg/myservice`|
31
-
|`example.example-org.io`| Your API group |`myresource.mycompany.io`|
32
-
|`ghcr.io/example-org/example-service`| Your container registry |`ghcr.io/myorg/myservice`|
33
-
|`example-service`| Your service name |`myservice`|
34
-
|`ExampleService`| Your service name |`MyService`|
35
-
|`ExampleResource`| Your resource type |`DataProcessing`|
36
-
37
-
### 3. Rename Directories
38
-
39
-
```bash
40
-
mv cmd/example-service cmd/myservice
41
-
mv pkg/apis/example-service pkg/apis/myservice
42
-
```
43
-
44
-
### 4. Customize API Types
45
-
46
-
Edit `pkg/apis/myservice/v1alpha1/types.go`:
47
-
- Rename `ExampleResource` to your resource type
48
-
- Update `ExampleResourceSpec` fields for your use case
49
-
- Update `ExampleResourceStatus` fields for your status
50
-
- Review `genclient` directives for your needs (namespaced vs cluster-scoped, allowed verbs)
51
-
52
-
### 5. Build & Generate
53
-
54
-
```bash
55
-
go mod tidy
56
-
task generate
57
-
task build
58
-
task test
59
-
```
60
-
61
-
### 6. Implement Storage Backend
62
-
63
-
The main TODO is in `internal/apiserver/apiserver.go` - look for the `TEMPLATE NOTE` comment. You need to:
64
-
- Create a REST storage implementation
65
-
- Connect to your backend (database, API, cache, etc.)
66
-
- Implement CRUD operations
67
-
- Register storage in the apiserver
68
-
69
-
See the [Kubernetes sample-apiserver](https://github.com/kubernetes/sample-apiserver/tree/master/pkg/registry) for examples.
70
-
71
-
### 7. Deploy (Optional)
72
-
73
-
Test deployment to a Kubernetes cluster:
74
-
75
-
```bash
76
-
# Review deployment manifests
77
-
cat config/README.md
78
-
79
-
# Generate and review manifests
80
-
kubectl kustomize config/base
81
-
82
-
# Deploy to cluster (requires TLS certs)
83
-
./config/deploy-dev.sh
84
-
```
85
-
86
-
See [config/README.md](config/README.md) for detailed deployment instructions.
87
-
88
-
### 8. Clean Up
89
-
90
-
Search for `TEMPLATE NOTE` comments throughout the codebase and remove them once you've addressed each customization point.
91
-
92
-
## Prerequisites
93
-
94
-
**For users:**
95
-
- Kubernetes 1.34+ cluster
96
-
- kubectl configured to access your cluster
97
-
98
-
**For developers:**
99
-
- Go 1.25.0 or later
100
-
-[Task](https://taskfile.dev) for development workflows
101
-
- Docker for building container images
102
-
103
-
## License
104
-
105
-
See [LICENSE](LICENSE) for details.
106
-
107
-
---
108
-
109
-
**Questions or feedback?** Open an issue—we're here to help!
1
+
# Search
2
+
3
+
Search is a Kubernetes-native aggregated API server that provides advanced
4
+
resource discovery through field filtering and full-text search. It indexes
5
+
cluster resources in real-time via audit log events consumed from NATS
6
+
JetStream, with declarative indexing policies controlling what gets indexed
7
+
using CEL-based filtering. The service integrates natively with kubectl/RBAC and
0 commit comments