Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

configJSON is not working as per readme #238

Open
wael-sadek opened this issue Aug 2, 2021 · 6 comments · May be fixed by #371 or #447
Open

configJSON is not working as per readme #238

wael-sadek opened this issue Aug 2, 2021 · 6 comments · May be fixed by #371 or #447
Labels
Bug Something isn't working Hacktoberfest null Help Wanted Community help wanted

Comments

@wael-sadek
Copy link

Trying to set the siteurl as per readme doesn't work:

configJSON:
  ServiceSettings:
    SiteURL: "https://mattermost.example.com"

The work around is to set it via extraEnvVars MM_SERVICESETTINGS_SITEURL.

@mike-code
Copy link

I second that. Still trying to figure out the issue. It's not only SiteURL that doesn't work, other properties such as SiteName won't work either. The /mattermost/config directory is also empty

@cpanato cpanato added Bug Something isn't working Help Wanted Community help wanted labels Sep 22, 2021
@cpanato
Copy link
Contributor

cpanato commented Sep 22, 2021

thanks for the catch.
the readme needs to be updated.

Are you willing to open a PR and make this change? thanks!

@mike-code
Copy link

Sure, I just would like to confirm that one should define values.yaml like so (looks quite unreadable but perhaps it's expected?) How are you using it internally after these changes? I'd also add updated entries in ci/example-values.yaml.

[...]

image:
  repository: mattermost/mattermost-team-edition
  tag: 5.39.0
  imagePullPolicy: IfNotPresent

[...]

config:
  MM_SERVICESETTINGS_SITEURL: "https://chat.acme.dev"
  MM_SERVICESETTINGS_ENABLEAPIUSERDELETION: "true"
  MM_TEAMSETTINGS_RESTRICTCREATIONTODOMAINS: "acme.dev"

@cpanato
Copy link
Contributor

cpanato commented Sep 23, 2021

@mike-code this is the pattern to have environment variables for the config, this looks correct

this is injected in the Pod when it started

@cpanato cpanato added the Hacktoberfest null label Oct 2, 2021
@Julchencita
Copy link

@cpanato Do I understand correctly that using environment variables is now the only way to set anything that was previously configured like this

configJSON:
  ServiceSettings:
    SiteURL: "https://mattermost.example.com"
  TeamSettings:
    SiteName: "Mattermost on Example.com"

And that the mattermost/config folder inside the pod is now supposed to be empty?

@derekyle
Copy link

This format does not work for booleans with the helm template.

config:
MM_SERVICESETTINGS_ENABLEAPIUSERDELETION: "true"

The issue is that the /templates/secret-config.yaml cycles through all the values under config: and tries to convert the values to base64 encode. Which means you can't use boolean values. But if you use a string like "true" then mattermost balks on boot as it is expecting a boolean rather than a string.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Hacktoberfest null Help Wanted Community help wanted
Projects
None yet
5 participants