From 5a74236e9aaf68b4b54f06c42e0144e88285673d Mon Sep 17 00:00:00 2001 From: Stas Kelvich Date: Sun, 17 Dec 2023 15:39:29 +0200 Subject: [PATCH] expose endpointRpsLimits for proxy --- charts/neon-proxy/Chart.yaml | 2 +- charts/neon-proxy/README.md | 4 +++- charts/neon-proxy/templates/deployment.yaml | 3 +++ charts/neon-proxy/values.yaml | 4 ++++ 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/charts/neon-proxy/Chart.yaml b/charts/neon-proxy/Chart.yaml index 1315297..6ffd1ab 100644 --- a/charts/neon-proxy/Chart.yaml +++ b/charts/neon-proxy/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: neon-proxy description: Neon Proxy type: application -version: 1.7.7 +version: 1.7.8 appVersion: "0.1.0" kubeVersion: "^1.18.x-x" home: https://neon.tech diff --git a/charts/neon-proxy/README.md b/charts/neon-proxy/README.md index 8a182cc..8cfda15 100644 --- a/charts/neon-proxy/README.md +++ b/charts/neon-proxy/README.md @@ -1,6 +1,6 @@ # neon-proxy -![Version: 1.7.7](https://img.shields.io/badge/Version-1.7.7-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) [![Lint and Test Charts](https://github.com/neondatabase/helm-charts/actions/workflows/lint-test.yaml/badge.svg)](https://github.com/neondatabase/helm-charts/actions/workflows/lint-test.yaml) +![Version: 1.7.8](https://img.shields.io/badge/Version-1.7.8-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) [![Lint and Test Charts](https://github.com/neondatabase/helm-charts/actions/workflows/lint-test.yaml/badge.svg)](https://github.com/neondatabase/helm-charts/actions/workflows/lint-test.yaml) Neon Proxy @@ -66,6 +66,8 @@ Kubernetes: `^1.18.x-x` | settings.controlplane_token | string | `""` | (string) JWT token to pass to control plane management API | | settings.disableDynamicRateLimiter | bool | `true` | (bool) Disable dynamic rate limiter | | settings.domain | string | `""` | domain used in TLS cert for client postgres connections | +| settings.endpointRpsLimits[0] | string | `"300@1s"` | | +| settings.endpointRpsLimits[1] | string | `"250@10m"` | | | settings.extraDomains | list | `[]` | domains used in extra TLS certs for client postgres connections | | settings.httpPoolOptIn | bool | `true` | (bool) Sets the SQL over HTTP Pool to opt-in-only mode if true. Set false to enable it always | | settings.metricCollectionEndpoint | string | `""` | (url) endpoint used to send metrics to. If null, metrics will not be sent. | diff --git a/charts/neon-proxy/templates/deployment.yaml b/charts/neon-proxy/templates/deployment.yaml index 9e06ef7..b085330 100644 --- a/charts/neon-proxy/templates/deployment.yaml +++ b/charts/neon-proxy/templates/deployment.yaml @@ -109,6 +109,9 @@ spec: - --wake-compute-lock - {{ . }} {{- end }} + {{- range .Values.settings.endpointRpsLimits }} + - "--endpoint-rps-limit={{ . | quote }}" + {{- end }} {{- if .Values.settings }} env: {{- with .Values.settings.otelExporterOtlpEndpoint }} diff --git a/charts/neon-proxy/values.yaml b/charts/neon-proxy/values.yaml index 41cadf9..adfc09e 100644 --- a/charts/neon-proxy/values.yaml +++ b/charts/neon-proxy/values.yaml @@ -61,6 +61,10 @@ settings: httpPoolOptIn: true # settings.disableDynamicRateLimiter -- (bool) Disable dynamic rate limiter disableDynamicRateLimiter: true + # settings.endpointRpsLimit -- (list) list of rate limiters over different time intervals + endpointRpsLimits: + - 300@1s + - 250@10m serviceAccount: # serviceAccount.create - Specifies whether a service account should be created