Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CLD-6577] Mattermost push-proxy service templating revisit #434

Merged
merged 2 commits into from
Jan 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/mattermost-push-proxy/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
description: Mattermost Push Proxy server
name: mattermost-push-proxy
type: application
version: 0.10.2
version: 0.10.3
appVersion: 5.28.0
keywords:
- mattermost
Expand Down
24 changes: 22 additions & 2 deletions charts/mattermost-push-proxy/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,30 @@ metadata:
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.externalPort }}
{{- if and .Values.service.externalPort (not (eq .Values.service.type "LoadBalancer")) }}
- name: {{ .Values.service.name }}
port: {{ .Values.service.externalPort }}
targetPort: {{ .Values.service.internalPort }}
protocol: TCP
name: {{ .Values.service.name }}
{{- end }}
{{- if and .Values.service.enableHttp (eq .Values.service.type "LoadBalancer") }}
- name: {{ .Values.service.name }}-http
port: 80
protocol: TCP
targetPort: {{ .Values.service.internalPort }}
{{- if and (semverCompare ">=1.20" .Capabilities.KubeVersion.Version) }}
appProtocol: http
{{- end }}
{{- end }}
{{- if and .Values.service.enableHttps (eq .Values.service.type "LoadBalancer") }}
- name: {{ .Values.service.name }}-https
port: 443
protocol: TCP
targetPort: {{ .Values.service.internalPort }}
{{- if and (semverCompare ">=1.20" .Capabilities.KubeVersion.Version) }}
appProtocol: https
{{- end }}
{{- end }}
selector:
app.kubernetes.io/name: {{ include "mattermost-push-proxy.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
Expand Down
6 changes: 6 additions & 0 deletions charts/mattermost-push-proxy/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ service:
type: ClusterIP
externalPort: 8066
internalPort: 8066

# The following configuration is relevant only when service.type is set to `LoadBalancer`, exposing ports HTTP (80) and HTTPS (443).
# This is particularly beneficial in situations where service.type is set to `LoadBalancer` instead of `ClusterIP` and/or using Ingress
enableHttp: false
enableHttps: false

annotations: {}

ingress:
Expand Down