From 39a4cfee6572e7f885efb622d26ef9a90112a696 Mon Sep 17 00:00:00 2001 From: Conrad Ludgate Date: Mon, 4 Dec 2023 14:32:48 +0000 Subject: [PATCH] proxy: add http pool flag (#46) * add http pool flag * update * patch boolean handling * use k3d cluster instead of kind --------- Co-authored-by: Andrey Taranik --- .github/workflows/lint-test.yaml | 7 +++++-- charts/neon-proxy/Chart.yaml | 2 +- charts/neon-proxy/README.md | 3 ++- charts/neon-proxy/templates/deployment.yaml | 7 +++++++ charts/neon-proxy/values.yaml | 2 ++ 5 files changed, 17 insertions(+), 4 deletions(-) diff --git a/.github/workflows/lint-test.yaml b/.github/workflows/lint-test.yaml index 77290ea..835f897 100644 --- a/.github/workflows/lint-test.yaml +++ b/.github/workflows/lint-test.yaml @@ -37,8 +37,11 @@ jobs: - name: Run chart-testing (lint) run: ct lint --config ct.yaml - - name: Create k8s Kind cluster - uses: helm/kind-action@v1.8.0 + - name: Create k3d cluster + uses: nolar/setup-k3d-k3s@v1 + with: + version: v1.25 + github-token: ${{ secrets.GITHUB_TOKEN }} - name: Run chart-testing (install) run: ct install --config ct.yaml diff --git a/charts/neon-proxy/Chart.yaml b/charts/neon-proxy/Chart.yaml index 06102ef..7f7177b 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.3 +version: 1.7.4 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 695a864..cdbefab 100644 --- a/charts/neon-proxy/README.md +++ b/charts/neon-proxy/README.md @@ -1,6 +1,6 @@ # neon-proxy -![Version: 1.7.3](https://img.shields.io/badge/Version-1.7.3-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.4](https://img.shields.io/badge/Version-1.7.4-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,7 @@ Kubernetes: `^1.18.x-x` | settings.controlplane_token | string | `""` | (string) JWT token to pass to control plane management API | | settings.domain | string | `""` | domain used in TLS cert for client postgres connections | | 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. | | settings.metricCollectionInterval | string | `""` | (string) how often metrics should be sent. | | settings.otelExporterOtlpEndpoint | string | `""` | OpenTelemetry collector URL (will be converted into `OTEL_EXPORTER_OTLP_ENDPOINT` environment variable) | diff --git a/charts/neon-proxy/templates/deployment.yaml b/charts/neon-proxy/templates/deployment.yaml index 6615e13..6971674 100644 --- a/charts/neon-proxy/templates/deployment.yaml +++ b/charts/neon-proxy/templates/deployment.yaml @@ -81,6 +81,13 @@ spec: - {{ . }} {{- end }} {{- end }} + {{- if .Values.settings.httpPoolOptIn }} + - --sql-over-http-pool-opt-in + - "true" + {{- else}} + - --sql-over-http-pool-opt-in + - "false" + {{- end }} {{- if .Values.settings.domain }} - --tls-key - /certs/tls.key diff --git a/charts/neon-proxy/values.yaml b/charts/neon-proxy/values.yaml index dce155e..c5b38f1 100644 --- a/charts/neon-proxy/values.yaml +++ b/charts/neon-proxy/values.yaml @@ -57,6 +57,8 @@ settings: controlplane_token: "" # settings.wakeComputeLock -- (string) Configures the locking of wake_compute per endpoint wakeComputeLock: "permits=0" + # settings.httpPoolOptIn -- (bool) Sets the SQL over HTTP Pool to opt-in-only mode if true. Set false to enable it always + httpPoolOptIn: true serviceAccount: # serviceAccount.create - Specifies whether a service account should be created