From f43c33ded38c6da32fb9958ae5ca37838c91318b Mon Sep 17 00:00:00 2001 From: Sebastian Rojo Date: Fri, 2 Oct 2020 09:04:51 -0500 Subject: [PATCH 1/2] FIX tempalte bridge-whatsapp/configmap.yaml relaybot.invites must be array quoted --- templates/bridge-whatsapp/configmap.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/templates/bridge-whatsapp/configmap.yaml b/templates/bridge-whatsapp/configmap.yaml index 754ba71c..e9f557fc 100644 --- a/templates/bridge-whatsapp/configmap.yaml +++ b/templates/bridge-whatsapp/configmap.yaml @@ -151,7 +151,14 @@ data: # the command prefix completely like in user management rooms is not possible. management: {{ .Values.bridges.whatsapp.relaybot.management }} # List of users to invite to all created rooms that include the relaybot. - invites: {{ .Values.bridges.whatsapp.relaybot.invites }} + {{- if .Values.bridges.whatsapp.relaybot.invites }} + invites:{{- if .Values.bridges.whatsapp.relaybot.invites }} + {{- range initial .Values.bridges.whatsapp.relaybot.invites }} + - {{ . | quote }} + {{- end }} + - {{ last .Values.bridges.whatsapp.relaybot.invites | quote }} + {{- end }} + {{- end }} # The formats to use when sending messages to WhatsApp via the relaybot. message_formats: m.text: "{{ "{{ .Sender.Displayname }}" }}: {{ "{{ .Message }}" }}" From ce758f00ff817ccfc823d775079d4cc2b9f9c440 Mon Sep 17 00:00:00 2001 From: Sebastian Rojo Date: Fri, 2 Oct 2020 09:13:08 -0500 Subject: [PATCH 2/2] Fix permision on load-config init container this apply on Kubernetes CDK whit Cinder-csi... --- templates/bridge-whatsapp/deployment.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/templates/bridge-whatsapp/deployment.yaml b/templates/bridge-whatsapp/deployment.yaml index 660a49ee..71d22665 100644 --- a/templates/bridge-whatsapp/deployment.yaml +++ b/templates/bridge-whatsapp/deployment.yaml @@ -56,17 +56,17 @@ spec: image: "{{ .Values.bridges.whatsapp.image.repository }}:{{ .Values.bridges.whatsapp.image.tag }}" imagePullPolicy: {{ .Values.bridges.whatsapp.image.pullPolicy }} command: ["sh"] - args: ["-c", "cp /load/config.yaml /data/config.yaml"] + args: ["-c", "cp /load/config.yaml /data/config.yaml; touch /bridges/whatsapp.yaml; chown 1000:1000 /data/config.yaml /bridges/whatsapp.yaml"] volumeMounts: - name: data mountPath: /data - name: config mountPath: /load readOnly: true + - name: bridges + mountPath: /bridges securityContext: - capabilities: - drop: - - ALL + runAsUser: 0 readOnlyRootFilesystem: true allowPrivilegeEscalation: false - name: "generate-config"