Skip to content

Commit

Permalink
Add loadbalancer settings to service.yaml (#121)
Browse files Browse the repository at this point in the history
  • Loading branch information
YuikoTakada authored and Carlos Tadeu Panato Junior committed Nov 26, 2019
1 parent a47132a commit 3d9e64e
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/mattermost-team-edition/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
description: Mattermost Team Edition server.
name: mattermost-team-edition
version: 3.8.0
version: 3.8.1
appVersion: 5.13.2
keywords:
- mattermost
Expand Down
2 changes: 2 additions & 0 deletions charts/mattermost-team-edition/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ Parameter | Description
`extraPodAnnotations` | Extra pod annotations to be used in the deployments | `[]`
`extraEnvVars` | Extra environments variables to be used in the deployments | `[]`
`extraInitContainers` | Additional init containers | `[]`
`service.annotations` | Service annotations | `{}`
`service.loadBalancerSourceRanges` | list of IP CIDRs allowed access to load balancer (if supported) | `[]`

Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,

Expand Down
8 changes: 8 additions & 0 deletions charts/mattermost-team-edition/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
apiVersion: v1
kind: Service
metadata:
{{- if .Values.service.annotations }}
annotations:
{{ toYaml .Values.service.annotations | indent 4 }}
{{- end }}
name: {{ include "mattermost-team-edition.name" . }}
labels:
app.kubernetes.io/name: {{ include "mattermost-team-edition.name" . }}
Expand All @@ -18,3 +22,7 @@ spec:
targetPort: http
protocol: TCP
name: {{ include "mattermost-team-edition.name" . }}
{{- if .Values.service.loadBalancerSourceRanges }}
loadBalancerSourceRanges:
{{ toYaml .Values.service.loadBalancerSourceRanges | indent 4 }}
{{- end }}
2 changes: 2 additions & 0 deletions charts/mattermost-team-edition/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ service:
type: ClusterIP
externalPort: 8065
internalPort: 8065
annotations: {}
loadBalancerSourceRanges: []

ingress:
enabled: false
Expand Down

0 comments on commit 3d9e64e

Please sign in to comment.