mattermost / mattermost-helm

Mattermost Helm charts for Kubernetes
Apache License 2.0
162 stars 145 forks source link

No way to load non-environment enabled configuration settings #439

Open fluzzykitten opened 5 months ago

fluzzykitten commented 5 months ago

We have a use case where we need to load and redeploy the mattermost-team-edition helm chart in an enclave many times, and need the ability to load configuration settings (config.json) that are not environment enabled settings.

Loading settings that are ENV enabled is easy with the values file here

But when using the database, you need to use the mmctl config migrate command

To do that, you need to enable the local mode socket. But to enable the local mode socket, it cannot be done via an ENV variable, and must be done via config.json "EnableLocalMode": true

TL;DR - A config.json file must be loaded via mmctl config migrate --local. But to use mmctl config migrate --local you must first enable local access via the config.json file. Thus, fail. Sadness. 😭

Our temporary solution is to use an init container with an ancient docker image that still uses mattermost config before it was removed, but having to use ancient docker images with deprecated features that have been removed is not ideal.

In the end, we would like a way to migrate a config.json with variables that have no ENV var options, so we don't need a human pause the installation process, log into the system console, and set a bunch of values that we'd like to be default every time we redeploy a new version of Mattermost Teams into our enclaves.

Also, this line should should be updated to reference this link: https://docs.mattermost.com/configure/configuation-in-a-database.html

KkThnxBai. 😊