From 814be3c2394e43de18ea6ce0a2bd1ff4791dc062 Mon Sep 17 00:00:00 2001 From: Rohit Ramkumar Date: Thu, 20 Mar 2025 04:59:04 +0000 Subject: [PATCH] Helm chart for bbr --- config/charts/body-based-routing/.helmignore | 23 ++++++++++ config/charts/body-based-routing/Chart.yaml | 9 ++++ config/charts/body-based-routing/README.md | 42 +++++++++++++++++++ .../body-based-routing/templates/NOTES.txt | 1 + .../body-based-routing/templates/bbr.yaml | 42 +++++++++++++++++++ config/charts/body-based-routing/values.yaml | 9 ++++ 6 files changed, 126 insertions(+) create mode 100644 config/charts/body-based-routing/.helmignore create mode 100644 config/charts/body-based-routing/Chart.yaml create mode 100644 config/charts/body-based-routing/README.md create mode 100644 config/charts/body-based-routing/templates/NOTES.txt create mode 100644 config/charts/body-based-routing/templates/bbr.yaml create mode 100644 config/charts/body-based-routing/values.yaml diff --git a/config/charts/body-based-routing/.helmignore b/config/charts/body-based-routing/.helmignore new file mode 100644 index 000000000..0e8a0eb36 --- /dev/null +++ b/config/charts/body-based-routing/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/config/charts/body-based-routing/Chart.yaml b/config/charts/body-based-routing/Chart.yaml new file mode 100644 index 000000000..952a84f00 --- /dev/null +++ b/config/charts/body-based-routing/Chart.yaml @@ -0,0 +1,9 @@ +apiVersion: v2 +name: body-based-routing +description: A Helm chart for the body-based routing extension + +type: application + +version: 0.1.0 + +appVersion: "0.2.0" diff --git a/config/charts/body-based-routing/README.md b/config/charts/body-based-routing/README.md new file mode 100644 index 000000000..2a8d96a86 --- /dev/null +++ b/config/charts/body-based-routing/README.md @@ -0,0 +1,42 @@ +# Body-based routing + +A chart to the body-based routing deployment and service. + + +## Install + +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 +``` + +## Uninstall + +Run the following command to uninstall the chart: + +```txt +$ helm uninstall body-based-router +``` + +## Configuration + +The following table list the configurable parameters of the chart. + +| **Parameter Name** | **Description** | +|---------------------------------------------|----------------------------------------------------------------------------------------------------| +| `bbr.name` | Name for the deployment and service. | +| `bbr.replicas` | Number of replicas for the deployment. Defaults to `1`. | +| `bbr.image.name` | Name of the container image used. | +| `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`. | + +## 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. diff --git a/config/charts/body-based-routing/templates/NOTES.txt b/config/charts/body-based-routing/templates/NOTES.txt new file mode 100644 index 000000000..0a3820091 --- /dev/null +++ b/config/charts/body-based-routing/templates/NOTES.txt @@ -0,0 +1 @@ +Body-based routing extension deployed. diff --git a/config/charts/body-based-routing/templates/bbr.yaml b/config/charts/body-based-routing/templates/bbr.yaml new file mode 100644 index 000000000..4b888dcb2 --- /dev/null +++ b/config/charts/body-based-routing/templates/bbr.yaml @@ -0,0 +1,42 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ .Values.bbr.name }} + namespace: {{ .Release.Namespace }} +spec: + replicas: {{ .Values.bbr.replicas | default 1 }} + selector: + matchLabels: + app: {{ .Values.bbr.name }} + template: + metadata: + labels: + app: {{ .Values.bbr.name }} + spec: + containers: + - name: bbr + image: {{ .Values.bbr.image.hub }}/{{ .Values.bbr.image.name }}:{{ .Values.bbr.image.tag }} + imagePullPolicy: {{ .Values.bbr.image.pullPolicy | default "Always" }} + args: + - "-streaming" + - "v" + - "3" + ports: + - containerPort: 9004 + # health check + - containerPort: 9005 +--- +apiVersion: v1 +kind: Service +metadata: + name: {{ .Values.bbr.name }} + namespace: {{ .Release.Namespace }} +spec: + selector: + app: {{ .Values.bbr.name }} + ports: + - protocol: TCP + port: 9004 + targetPort: 9004 + appProtocol: HTTP2 + type: ClusterIP diff --git a/config/charts/body-based-routing/values.yaml b/config/charts/body-based-routing/values.yaml new file mode 100644 index 000000000..b60f5d69f --- /dev/null +++ b/config/charts/body-based-routing/values.yaml @@ -0,0 +1,9 @@ +bbr: + name: body-based-router + replicas: 1 + image: + name: bbr + hub: us-central1-docker.pkg.dev/k8s-staging-images/gateway-api-inference-extension + tag: main + pullPolicy: Always + extProcPort: 9002