From d86ffdacdc59b58a5adad1ddf93f4946c28a3a3e Mon Sep 17 00:00:00 2001 From: Folke Behrens Date: Thu, 24 Oct 2024 17:18:14 +0200 Subject: [PATCH] proxy: Make exposed proxy port conditional for auth broker --- charts/neon-proxy/Chart.yaml | 2 +- charts/neon-proxy/README.md | 4 ++-- charts/neon-proxy/templates/service.exposed.yaml | 4 +++- charts/neon-proxy/values.yaml | 3 ++- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/charts/neon-proxy/Chart.yaml b/charts/neon-proxy/Chart.yaml index af35093..35c8d89 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.9.0 +version: 1.10.0 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 25f57b7..4e03657 100644 --- a/charts/neon-proxy/README.md +++ b/charts/neon-proxy/README.md @@ -1,6 +1,6 @@ # neon-proxy -![Version: 1.9.0](https://img.shields.io/badge/Version-1.9.0-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.10.0](https://img.shields.io/badge/Version-1.10.0-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 @@ -33,7 +33,7 @@ Kubernetes: `^1.18.x-x` | exposedService.annotations | object | `{}` | Annotations to add to the exposed service | | exposedService.externalTrafficPolicy | string | `"Cluster"` | externalTrafficPolicy (Cluster, Internal) | | exposedService.httpsPort | int | `nil` | Exposed Service https port. If null, https server will not be exposed. | -| exposedService.port | int | `5432` | Exposed Service proxy port | +| exposedService.port | int | `5432` | Exposed Service proxy port. If null, proxy port will not be exposed. Useful for auth-broker. | | exposedService.type | string | `"LoadBalancer"` | Exposed service type | | extraManifests | list | `[]` | Additional manifests that are created with the chart | | fullnameOverride | string | `""` | String to fully override neon-proxy.fullname template | diff --git a/charts/neon-proxy/templates/service.exposed.yaml b/charts/neon-proxy/templates/service.exposed.yaml index 101c928..77c59db 100644 --- a/charts/neon-proxy/templates/service.exposed.yaml +++ b/charts/neon-proxy/templates/service.exposed.yaml @@ -12,10 +12,12 @@ spec: type: {{ .Values.exposedService.type }} externalTrafficPolicy: {{ .Values.exposedService.externalTrafficPolicy }} ports: - - port: {{ .Values.exposedService.port }} + {{- with .Values.exposedService.port }} + - port: {{ . }} targetPort: proxy protocol: TCP name: proxy + {{- end }} {{- with .Values.exposedService.httpsPort }} - port: {{ . }} targetPort: https diff --git a/charts/neon-proxy/values.yaml b/charts/neon-proxy/values.yaml index 15c53f1..9d1eec5 100644 --- a/charts/neon-proxy/values.yaml +++ b/charts/neon-proxy/values.yaml @@ -184,7 +184,8 @@ exposedService: type: LoadBalancer # exposedService.externalTrafficPolicy -- externalTrafficPolicy (Cluster, Internal) externalTrafficPolicy: Cluster - # exposedService.port -- Exposed Service proxy port + # exposedService.port -- Exposed Service proxy port. + # If null, proxy port will not be exposed. Useful for auth-broker. port: 5432 # exposedService.httpsPort -- (int) Exposed Service https port. If null, https server will not be exposed. httpsPort: null