Skip to content

Commit d5dea69

Browse files
authored
refactor: move RBAC for EG into helm chart and drop unnecessary rules (#1377)
**Description** This moves the RBAC yaml necessary to be attached to EG controller into our helm chart. This removes one additional step during the installation. This also removes the unnecessary/unused roles from the RBAC. The remaining thing is only for the inference pool. **Related Issues/PRs (if applicable)** Part of #1191 --------- Signed-off-by: Takeshi Yoneda <[email protected]>
1 parent 536bc0e commit d5dea69

File tree

4 files changed

+42
-45
lines changed

4 files changed

+42
-45
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Copyright Envoy AI Gateway Authors
2+
# SPDX-License-Identifier: Apache-2.0
3+
# The full text of the Apache license is available in the LICENSE file at
4+
# the root of the repo.
5+
6+
# This file contains the RBAC roles and role bindings for the Envoy Gateway
7+
# so that it can read the InferencePool resources that are set in the HTTPRoutes
8+
# generated by the AI Gateway.
9+
---
10+
apiVersion: rbac.authorization.k8s.io/v1
11+
kind: ClusterRole
12+
metadata:
13+
name: envoy-ai-gateway-inference-pool-reader
14+
rules:
15+
- apiGroups:
16+
- "inference.networking.k8s.io"
17+
resources:
18+
- "inferencepools"
19+
verbs:
20+
- "get"
21+
- "list"
22+
---
23+
apiVersion: rbac.authorization.k8s.io/v1
24+
kind: ClusterRoleBinding
25+
metadata:
26+
name: envoy-ai-gateway-inference-pool-reader-binding
27+
roleRef:
28+
apiGroup: rbac.authorization.k8s.io
29+
kind: ClusterRole
30+
name: envoy-ai-gateway-inference-pool-reader
31+
subjects:
32+
- kind: ServiceAccount
33+
# The service account name is hardcoded to "envoy-gateway":
34+
# https://github.com/envoyproxy/gateway/blob/70af785fba094929bc6044a57470d429205c4d5e/charts/gateway-helm/templates/envoy-gateway-serviceaccount.yaml#L4
35+
name: envoy-gateway
36+
namespace: {{ .Values.envoyGateway.namespace }}
37+
---

manifests/charts/ai-gateway-helm/values.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,3 +178,8 @@ controller:
178178
#
179179
# This value should be set to a secure random string in production environments instead of the default below.
180180
mcpSessionEncryptionSeed: "default-insecure-seed"
181+
182+
# Configuration for the Envoy Gateway component that AI Gateway relies on to program Envoy.
183+
envoyGateway:
184+
# The namespace where the Envoy Gateway controller is installed.
185+
namespace : envoy-gateway-system

manifests/envoy-gateway-config/rbac.yaml

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

site/docs/getting-started/installation.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ After installing Envoy AI Gateway, apply the AI Gateway-specific configuration t
5858
```shell
5959
kubectl apply -f https://raw.githubusercontent.com/envoyproxy/ai-gateway/main/manifests/envoy-gateway-config/redis.yaml
6060
kubectl apply -f https://raw.githubusercontent.com/envoyproxy/ai-gateway/main/manifests/envoy-gateway-config/config.yaml
61-
kubectl apply -f https://raw.githubusercontent.com/envoyproxy/ai-gateway/main/manifests/envoy-gateway-config/rbac.yaml
6261

6362
kubectl rollout restart -n envoy-gateway-system deployment/envoy-gateway
6463

0 commit comments

Comments
 (0)