Skip to content

Add provider-specific manifests for BBR helm chart #585

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions config/charts/body-based-routing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,20 @@ A chart to the body-based routing deployment and service.
To install a body-based router named `body-based-router`, you can run the following command:

```txt
$ helm install body-based-router ./config/charts/body-based-routing
$ helm install body-based-router ./config/charts/body-based-routing \
--set provider.name=[gke|istio] \
--set inference-gateway.name=inference-gateway
```

Note that the provider name is needed to ensure provider-specific manifests are also applied. If no provider is specified, then only
the deployment and service are deployed.

To install via the latest published chart in staging (--version v0 indicates latest dev version), you can run the following command:

```txt
$ helm install body-based-router oci://us-central1-docker.pkg.dev/k8s-staging-images/gateway-api-inference-extension/charts/body-based-router --version v0
$ helm install body-based-router oci://us-central1-docker.pkg.dev/k8s-staging-images/gateway-api-inference-extension/charts/body-based-router \
--version v0
--set provider.name=[gke|istio]
```

## Uninstall
Expand All @@ -37,12 +44,9 @@ The following table list the configurable parameters of the chart.
| `bbr.image.hub` | Registry URL where the image is hosted. |
| `bbr.image.tag` | Image tag. |
| `bbr.image.pullPolicy` | Image pull policy for the container. Possible values: `Always`, `IfNotPresent`, or `Never`. Defaults to `Always`. |
| `provider.name` | Name of the Inference Gateway implementation being used. Possible values: `istio`, `gke`. Defaults to `none`. |
| `inference-gateway.name` | The name of the Gateway. Defaults to `inference-gateway`. |

## Notes

This chart will only deploy the body-based router deployment and service.
Note that this should only be deployed once per Gateway.

Additional configuration is needed to configure a proxy extension that calls
out to the service in the request path. For example, vwith Envoy Gateway, this
would require configuring EnvoyExtensionPolicy.
This chart should only be deployed once per Gateway.
49 changes: 49 additions & 0 deletions config/charts/body-based-routing/templates/gke.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{{- if eq .Values.provider.name "gke" }}
---
kind: GCPRoutingExtension
apiVersion: networking.gke.io/v1
metadata:
name: {{ .Values.bbr.name }}
namespace: {{ .Release.Namespace }}
spec:
targetRefs:
- group: "gateway.networking.k8s.io"
kind: Gateway
name: {{ .Values.inference-gateway.name }}
extensionChains:
- name: chain1
extensions:
- name: ext1
authority: "myext.com"
timeout: 1s
supportedEvents:
- RequestHeaders
- RequestBody
- RequestTrailers
requestBodySendMode: "FullDuplexStreamed"
backendRef:
group: ""
kind: Service
name: {{ .Values.bbr.name }}
port: 9004
---
apiVersion: networking.gke.io/v1
kind: HealthCheckPolicy
metadata:
name: bbr-healthcheck
namespace: {{ .Release.Namespace }}
spec:
default:
logConfig:
enabled: true
config:
type: "GRPC"
grpcHealthCheck:
portSpecification: "USE_FIXED_PORT"
port: 9005
targetRef:
group: ""
kind: Service
name: {{ .Values.bbr.name }}
namespace: {{ .Release.Namespace }}
{{- end }}
47 changes: 47 additions & 0 deletions config/charts/body-based-routing/templates/istio.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{{- if eq .Values.provider.name "istio" }}
---
apiVersion: networking.istio.io/v1alpha3
kind: EnvoyFilter
metadata:
name: {{ .Values.bbr.name }}
namespace: {{ .Release.Namespace }}
spec:
configPatches:
- applyTo: HTTP_FILTER
match:
# context omitted so that this applies to both sidecars and gateways
listener:
filterChain:
filter:
name: "envoy.filters.network.http_connection_manager"
patch:
operation: INSERT_FIRST
value:
name: envoy.filters.http.ext_proc
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.http.ext_proc.v3.ExternalProcessor
failure_mode_allow: false
allow_mode_override: true
processing_mode:
request_header_mode: "SEND"
response_header_mode: "SKIP"
request_body_mode: "BUFFERED"
response_body_mode: "NONE"
request_trailer_mode: "SKIP"
response_trailer_mode: "SKIP"
grpc_service:
envoy_grpc:
cluster_name: outbound|9004||{{ .Values.bbr.name }}.default.svc.cluster.local
---
apiVersion: networking.istio.io/v1
kind: DestinationRule
metadata:
name: {{ .Values.bbr.name }}
namespace: {{ .Release.Namespace }}
spec:
host: {{ .Values.bbr.name }}.default.svc.cluster.local
trafficPolicy:
tls:
mode: SIMPLE
insecureSkipVerify: true
{{- end }}
6 changes: 6 additions & 0 deletions config/charts/body-based-routing/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,9 @@ bbr:
tag: main
pullPolicy: Always
extProcPort: 9002

provider:
name: none

inference-gateway:
name: inference-gateway