|
| 1 | +# Agentgateway API Upgrade Guide |
| 2 | + |
| 3 | +## Overview |
| 4 | + |
| 5 | +Starting in version 2.2.0-beta.3, agentgateway has been fully separated into its own API group with breaking changes to resource naming and structure. This guide helps you understand the new architecture and how to upgrade. |
| 6 | + |
| 7 | +## Who Needs to Take Action? |
| 8 | + |
| 9 | +### Envoy Users (GatewayClass: `kgateway`) |
| 10 | + |
| 11 | +**No changes required.** You can upgrade to 2.2.0-beta.3 using the same kgateway chart. All Envoy resources remain unchanged: |
| 12 | + |
| 13 | +- Continue using `gateway.kgateway.dev/v1alpha1` API group |
| 14 | +- GatewayClass `kgateway` with controller `kgateway.dev/kgateway` |
| 15 | +- HTTPListenerPolicy, TrafficPolicy, BackendConfigPolicy, etc. all work as before |
| 16 | + |
| 17 | +### Agentgateway Users (GatewayClass: `agentgateway`) |
| 18 | + |
| 19 | +**Breaking changes require migration to new charts.** Agentgateway has moved to: |
| 20 | +- New dedicated Helm charts (separate from kgateway) |
| 21 | +- New API group (`agentgateway.dev/v1alpha1`) |
| 22 | +- New GatewayClass (`agentgateway-v2`) |
| 23 | + |
| 24 | +We recommend a **blue-green deployment strategy** (see below) to minimize risk. |
| 25 | + |
| 26 | +### Mixed Deployment Users (Both Envoy and Agentgateway) |
| 27 | + |
| 28 | +If you're currently running both Envoy and agentgateway from the same kgateway installation: |
| 29 | +- **Envoy gateways**: Keep your existing kgateway chart installation |
| 30 | +- **Agentgateway gateways**: Migrate to the new dedicated agentgateway charts following the blue-green strategy below |
| 31 | +- Both can run side-by-side in the same cluster without conflicts |
| 32 | + |
| 33 | +## What Changed for Agentgateway |
| 34 | + |
| 35 | +### Dedicated Helm Charts |
| 36 | + |
| 37 | +Agentgateway now has its own dedicated Helm charts, separate from the kgateway chart: |
| 38 | + |
| 39 | +| Component | Chart Location | |
| 40 | +|-----------|----------------| |
| 41 | +| **Agentgateway CRDs** | `oci://ghcr.io/kgateway-dev/charts/agentgateway-crds` | |
| 42 | +| **Agentgateway Controller** | `oci://ghcr.io/kgateway-dev/charts/agentgateway` | |
| 43 | +| **Kgateway CRDs (Envoy)** | `oci://cr.kgateway.dev/kgateway-dev/charts/kgateway-crds` | |
| 44 | +| **Kgateway (Envoy)** | `oci://cr.kgateway.dev/kgateway-dev/charts/kgateway` | |
| 45 | + |
| 46 | + |
| 47 | +This separation allows independent versioning and deployment of each data plane. |
| 48 | + |
| 49 | +### New API Group and Controller |
| 50 | + |
| 51 | +Agentgateway resources now use their own dedicated API group and controller: |
| 52 | + |
| 53 | +| Aspect | Old | New | |
| 54 | +|--------|-----|-----| |
| 55 | +| **API Group** | `gateway.kgateway.dev/v1alpha1` | `agentgateway.dev/v1alpha1` | |
| 56 | +| **Controller Name** | `kgateway.dev/agentgateway` | `agentgateway.dev/agentgateway` | |
| 57 | +| **GatewayClass Name** | `agentgateway` | `agentgateway-v2` | |
| 58 | + |
| 59 | +### Agentgateway Resources (Now in agentgateway.dev/v1alpha1) |
| 60 | + |
| 61 | +- `AgentgatewayPolicy` - Policy configuration for AI/ML routing |
| 62 | +- `AgentgatewayBackend` - Backend configuration for AI/ML services |
| 63 | +- `AgentgatewayParameters` - Gateway deployment parameters |
| 64 | + |
| 65 | +## Recommended Upgrade Strategy for Agentgateway Users |
| 66 | + |
| 67 | +Due to the breaking changes, we recommend a **blue-green deployment** approach: |
| 68 | + |
| 69 | +### Why Blue-Green? |
| 70 | + |
| 71 | +The new agentgateway charts create the `agentgateway-v2` GatewayClass with a different controller name (`agentgateway.dev/agentgateway`) that won't conflict with your existing installation. This allows you to: |
| 72 | + |
| 73 | +1. Install the new agentgateway charts side-by-side with your current deployment |
| 74 | +2. Test the new setup thoroughly without affecting production traffic |
| 75 | +3. Gradually switch traffic when ready |
| 76 | +4. Keep the old version as a fallback |
| 77 | + |
| 78 | +### Step-by-Step Upgrade Process |
| 79 | + |
| 80 | +#### 1. Install New Agentgateway Charts in New Namespace |
| 81 | + |
| 82 | +Agentgateway now has dedicated charts separate from kgateway. Install them in a new namespace: |
| 83 | + |
| 84 | +```bash |
| 85 | +# Install agentgateway CRDs |
| 86 | +helm install agentgateway-crds oci://ghcr.io/kgateway-dev/charts/agentgateway-crds \ |
| 87 | + --version 2.2.0-beta.3 \ |
| 88 | + --namespace agentgateway-system \ |
| 89 | + --create-namespace |
| 90 | + |
| 91 | +# Install agentgateway controller |
| 92 | +helm install agentgateway oci://ghcr.io/kgateway-dev/charts/agentgateway \ |
| 93 | + --version 2.2.0-beta.3 \ |
| 94 | + --namespace agentgateway-system |
| 95 | +``` |
| 96 | + |
| 97 | +This creates the new `agentgateway-v2` GatewayClass with controller `agentgateway.dev/agentgateway`. |
| 98 | + |
| 99 | +#### 2. Create New Gateway Using agentgateway-v2 |
| 100 | + |
| 101 | +```yaml |
| 102 | +apiVersion: gateway.networking.k8s.io/v1 |
| 103 | +kind: Gateway |
| 104 | +metadata: |
| 105 | + name: ai-gateway-v2 |
| 106 | + namespace: default |
| 107 | +spec: |
| 108 | + gatewayClassName: agentgateway-v2 # New GatewayClass |
| 109 | + listeners: |
| 110 | + - name: http |
| 111 | + protocol: HTTP |
| 112 | + port: 8080 |
| 113 | +``` |
| 114 | +
|
| 115 | +The new GatewayClass configuration: |
| 116 | +
|
| 117 | +```yaml |
| 118 | +apiVersion: gateway.networking.k8s.io/v1 |
| 119 | +kind: GatewayClass |
| 120 | +metadata: |
| 121 | + name: agentgateway-v2 |
| 122 | +spec: |
| 123 | + controllerName: agentgateway.dev/agentgateway # New controller |
| 124 | + parametersRef: |
| 125 | + group: agentgateway.dev # New API group |
| 126 | + kind: AgentgatewayParameters |
| 127 | + name: agw-params |
| 128 | +``` |
| 129 | +
|
| 130 | +#### 3. Migrate Your Configuration |
| 131 | +
|
| 132 | +Update your agentgateway resources to use the new API group: |
| 133 | +
|
| 134 | +**AgentgatewayPolicy:** |
| 135 | +```yaml |
| 136 | +apiVersion: agentgateway.dev/v1alpha1 # Changed from TrafficPolicy in gateway.kgateway.dev/v1alpha1 |
| 137 | +kind: AgentgatewayPolicy |
| 138 | +metadata: |
| 139 | + name: my-ai-policy |
| 140 | +spec: |
| 141 | + targetRefs: |
| 142 | + - group: gateway.networking.k8s.io |
| 143 | + kind: HTTPRoute |
| 144 | + name: my-route |
| 145 | + # Your policy configuration |
| 146 | +``` |
| 147 | + |
| 148 | +**AgentgatewayBackend:** |
| 149 | +```yaml |
| 150 | +apiVersion: agentgateway.dev/v1alpha1 # Changed from Backend in gateway.kgateway.dev/v1alpha1 |
| 151 | +kind: AgentgatewayBackend |
| 152 | +metadata: |
| 153 | + name: my-ai-backend |
| 154 | +spec: |
| 155 | + # Your backend configuration |
| 156 | +``` |
| 157 | + |
| 158 | +#### 4. Test the New Setup |
| 159 | + |
| 160 | +- Verify the new Gateway is ready |
| 161 | +- Test your HTTPRoutes with the new Gateway |
| 162 | +- Validate policies are applied correctly |
| 163 | +- Check backend connectivity |
| 164 | + |
| 165 | +#### 5. Clean Up Old Installation |
| 166 | + |
| 167 | +After confirming everything works with the new agentgateway installation: |
| 168 | + |
| 169 | +```bash |
| 170 | +# Remove old kgateway installation (if it was only used for agentgateway) |
| 171 | +helm uninstall kgateway --namespace kgateway-system |
| 172 | +helm uninstall kgateway-crds --namespace kgateway-system |
| 173 | +``` |
| 174 | + |
| 175 | +**Note:** If your old kgateway installation also served Envoy gateways, you'll want to keep it running and only remove the agentgateway-specific resources. |
| 176 | + |
| 177 | +## Resource Reference |
| 178 | + |
| 179 | +### For Agentgateway Users (agentgateway.dev/v1alpha1) |
| 180 | + |
| 181 | +Use these resources with GatewayClass `agentgateway-v2`: |
| 182 | + |
| 183 | +```yaml |
| 184 | +# Policy attachment for AI/ML routing |
| 185 | +apiVersion: agentgateway.dev/v1alpha1 |
| 186 | +kind: AgentgatewayPolicy |
| 187 | + |
| 188 | +# Backend configuration for AI services |
| 189 | +apiVersion: agentgateway.dev/v1alpha1 |
| 190 | +kind: AgentgatewayBackend |
| 191 | + |
| 192 | +# Gateway deployment parameters |
| 193 | +apiVersion: agentgateway.dev/v1alpha1 |
| 194 | +kind: AgentgatewayParameters |
| 195 | +``` |
| 196 | +
|
| 197 | +### For Envoy Users (gateway.kgateway.dev/v1alpha1) |
| 198 | +
|
| 199 | +Use these resources with GatewayClass `kgateway` (unchanged): |
| 200 | + |
| 201 | +```yaml |
| 202 | +# HTTP listener configuration |
| 203 | +apiVersion: gateway.kgateway.dev/v1alpha1 |
| 204 | +kind: HTTPListenerPolicy |
| 205 | +
|
| 206 | +# Listener configuration (for TCP/TLS listeners) |
| 207 | +apiVersion: gateway.kgateway.dev/v1alpha1 |
| 208 | +kind: ListenerPolicy |
| 209 | +
|
| 210 | +# Traffic management policies |
| 211 | +apiVersion: gateway.kgateway.dev/v1alpha1 |
| 212 | +kind: TrafficPolicy |
| 213 | +
|
| 214 | +# Backend service configuration |
| 215 | +apiVersion: gateway.kgateway.dev/v1alpha1 |
| 216 | +kind: BackendConfigPolicy |
| 217 | +
|
| 218 | +# Backend reference for external services |
| 219 | +apiVersion: gateway.kgateway.dev/v1alpha1 |
| 220 | +kind: Backend |
| 221 | +
|
| 222 | +# Direct response configuration |
| 223 | +apiVersion: gateway.kgateway.dev/v1alpha1 |
| 224 | +kind: DirectResponse |
| 225 | +
|
| 226 | +# Gateway extensions for advanced features |
| 227 | +apiVersion: gateway.kgateway.dev/v1alpha1 |
| 228 | +kind: GatewayExtensions |
| 229 | +
|
| 230 | +# Gateway deployment parameters |
| 231 | +apiVersion: gateway.kgateway.dev/v1alpha1 |
| 232 | +kind: GatewayParameters |
| 233 | +``` |
0 commit comments