如何配置 Mattermost 插件
How to configure Mattermost Plugins
我已经从 Helm Chart 部署了 Mattermost Team Edition
到我的 k8s 集群上,它运行良好。
问题是 config.json
文件是作为秘密挂载的,
所以配置不能从 UI 完成,而是在 config.json 中完成,它是 helm chart 中 values.yaml 的一部分。
如何配置插件?对于初学者,我想启用缩放插件
configJSON: {
"PluginSettings": {
"Enable": true,
"EnableUploads": true,
"Directory": "./plugins",
"ClientDirectory": "./client/plugins",
"Plugins": {},
"PluginStates": {
"zoom": {
"Enable": true
},
"com.mattermost.nps": {
"Enable": false
},
"mattermost-webrtc-video": {
"Enable": true
},
"github": {
"Enable": true
},
"jira": {
"Enable": true
},
}
}
这是启用插件的正确方法吗?
我如何配置插件,
特别是 zoom 需要 API 凭据..
我看到两个选项:
安全的方法
运行 本地另一个 Mattermost 服务器实例(例如使用 Mattermost preview Docker,非常容易设置),配置您的插件并使用其配置文件部分用于您的集群实例。
手动、容易出错的方式
开始时自己编辑 config.json。对于每个插件,有两个部分需要编辑,Plugins
和 PluginStates
:
"PluginSettings": {
// [...]
"Plugins": {
"your.plugin.id": {
"pluginProperty1": "...",
"pluginProperty2": "...",
"pluginProperty3": "...",
// [...]
},
},
"PluginStates": {
// [...]
"your.plugin.id": {
"Enable": true
},
}
}
正如你所看到的,这需要知道每个插件定义了哪些属性,对于这些只有查阅插件文档的解决方案,甚至是它的代码(查找名为 plugin.json
的文件插件 GitHub 仓库的根目录,在 settings
部分)。
如果实在没办法使用GUI安装配置插件,我推荐第一种方法
关于其他读者的信息,在大多数 Mattermost 设置中,您应该能够为此使用UI ,即使在 High Availability Mode 如果您的版本足够新。
将以下内容添加到您的 values.yaml:
config:
MM_PLUGINSETTINGS_CLIENTDIRECTORY: "./client/plugins"
MM_PLUGINSETTINGS_ENABLEUPLOADS: "true"
我已经从 Helm Chart 部署了 Mattermost Team Edition
到我的 k8s 集群上,它运行良好。
问题是 config.json
文件是作为秘密挂载的,
所以配置不能从 UI 完成,而是在 config.json 中完成,它是 helm chart 中 values.yaml 的一部分。
如何配置插件?对于初学者,我想启用缩放插件
configJSON: {
"PluginSettings": {
"Enable": true,
"EnableUploads": true,
"Directory": "./plugins",
"ClientDirectory": "./client/plugins",
"Plugins": {},
"PluginStates": {
"zoom": {
"Enable": true
},
"com.mattermost.nps": {
"Enable": false
},
"mattermost-webrtc-video": {
"Enable": true
},
"github": {
"Enable": true
},
"jira": {
"Enable": true
},
}
}
这是启用插件的正确方法吗? 我如何配置插件, 特别是 zoom 需要 API 凭据..
我看到两个选项:
安全的方法
运行 本地另一个 Mattermost 服务器实例(例如使用 Mattermost preview Docker,非常容易设置),配置您的插件并使用其配置文件部分用于您的集群实例。
手动、容易出错的方式
开始时自己编辑 config.json。对于每个插件,有两个部分需要编辑,Plugins
和 PluginStates
:
"PluginSettings": {
// [...]
"Plugins": {
"your.plugin.id": {
"pluginProperty1": "...",
"pluginProperty2": "...",
"pluginProperty3": "...",
// [...]
},
},
"PluginStates": {
// [...]
"your.plugin.id": {
"Enable": true
},
}
}
正如你所看到的,这需要知道每个插件定义了哪些属性,对于这些只有查阅插件文档的解决方案,甚至是它的代码(查找名为 plugin.json
的文件插件 GitHub 仓库的根目录,在 settings
部分)。
如果实在没办法使用GUI安装配置插件,我推荐第一种方法
关于其他读者的信息,在大多数 Mattermost 设置中,您应该能够为此使用UI ,即使在 High Availability Mode 如果您的版本足够新。
将以下内容添加到您的 values.yaml:
config:
MM_PLUGINSETTINGS_CLIENTDIRECTORY: "./client/plugins"
MM_PLUGINSETTINGS_ENABLEUPLOADS: "true"