feat: add agentgateway template and update kgateway template

This commit is contained in:
Sun-ZhenXing
2026-02-25 14:54:54 +08:00
parent d39d336e2c
commit ce2e1c4f4f
7 changed files with 392 additions and 7 deletions

32
src/agentgateway/Makefile Normal file
View File

@@ -0,0 +1,32 @@
HELM_RELEASE_NAME ?= agentgateway
HELM_APPLICATION_NAME ?= agentgateway
HELM_NAMESPACE ?= agentgateway-system
HELM_DIR ?= ./helm
HELM_CHART_VERSION ?= v2.2.0
HELM_VALUES_FILE ?= ./values.yaml
HELM_OCI_REGISTRY ?= cr.agentgateway.dev
HELM_OCI_NAMESPACE ?= charts
HELM_OCI_USERNAME ?=
HELM_OCI_PASSWORD ?=
HELM_CHART_REPO ?= oci://$(HELM_OCI_REGISTRY)/$(HELM_OCI_NAMESPACE)/$(HELM_APPLICATION_NAME)
include ../_template/base.mk
.PHONY: install-crds
install-crds:
@echo "Installing Gateway API CRDs..."
kubectl apply -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.4.0/standard-install.yaml
@echo "Installing agentgateway CRDs..."
helm upgrade -i --create-namespace \
--namespace $(HELM_NAMESPACE) \
--version $(HELM_CHART_VERSION) \
agentgateway-crds oci://$(HELM_OCI_REGISTRY)/$(HELM_OCI_NAMESPACE)/agentgateway-crds
.PHONY: install-all
install-all: install-crds install
.PHONY: verify
verify:
@echo "Verifying agentgateway installation..."
kubectl get pods -n $(HELM_NAMESPACE)
kubectl get gatewayclass agentgateway

View File

