Plugin configmap and kubernetes


i deployed matermost on kubernetes with operator
i d like to configure the welcpome bot
so i create a config map with the config.json

and in my installation i put a mountpath for this file :

- name: welcome
mountPath: /mattermost/plugins/com.mattermost.welcomebot/plugin.json
subPath: plugin.json
- name: welcome
name: welcome
- key: plugin.json
path: plugin.json

it works , the file is mounted but when i deploy it i go this error

{“timestamp”:“2022-05-23 12:00:50.372 Z”,“level”:“error”,“msg”:“Unable to move plugin from temporary directory to final destination. Another plugin may be using the same directory name.”,“caller”:“web/context.go:105”,“path”:"/api/v4/plugins/marketplace",“request_id”:“53rw596ctpf3pqrqpqhfqu1gha”,“ip_addr”:",“user_id”:“jei45ycqufr55gd7usqknyyoio”,“method”:“POST”,“err_where”:“installExtractedPlugin”,“http_code”:500,“err_details”:“destination already exists”}

Hi @sarce666, thanks for bringing this to our attention! I checked with some of our engineers (here’s the conversation) and this appears to be a known problem, and isn’t something we have plans to support.

However, you should be able to work around this issue with mmctl which has a config command to get and set configurations for Mattermost and any plugins you have installed.

For example, you can use the command mmctl config get to get welcomebot’s current configuration and change “get” to “set” to modify it. Here’s some more info about the config command.

Let me know if this solves your issue.


but how to sent this command in the first installation yaml file:
kind: Mattermost
command is not recognize there

If I understand your question, you’re asking how to do this when you first install Mattermost? If so, you should be able to do it by installing mmctl to any host that is capable of communicating with your Kubernetes cluster. You can then trigger the mmctl command manually or automate it with a bash script or something similar.


this is a bit what i though , but i would prefer an automate possibilities in the deployment
that means if i redeploy or one of my pods restart i lose everyhting and i have to do it manually
so i loose all the good point of kubernetes
or is there a way to have the the /mattermost/plugins in presistence mode so i keep it when restarting my pods

i dont see any options in the spec in the orchestrator either ?


@sarce666 I did some investigation and came across this possible answer. Does this help with your problem?

hello ben

ut , when I start my deployment , my mattermost pods is created with a random name :

db-523050-mysql-0 4/4 Running 2 (6d19h ago) 6d19h
metis-64797d5b58-qbqs2 1/1 Running 0 6d19h

in my exemple it is metis-64797d5b58-qbqs2

so how can I put this info in the initial deployement as it does not yet know it ?

as far as I understand you want me to send the mmtcl command in the mattermost pod ?

kind: Mattermost
name: metis # Chose the desired name
size: 100users # Adjust to your requirements
enabled: true
host: # Adjust to your domain
annotations: nginx
version: 6.6.1
licenseSecret: “mattermost-license4”

apiVersion: v1
kind: Pod
name: mattermost
app: mattermost
purpose: mmctl
- name: mattermost
image: mattermost/mattermost-enterprise-edition:6.6.1
command: [“mmctl config get”]

another issue

if i launch the command on a starting pod i have this error after i auth
I got this

~ $ mmctl config get

WARNING: server version doesn’t match mmctl version

Error: invalid key