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-6350] Update Push Proxy helm chart to support new Android API for notifications #426

Merged
merged 1 commit into from
Nov 2, 2023
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
6 changes: 3 additions & 3 deletions charts/mattermost-push-proxy/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ apiVersion: v2
description: Mattermost Push Proxy server
name: mattermost-push-proxy
type: application
version: 0.9.0
appVersion: 5.25.0
version: 0.10.0
appVersion: 5.26.0
keywords:
- mattermost
- communication
Expand All @@ -23,5 +23,5 @@ sources:
annotations:
artifacthub.io/images: |
- name: mattermost-push-proxy
image: mattermost/mattermost-push-proxy:5.25.0
image: mattermost/mattermost-push-proxy:5.26.0
artifacthub.io/license: Apache-2.0
28 changes: 28 additions & 0 deletions charts/mattermost-push-proxy/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,16 @@ spec:
name: apple-rnbeta-push-cert
subPath: apple-rnbeta-push-cert.pem
{{- end }}
{{- if .Values.androidPushSettings.android.serviceFile }}
- mountPath: "{{ .Values.androidPushSettings.android.serviceFileLocation }}"
name: android-service-file
subPath: "{{ .Values.androidPushSettings.android.serviceFileName }}"
{{- end }}
{{- if .Values.androidPushSettings.android_rn.serviceFile }}
- mountPath: "{{ .Values.androidPushSettings.android_rn.serviceFileLocation }}"
name: android-rn-service-file
subPath: "{{ .Values.androidPushSettings.android_rn.serviceFileName }}"
{{- end }}
resources:
{{ toYaml .Values.resources | indent 12 }}
{{- with .Values.nodeSelector }}
Expand Down Expand Up @@ -114,3 +124,21 @@ spec:
- key: apple_rnbeta_cert
path: apple-rnbeta-push-cert.pem
{{- end }}
{{- if .Values.androidPushSettings.android.serviceFileLocation }}
- name: android-service-file
secret:
secretName: {{ include "mattermost-push-proxy.fullname" . }}-android-service-files
items:
- key: android_serviceFile
path: {{ .Values.androidPushSettings.android.serviceFileName }}
{{- end }}
{{- if .Values.androidPushSettings.android_rn.serviceFileLocation }}
- name: android-rn-service-file
secret:
secretName: {{ include "mattermost-push-proxy.fullname" . }}-android-service-files
items:
- key: android_rn_serviceFile
path: {{ .Values.androidPushSettings.android_rn.serviceFileName }}
{{- end }}


15 changes: 12 additions & 3 deletions charts/mattermost-push-proxy/templates/push-config.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"ThrottlePerSec":300,
"ThrottleMemoryStoreSize":50000,
"ThrottleVaryByHeader":"X-Forwarded-For",
"EnableMetrics": true,
"EnableMetrics": {{ .Values.enableMetrics }},
"SendTimeoutSec": {{ .Values.sendTimeoutSec }},
"ApplePushSettings":[
{
"Type":"apple",
Expand Down Expand Up @@ -70,11 +71,19 @@
"AndroidPushSettings":[
{
"Type":"android",
"AndroidApiKey":"{{ .Values.androidPushSettings.android.apiKey }}"
{{- if eq .Values.androidPushSettings.android.serviceFileLocation "" }}
"ServiceFileLocation":""
{{- else }}
"ServiceFileLocation":"{{ .Values.androidPushSettings.android.serviceFileLocation }}"
{{- end }}
},
{
"Type":"android_rn",
"AndroidApiKey":"{{ .Values.androidPushSettings.android_rn.apiKey }}"
{{- if eq .Values.androidPushSettings.android_rn.serviceFileLocation "" }}
"ServiceFileLocation":""
{{- else }}
"ServiceFileLocation":"{{ .Values.androidPushSettings.android_rn.serviceFileLocation }}"
{{- end }}
}
]
}
Expand Down
13 changes: 13 additions & 0 deletions charts/mattermost-push-proxy/templates/secrets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,16 @@ data:
apple_cert: {{ default "" .Values.applePushSettings.apple.privateCert | b64enc | quote }}
apple_rn_cert: {{ default "" .Values.applePushSettings.apple_rn.privateCert | b64enc | quote }}
apple_rnbeta_cert: {{ default "" .Values.applePushSettings.apple_rnbeta.privateCert | b64enc | quote }}
---
apiVersion: v1
kind: Secret
metadata:
name: {{ include "mattermost-push-proxy.fullname" . }}-android-service-files
labels:
app.kubernetes.io/name: {{ include "mattermost-push-proxy.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
helm.sh/chart: {{ include "mattermost-push-proxy.chart" . }}
data:
android_serviceFile: {{ default "" .Values.androidPushSettings.android.serviceFile | toJson | b64enc | quote }}
android_rn_serviceFile: {{ default "" .Values.androidPushSettings.android_rn.serviceFile | toJson | b64enc | quote }}
42 changes: 39 additions & 3 deletions charts/mattermost-push-proxy/values.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
replicaCount: 1
image:
repository: mattermost/mattermost-push-proxy
tag: 5.24.0
tag: 5.26.0
pullPolicy: Always

resources: {}
Expand Down Expand Up @@ -47,6 +47,10 @@ ingress:
# - push-proxy.example.local

# You cannot specify both the authKey and privateCert methods.

sendTimeoutSec: 30
enableMetrics: true

applePushSettings:
authKey: ""
authKeyFile: "/mattermost-push-proxy/config/AuthKey_1234.p8"
Expand All @@ -67,6 +71,38 @@ applePushSettings:
pushTopic: ""
androidPushSettings:
android:
apiKey: ""
# serviceFile: {
# "type": "service_account",
# "project_id": "",
# "private_key_id": "",
# "private_key": "",
# "client_email": "",
# "client_id": "",
# "auth_uri": "",
# "token_uri": "",
# "auth_provider_x509_cert_url": "",
# "client_x509_cert_url": "",
# "universe_domain": "googleapis.com"
# }
serviceFile: {}
# When setting serviceFileLocation both serviceFile and serviceFileName needs to be set
serviceFileLocation: ""
serviceFileName: ""
android_rn:
apiKey: ""
# serviceFile: {
# "type": "service_account",
# "project_id": "",
# "private_key_id": "",
# "private_key": "",
# "client_email": "",
# "client_id": "",
# "auth_uri": "",
# "token_uri": "",
# "auth_provider_x509_cert_url": "",
# "client_x509_cert_url": "",
# "universe_domain": "googleapis.com"
# }
serviceFile: {}
# When setting serviceFileLocation both serviceFile and serviceFileName needs to be set
serviceFileLocation: ""
serviceFileName: ""