Skip to content

Commit

Permalink
Allow service port name override (#41)
Browse files Browse the repository at this point in the history
* Allow service port name override

Signed-off-by: Rubel Ahammad <[email protected]>
Signed-off-by: Rubel Ahammad <[email protected]>

* Allow service port name override

Signed-off-by: Rubel Ahammad <[email protected]>
Signed-off-by: Rubel Ahammad <[email protected]>

* Bump version number to 2.4.0

Signed-off-by: Rubel Ahammad <[email protected]>

* Allow service port name override

Signed-off-by: Rubel Ahammad <[email protected]>

---------

Signed-off-by: Rubel Ahammad <[email protected]>
Signed-off-by: Rubel Ahammad <[email protected]>
  • Loading branch information
rubel-ahammad authored Sep 13, 2024
1 parent 5f99306 commit c7ee2c8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion helm-charts/inbucket/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: Disposable webmail server (similar to Mailinator) with built in SMT
name: inbucket
type: application
appVersion: 3.0.0
version: 2.3.1
version: 2.4.0
keywords:
- inbucket
- mail
Expand Down
7 changes: 4 additions & 3 deletions helm-charts/inbucket/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- $portNameDict := .Values.service.portName | default dict }}
apiVersion: v1
kind: Service
metadata:
Expand Down Expand Up @@ -26,21 +27,21 @@ spec:
{{ toYaml .Values.service.loadBalancerSourceRanges | indent 4 }}
{{- end }}
ports:
- name: http
- name: {{ get $portNameDict "http" | default "http" }}
port: {{ .Values.service.port.http }}
protocol: TCP
targetPort: http
{{- if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.nodePort.http))) }}
nodePort: {{ .Values.service.nodePort.http }}
{{- end }}
- name: smtp
- name: {{ get $portNameDict "smtp" | default "smtp" }}
port: {{ .Values.service.port.smtp }}
protocol: TCP
targetPort: smtp
{{- if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.nodePort.smtp))) }}
nodePort: {{ .Values.service.nodePort.smtp }}
{{- end }}
- name: pop3
- name: {{ get $portNameDict "pop3" | default "pop3" }}
port: {{ .Values.service.port.pop3 }}
protocol: TCP
targetPort: pop3
Expand Down
4 changes: 4 additions & 0 deletions helm-charts/inbucket/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ service:
loadBalancerIP: ""
loadBalancerSourceRanges: []
type: ClusterIP
portName:
http: http
smtp: smtp
pop3: pop3
port:
http: 9000
smtp: 2500
Expand Down

0 comments on commit c7ee2c8

Please sign in to comment.