Skip to content

Commit ef7d437

Browse files
Merge pull request #6 from Intreecom/feature/nodeport-service-type
feature/nodeport service type
2 parents 0982ed7 + 8b2c941 commit ef7d437

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

charts/pgbouncer/templates/service.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,8 @@ spec:
1111
targetPort: pg
1212
protocol: TCP
1313
name: pg
14+
{{- if eq .Values.service.type "NodePort" }}
15+
nodePort: {{ .Values.service.nodePort }}
16+
{{- end }}
1417
selector:
1518
{{- include "pgbouncer.selectorLabels" . | nindent 4 }}

charts/pgbouncer/values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,12 @@ securityContext: {}
6464
# This is for setting up a service more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/
6565
service:
6666
# This sets the service type more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types
67+
# allowed values: ClusterIP (default), NodePort
6768
type: ClusterIP
6869
# This sets the ports more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#field-spec-ports
6970
port: 5432
71+
# nodePort property is required when the .Values.service.type is NodePort
72+
# nodePort: "35432"
7073

7174
resources: {}
7275
# We usually recommend not to specify default resources and to leave this as a conscious

charts/py-app/templates/service.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ spec:
1212
targetPort: http
1313
protocol: TCP
1414
name: http
15+
{{- if eq .Values.service.type "NodePort" }}
16+
nodePort: {{ .Values.service.nodePort }}
17+
{{- end }}
1518
selector:
1619
{{- include "py-app.selectorLabels" . | nindent 4 }}
1720
deployment_type: web

0 commit comments

Comments
 (0)