Skip to content

Commit 16f5078

Browse files
committed
fix: use agentgateway in helm chart
1 parent 76b8236 commit 16f5078

6 files changed

Lines changed: 157 additions & 394 deletions

File tree

charts/substrate/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,3 @@ See `values.yaml` for the full set; the important keys:
6969
| `redis.useIAMAuth` | `false` | Google IAM auth |
7070
| `atelet.gcpAuthForImagePulls` | `false` | Enable only when using GCP registry auth |
7171
| `otel.endpoint` | `""` | Set to an OTLP endpoint to export traces/metrics |
72-
| `monitoring.gkePodMonitoring.enabled` | `false` | Enable only on clusters with the GKE/GMP `PodMonitoring` CRD |

charts/substrate/templates/atenet-router-monitoring.yaml

Lines changed: 0 additions & 39 deletions
This file was deleted.

charts/substrate/templates/atenet-router.yaml

Lines changed: 82 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -52,54 +52,68 @@ roleRef:
5252
apiVersion: v1
5353
kind: ConfigMap
5454
metadata:
55-
name: {{ include "substrate.fullname" (list "atenet-router-envoy-config" .) }}
55+
name: {{ include "substrate.fullname" (list "atenet-router-agentgateway-config" .) }}
5656
namespace: {{ .Release.Namespace }}
5757
data:
58-
envoy.yaml: |
59-
admin:
60-
address:
61-
socket_address:
62-
address: 0.0.0.0
63-
port_value: 9901
64-
65-
node:
66-
id: substrate-envoy-node
67-
cluster: substrate-router-cluster
68-
69-
dynamic_resources:
70-
lds_config:
71-
resource_api_version: V3
72-
ads: {}
73-
cds_config:
74-
resource_api_version: V3
75-
ads: {}
76-
ads_config:
77-
api_type: GRPC
78-
transport_api_version: V3
79-
grpc_services:
80-
- envoy_grpc:
81-
cluster_name: xds_cluster
82-
83-
static_resources:
84-
clusters:
85-
- name: xds_cluster
86-
connect_timeout: 0.25s
87-
type: STRICT_DNS
88-
lb_policy: ROUND_ROBIN
89-
typed_extension_protocol_options:
90-
envoy.extensions.upstreams.http.v3.HttpProtocolOptions:
91-
"@type": type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions
92-
explicit_http_config:
93-
http2_protocol_options: {}
94-
load_assignment:
95-
cluster_name: xds_cluster
96-
endpoints:
97-
- lb_endpoints:
98-
- endpoint:
99-
address:
100-
socket_address:
101-
address: 127.0.0.1
102-
port_value: 18000
58+
config.yaml: |
59+
# yaml-language-server: $schema=https://agentgateway.dev/schema/config
60+
config:
61+
adminAddr: "127.0.0.1:15000"
62+
readinessAddr: "0.0.0.0:15021"
63+
statsAddr: "0.0.0.0:15020"
64+
binds:
65+
- port: 8080
66+
listeners:
67+
- name: http
68+
protocol: HTTP
69+
routes:
70+
- name: substrate-http
71+
matches:
72+
- path:
73+
pathPrefix: /
74+
policies:
75+
extProc:
76+
host: "127.0.0.1:50051"
77+
failureMode: failClosed
78+
processingOptions:
79+
requestBodyMode: none
80+
responseBodyMode: none
81+
requestHeaderMode: send
82+
responseHeaderMode: skip
83+
requestTrailerMode: skip
84+
responseTrailerMode: skip
85+
backends:
86+
- dynamic: {}
87+
- port: 8443
88+
listeners:
89+
- name: https
90+
protocol: HTTPS
91+
tls:
92+
{{ if eq .Values.auth.mode "mtls" }}
93+
cert: "/run/servicedns.podcert.ate.dev/credential-bundle.pem"
94+
key: "/run/servicedns.podcert.ate.dev/credential-bundle.pem"
95+
{{ else }}
96+
cert: "/run/agentgateway-tls/tls.crt"
97+
key: "/run/agentgateway-tls/tls.key"
98+
{{ end }}
99+
routes:
100+
- name: substrate-https
101+
matches:
102+
- path:
103+
pathPrefix: /
104+
policies:
105+
extProc:
106+
host: "127.0.0.1:50051"
107+
failureMode: failClosed
108+
processingOptions:
109+
requestBodyMode: none
110+
responseBodyMode: none
111+
requestHeaderMode: send
112+
responseHeaderMode: skip
113+
requestTrailerMode: skip
114+
responseTrailerMode: skip
115+
backends:
116+
- dynamic: {}
103117
---
104118
apiVersion: apps/v1
105119
kind: Deployment
@@ -122,30 +136,15 @@ spec:
122136
prometheus.io/port: "9090"
123137
spec:
124138
serviceAccountName: {{ include "substrate.fullname" (list "atenet-router" .) }}
125-
{{- if eq .Values.auth.mode "jwt" }}
126-
initContainers:
127-
- name: assemble-envoy-cred-bundle
128-
image: {{ .Values.images.busybox }}
129-
command:
130-
- sh
131-
- -c
132-
- cat /run/ateapi-tls-src/tls.crt /run/ateapi-tls-src/tls.key > /run/envoy-tls/credential-bundle.pem
133-
volumeMounts:
134-
- name: ateapi-tls-src
135-
mountPath: /run/ateapi-tls-src
136-
readOnly: true
137-
- name: envoy-tls
138-
mountPath: /run/envoy-tls
139-
{{- end }}
140139
containers:
141140
- name: atenet-router
142141
image: {{ include "substrate.componentImage" (list "atenet" .) }}
143142
args:
144143
- "router"
145144
- "--standalone"
145+
- "--networking-mode=agentgateway"
146146
- "--namespace={{ .Release.Namespace }}"
147147
- "--port-http=8080"
148-
- "--port-xds=18000"
149148
- "--port-extproc=50051"
150149
- "--extproc-address=127.0.0.1"
151150
- "--ateapi-address={{ include "substrate.fullname" (list "api" .) }}.{{ .Release.Namespace }}.svc:443"
@@ -157,11 +156,6 @@ spec:
157156
{{- end }}
158157
- "--status-port=4040"
159158
- "--port-https=8443"
160-
{{- if eq .Values.auth.mode "mtls" }}
161-
- "--envoy-cert-path=/run/servicedns.podcert.ate.dev/credential-bundle.pem"
162-
{{- else }}
163-
- "--envoy-cert-path=/run/envoy-tls/credential-bundle.pem"
164-
{{- end }}
165159
env:
166160
- name: POD_NAME
167161
valueFrom:
@@ -182,8 +176,6 @@ spec:
182176
value: {{ .Values.otel.endpoint | quote }}
183177
{{- end }}
184178
ports:
185-
- name: xds
186-
containerPort: 18000
187179
- name: extproc
188180
containerPort: 50051
189181
- name: status
@@ -199,36 +191,40 @@ spec:
199191
mountPath: /var/run/secrets/tokens/ateapi
200192
readOnly: true
201193
{{- end }}
202-
- name: envoy
203-
image: {{ .Values.images.envoy }}
204-
command:
205-
- "/usr/local/bin/envoy"
206-
- "-c"
207-
- "/etc/envoy/envoy.yaml"
208-
- "--component-log-level"
209-
- "upstream:debug,router:debug,ext_proc:debug"
194+
- name: agentgateway
195+
image: {{ .Values.images.agentgateway }}
196+
args:
197+
- "-f"
198+
- "/etc/agentgateway/config.yaml"
210199
ports:
211200
- name: http
212201
containerPort: 8080
213202
- name: https
214203
containerPort: 8443
215-
- name: admin
216-
containerPort: 9901
204+
- name: readiness
205+
containerPort: 15021
206+
- name: gw-metrics
207+
containerPort: 15020
217208
volumeMounts:
218-
- name: envoy-config
219-
mountPath: /etc/envoy
209+
- name: agentgateway-config
210+
mountPath: /etc/agentgateway
220211
{{- if eq .Values.auth.mode "mtls" }}
221212
- name: "servicedns"
222213
mountPath: "/run/servicedns.podcert.ate.dev"
223214
{{- else }}
224-
- name: envoy-tls
225-
mountPath: /run/envoy-tls
215+
- name: agentgateway-tls
216+
mountPath: /run/agentgateway-tls
226217
readOnly: true
227218
{{- end }}
219+
readinessProbe:
220+
httpGet:
221+
path: /healthz/ready
222+
port: readiness
223+
periodSeconds: 10
228224
volumes:
229-
- name: envoy-config
225+
- name: agentgateway-config
230226
configMap:
231-
name: {{ include "substrate.fullname" (list "atenet-router-envoy-config" .) }}
227+
name: {{ include "substrate.fullname" (list "atenet-router-agentgateway-config" .) }}
232228
{{- if eq .Values.auth.mode "mtls" }}
233229
- name: "servicedns"
234230
projected:
@@ -238,11 +234,9 @@ spec:
238234
keyType: ECDSAP256
239235
credentialBundlePath: credential-bundle.pem
240236
{{- else }}
241-
- name: ateapi-tls-src
237+
- name: agentgateway-tls
242238
secret:
243239
secretName: {{ .Values.auth.jwt.serverCertSecret }}
244-
- name: envoy-tls
245-
emptyDir: {}
246240
- name: ateapi-ca
247241
configMap:
248242
name: {{ .Values.auth.jwt.caBundleConfigMap }}

charts/substrate/values.yaml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,16 +103,12 @@ ateApiServerEnvVarsConfigMap: ate-api-server-envvars
103103
otel:
104104
endpoint: ""
105105

106-
monitoring:
107-
gkePodMonitoring:
108-
enabled: false
109-
110106
image:
111107
registry: ghcr.io/kagent-dev/substrate
112108
tag: ""
113109

114110
images:
115111
valkey: valkey/valkey:8.0
116-
envoy: envoyproxy/envoy:v1.30-latest
112+
agentgateway: cr.agentgateway.dev/agentgateway:v1.3.0-alpha.1
117113
coredns: coredns/coredns:1.11.1
118114
busybox: busybox:1.36

0 commit comments

Comments
 (0)