@@ -0,0 +1,98 @@
# agentgateway
## Introduction
agentgateway is a cloud-native API gateway designed for AI workloads. It provides a Kubernetes-native way to manage traffic, secure APIs, and observe your AI services. Built on the Kubernetes Gateway API, agentgateway enables seamless integration with AI agents and services.
## Prerequisites
Before installing agentgateway, ensure you have:
1. A Kubernetes cluster (1.25+)
2. `kubectl` installed
3. `helm` installed (3.8+ for OCI support)
## Installation
### Quick Install (includes CRDs)
To install agentgateway with all required CRDs:
```bash
make install-all
```
### Step-by-Step Install
1. Install Gateway API CRDs:
```bash
kubectl apply -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.4.0/standard-install.yaml
```
1. Install agentgateway CRDs:
```bash
make install-crds
```
1. Install agentgateway:
```bash
make install
```
## Usage
After installation, verify the deployment:
```bash
# Check if agentgateway pods are running
kubectl get pods -n agentgateway-system
# Verify GatewayClass is created
kubectl get gatewayclass agentgateway
# View agentgateway services
kubectl get svc -n agentgateway-system
```
## Configuration
The default configuration includes:
- Gateway controller for managing Gateway API resources
- Control plane components for configuration management
- Support for AI workload routing
You can customize the installation by modifying `values.yaml` before running `make install`.
## Gateway API
agentgateway supports the Kubernetes Gateway API standard. You can create Gateway and HTTPRoute resources to configure routing:
```yaml
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
name: my-gateway
namespace: agentgateway-system
spec:
gatewayClassName: agentgateway
listeners:
- name: http
protocol: HTTP
port: 80
```
## Uninstall
To uninstall agentgateway:
```bash
make uninstall
```
## Documentation
For more information, visit the [official documentation](https://agentgateway.dev/docs/kubernetes/latest/).

View File

@@ -0,0 +1,98 @@
# agentgateway
## 简介
agentgateway 是一个专为 AI 工作负载设计的云原生 API 网关。它提供了一种 Kubernetes 原生的方式来管理流量、保护 API 和观测 AI 服务。agentgateway 基于 Kubernetes Gateway API 构建,可实现与 AI 代理和服务的无缝集成。
## 前置条件
在安装 agentgateway 之前,请确保您已具备:
1. Kubernetes 集群 (1.25+)
2. 已安装 `kubectl`
3. 已安装 `helm` (3.8+ 以支持 OCI)
## 安装
### 快速安装(包含 CRDs
要安装 agentgateway 及其所有必需的 CRDs
```bash
make install-all
```
### 分步安装
1. 安装 Gateway API CRDs
```bash
kubectl apply -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.4.0/standard-install.yaml
```
2. 安装 agentgateway CRDs
```bash
make install-crds
```
3. 安装 agentgateway
```bash
make install
```
## 使用
安装完成后,验证部署状态:
```bash
# 检查 agentgateway pod 是否运行
kubectl get pods -n agentgateway-system
# 验证 GatewayClass 是否已创建
kubectl get gatewayclass agentgateway
# 查看 agentgateway 服务
kubectl get svc -n agentgateway-system
```
## 配置
默认配置包括:
- 用于管理 Gateway API 资源的网关控制器
- 用于配置管理的控制平面组件
- 支持 AI 工作负载路由
您可以在运行 `make install` 之前修改 `values.yaml` 来自定义安装。
## Gateway API
agentgateway 支持 Kubernetes Gateway API 标准。您可以创建 Gateway 和 HTTPRoute 资源来配置路由:
```yaml
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
name: my-gateway
namespace: agentgateway-system
spec:
gatewayClassName: agentgateway
listeners:
- name: http
protocol: HTTP
port: 80
```
## 卸载
卸载 agentgateway
```bash
make uninstall
```
## 文档
更多信息请访问[官方文档](https://agentgateway.dev/docs/kubernetes/latest/)。

View File

@@ -0,0 +1,72 @@
# Default values for agentgateway
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
# Controller configuration
controller:
image:
repository: ghcr.io/kgateway-dev/agentgateway
tag: v2.2.1
pullPolicy: IfNotPresent
resources:
limits:
cpu: 1000m
memory: 1Gi
requests:
cpu: 100m
memory: 256Mi
# Enable experimental Gateway API features
extraEnv:
KGW_ENABLE_GATEWAY_API_EXPERIMENTAL_FEATURES: 'false'
# Gateway proxy configuration
gatewayProxy:
image:
repository: ghcr.io/kgateway-dev/agentgateway-proxy
tag: v2.2.1
pullPolicy: IfNotPresent
resources:
limits:
cpu: 500m
memory: 512Mi
requests:
cpu: 100m
memory: 128Mi
# Service configuration
service:
type: LoadBalancer
httpPort: 80
httpsPort: 443
# RBAC configuration
rbac:
create: true
# Service account configuration
serviceAccount:
create: true
annotations: {}
# Pod security context
podSecurityContext:
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
# Security context for containers
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities:
drop:
- ALL
# Node selector
nodeSelector: {}
# Tolerations
tolerations: []
# Affinity
affinity: {}

View File

@@ -2,7 +2,7 @@ HELM_RELEASE_NAME ?= kgateway
HELM_APPLICATION_NAME ?= kgateway
HELM_NAMESPACE ?= kgateway-system
HELM_DIR ?= ./helm
HELM_CHART_VERSION ?=
HELM_CHART_VERSION ?= v2.2.0
HELM_VALUES_FILE ?= ./values.yaml
HELM_OCI_REGISTRY ?= cr.kgateway.dev
HELM_OCI_NAMESPACE ?= kgateway-dev/charts
@@ -11,3 +11,22 @@ HELM_OCI_PASSWORD ?=
HELM_CHART_REPO ?= oci://$(HELM_OCI_REGISTRY)/$(HELM_OCI_NAMESPACE)/$(HELM_APPLICATION_NAME)
include ../_template/base.mk
.PHONY: install-crds
install-crds:
@echo "Installing Kubernetes Gateway API CRDs..."
kubectl apply -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.4.0/standard-install.yaml
@echo "Installing kgateway CRDs..."
helm upgrade -i --create-namespace \
--namespace $(HELM_NAMESPACE) \
--version $(HELM_CHART_VERSION) \
kgateway-crds oci://$(HELM_OCI_REGISTRY)/$(HELM_OCI_NAMESPACE)/kgateway-crds
.PHONY: install-all
install-all: install-crds install
.PHONY: verify
verify:
@echo "Verifying kgateway installation..."
kubectl get pods -n $(HELM_NAMESPACE)
kubectl get gatewayclass kgateway

View File

@@ -4,9 +4,39 @@
kgateway is a cloud-native API gateway built on Envoy Proxy. It provides a Kubernetes-native way to manage traffic, secure APIs, and observe your services. Formerly known as Gloo Gateway, kgateway offers advanced routing capabilities, traffic management, and extensibility through WebAssembly (Wasm) filters.
## Prerequisites
Before installing kgateway, ensure you have:
1. A Kubernetes cluster (1.25+)
2. `kubectl` installed
3. `helm` installed (3.8+ for OCI support)
## Installation
To install kgateway, run:
### Quick Install (includes CRDs)
To install kgateway with all required CRDs:
```bash
make install-all
```
### Step-by-Step Install
1. Install Kubernetes Gateway API CRDs:
```bash
kubectl apply -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.4.0/standard-install.yaml
```
2. Install kgateway CRDs:
```bash
make install-crds
```
3. Install kgateway:
```bash
make install
@@ -14,12 +44,15 @@ make install
## Usage
After installation, you can configure kgateway using Kubernetes Gateway API resources:
After installation, verify the deployment:
```bash
# Check if kgateway pods are running
kubectl get pods -n kgateway-system
# Verify GatewayClass is created
kubectl get gatewayclass kgateway
# View kgateway services
kubectl get svc -n kgateway-system
```

View File

@@ -4,9 +4,39 @@
kgateway 是一个基于 Envoy Proxy 的云原生 API 网关。它提供了一种 Kubernetes 原生的方式来管理流量、保护 API 和观测服务。kgateway 前身为 Gloo Gateway提供高级路由功能、流量管理和通过 WebAssembly (Wasm) 过滤器的可扩展性。
## 前置条件
在安装 kgateway 之前,请确保您已具备:
1. Kubernetes 集群 (1.25+)
2. 已安装 `kubectl`
3. 已安装 `helm` (3.8+ 以支持 OCI)
## 安装
安装 kgateway
### 快速安装(包含 CRDs
要安装 kgateway 及其所有必需的 CRDs
```bash
make install-all
```
### 分步安装
1. 安装 Kubernetes Gateway API CRDs
```bash
kubectl apply -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.4.0/standard-install.yaml
```
2. 安装 kgateway CRDs
```bash
make install-crds
```
3. 安装 kgateway
```bash
make install
@@ -14,12 +44,15 @@ make install
## 使用
安装完成后,您可以使用 Kubernetes Gateway API 资源来配置 kgateway
安装完成后,验证部署状态
```bash
# 检查 kgateway pod 是否运行
kubectl get pods -n kgateway-system
# 验证 GatewayClass 是否已创建
kubectl get gatewayclass kgateway
# 查看 kgateway 服务
kubectl get svc -n kgateway-system
```