From 8af820d6adb1e04ca4c5fc76714e2ae9d59bc248 Mon Sep 17 00:00:00 2001 From: Dev Jadeja Date: Wed, 5 Feb 2025 20:15:09 +0530 Subject: [PATCH] feature: added compatibility of nodeport service type --- charts/pgbouncer/templates/service.yaml | 3 +++ charts/pgbouncer/values.yaml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/charts/pgbouncer/templates/service.yaml b/charts/pgbouncer/templates/service.yaml index 3c39336..19e4fbd 100644 --- a/charts/pgbouncer/templates/service.yaml +++ b/charts/pgbouncer/templates/service.yaml @@ -11,5 +11,8 @@ spec: targetPort: pg protocol: TCP name: pg + {{- if eq .Values.service.type "NodePort" }} + nodePort: {{ .Values.service.nodePort }} + {{- end }} selector: {{- include "pgbouncer.selectorLabels" . | nindent 4 }} diff --git a/charts/pgbouncer/values.yaml b/charts/pgbouncer/values.yaml index b54253d..944d826 100644 --- a/charts/pgbouncer/values.yaml +++ b/charts/pgbouncer/values.yaml @@ -64,9 +64,12 @@ securityContext: {} # This is for setting up a service more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/ service: # This sets the service type more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types + # allowed values: ClusterIP (default), NodePort type: ClusterIP # This sets the ports more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#field-spec-ports port: 5432 + # nodePort property is required when the .Values.service.type is NodePort + # nodePort: "35432" resources: {} # We usually recommend not to specify default resources and to leave this as a conscious