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 diff --git a/charts/py-app/templates/service.yaml b/charts/py-app/templates/service.yaml index d46068c..b3f583e 100644 --- a/charts/py-app/templates/service.yaml +++ b/charts/py-app/templates/service.yaml @@ -12,6 +12,9 @@ spec: targetPort: http protocol: TCP name: http + {{- if eq .Values.service.type "NodePort" }} + nodePort: {{ .Values.service.nodePort }} + {{- end }} selector: {{- include "py-app.selectorLabels" . | nindent 4 }} deployment_type: web