Skip to content

Commit

Permalink
[mailhog] feat: Add extraPorts in Service and extraContainers in Depl…
Browse files Browse the repository at this point in the history
…oyment (#627)

* [mailhog] Add extraPorts in Service and extraContainers in Deployment

Signed-off-by: Julliano Goncalves <jullianow@gmail.com>

* Code review feedback

Signed-off-by: Julliano Goncalves <jullianow@gmail.com>
  • Loading branch information
jullianow authored and grieshaber committed Aug 2, 2022
1 parent 9c3f609 commit b9a864d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 1 deletion.
4 changes: 3 additions & 1 deletion charts/mailhog/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ The following table lists the configurable parameters of the Mailhog chart and t

Parameter | Description | Default
--- | --- | ---
`extraContainers` | Additional containers to be added to the application pod | `[]`
`image.repository` | Docker image repository | `mailhog/mailhog`
`image.tag` | Docker image tag whose default is the chart version | `""`
`image.pullPolicy` | Docker image pull policy | `IfNotPresent`
Expand All @@ -62,6 +63,7 @@ Parameter | Description | Default
`service.annotations` | Annotations for the service | `{}`
`service.clusterIP` | Internal cluster service IP | `""`
`service.externalIPs` | Service external IP addresses | `[]`
`service.extraPorts` | Additional ports to the service | `[]`
`service.loadBalancerIP` | IP address to assign to load balancer (if supported) | `""`
`service.loadBalancerSourceRanges` | List of IP CIDRs allowed access to load balancer (if supported) | `[]`
`service.type` | Type of service to create | `ClusterIP`
Expand Down Expand Up @@ -106,4 +108,4 @@ Parameter | Description | Default
pathType: Prefix
```
This allows to configure specific `pathType` configurations, e.g. `pathType: ImplementationSpecific` for [GKE Ingress on Google Cloud Platform](https://cloud.google.com/kubernetes-engine/docs/concepts/ingress#default_backend).
This allows to configure specific `pathType` configurations, e.g. `pathType: ImplementationSpecific` for [GKE Ingress on Google Cloud Platform](https://cloud.google.com/kubernetes-engine/docs/concepts/ingress#default_backend).
3 changes: 3 additions & 0 deletions charts/mailhog/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ spec:
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.extraContainers }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
Expand Down
3 changes: 3 additions & 0 deletions charts/mailhog/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,8 @@ spec:
{{- if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.nodePort.smtp))) }}
nodePort: {{ .Values.service.nodePort.smtp }}
{{- end }}
{{- if .Values.service.extraPorts }}
{{- toYaml .Values.service.extraPorts | nindent 4 }}
{{- end }}
selector:
{{- include "mailhog.selectorLabels" . | nindent 4 }}
3 changes: 3 additions & 0 deletions charts/mailhog/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ image:

imagePullSecrets: []

extraContainers: []

nameOverride: ""
fullnameOverride: ""

Expand All @@ -21,6 +23,7 @@ automountServiceAccountToken: false

service:
annotations: {}
extraPorts: []
clusterIP: ""
externalIPs: []
loadBalancerIP: ""
Expand Down

0 comments on commit b9a864d

Please sign in to comment.