jitsi-contrib / jitsi-helm

A helm chart to deploy Jitsi to Kubernetes
MIT License
136 stars 75 forks source link

How to mount file in Prosody plugins folder of Prosody pod ? #85

Closed Govind10g closed 1 year ago

Govind10g commented 1 year ago

Hi Team,

For Prosody Auth Matrix User Verification, we need to add below two files in prosody plugins folder of Prosody pod.

  1. mod_auth_matrix_user_verification.lua
  2. mod_matrix_power_sync.lua https://github.com/matrix-org/prosody-mod-auth-matrix-user-verification/tree/master#prosody-configuration-and-plugins

But I'm not able to add a volume section in envs-configmap.yaml file under charts/prosody/templates folder. https://github.com/jitsi-contrib/jitsi-helm/blob/main/charts/prosody/templates/envs-configmap.yaml

Can you help me - How can we mount these two files in prosody pod ?? How we can edit the configmap of prosody or where we need to make the changes ?

Govind10g commented 1 year ago

@spijet Can you please help me ?

spijet commented 1 year ago

Hello @Govind10g!

This chart includes support for custom volume mounts for Prosody, see this part in Prosody's templates/statefulset.yaml: https://github.com/jitsi-contrib/jitsi-helm/blob/main/charts/prosody/templates/statefulset.yaml#L85-L101

So you can create a ConfigMap with the files you need and then refer to it in .Values.prosody.extraVolumes and .Values.prosody.extraVolumeMounts.

I gotta admit, I completely forgot to add these options to values.yaml and to the readme! 😅

Govind10g commented 1 year ago

Hello @spijet

Under which folder I have to create a ConfigMap for prosody ??

Do I need to create a ConfigMap file under charts/prosody/templates ?? https://github.com/jitsi-contrib/jitsi-helm/tree/main/charts/prosody/templates

spijet commented 1 year ago

No need to modify the Chart itself — you can create a new separate ConfigMap, either by writing a YAML file and feeding it to kubectl apply, or by using kubectl create configmap directly. See Kubernetes docs for details.

After you've created the ConfigMap, you can reference it in Charts' values like so:

# my-jitsi-values.yaml
prosody:
  extraVolumes:
    - name: custom-files
      configMap:
        name: my-custom-configmap # <- your CM name here
  extraVolumeMounts:
    - name: custom-files
      mountPath: /some/path/inside/prosody/pod
      readOnly: true
spijet commented 1 year ago

Closing this for now. Please let me know if you need additional help.