mattermost-team-edition
Mattermost Team Edition is an open-source, self-hosted messaging platform for teams. It offers a free, community-driven solution for secure, private collaboration. Features include group and direct messaging, file sharing, and powerful search, giving your team a modern communication hub.
About this chart
Mattermost Team Edition OpenShift
Mattermost Team Edition is an open-source, self-hosted messaging platform for teams. It offers a free, community-driven solution for secure, private collaboration. Features include group and direct messaging, file sharing, and powerful search, giving your team a modern communication hub.
Mattermost is a hybrid cloud enterprise messaging workspace that brings your messaging and tools together to get more done, faster.
TL;DR;
$ oc new-project mattermost && oc adm policy add-scc-to-user anyuid system:serviceaccount:mattermost:default
$ helm install mattermost-team-edition/mattermost-team-edition \
--set mysql.mysqlUser=sampleUser \
--set mysql.mysqlPassword=samplePassword \
Introduction
This chart creates a Mattermost Team Edition deployment on a Kubernetes cluster using the Helm package manager.
Prerequisites
Based on your prerequisites list, here's a revised version that is more accurate, up-to-date, and clear for a modern Kubernetes/OpenShift environment:
- Kubernetes 1.20+: This is a clear and direct requirement.
- Helm v3: This is the current standard. Helm v2 and its Tiller component are now deprecated and should not be used.
- Cluster access with
cluster-adminrole: A user withcluster-adminprivileges is required to install applications that need to create cluster-wide resources. This is a best practice for a first-time setup or for installing complex applications. For standard installations, namespace-level permissions are often sufficient, butcluster-adminis a safe bet to avoid permission-related errors. - OpenShift Cluster v4.14+: This is a direct statement of the required platform.
Installing the Chart
To install the chart with the release name my-release:
$ oc new-project mattermost && oc adm policy add-scc-to-user anyuid system:serviceaccount:mattermost:default
Helm v3 command
$ helm install my-release mattermost-team-edition/mattermost-team-edition
The command deploys Mattermost on the Kubernetes cluster in the default configuration. The configuration section lists the parameters that can be configured during installation.
Uninstalling the Chart
To uninstall/delete the my-release deployment:
$ helm delete my-release
The command removes all the Kubernetes components associated with the chart and deletes the release.
Configuration
The following table lists the configurable parameters of the Mattermost Team Edition chart and their default values.
| Parameter | Description | Default |
|---|---|---|
configJSON | The config.json configuration to be used by the mattermost server. The values you provide will by using Helm's merging behavior override individual default values only. See the example configuration and the Mattermost documentation for details. | See configJSON in values.yaml |
containerSecurityContext | Security context for the container | null |
image.repository | Container image repository | mattermost/mattermost-team-edition |
image.tag | Container image tag | 5.39.0 |
image.imagePullPolicy | Container image pull policy | IfNotPresent |
initContainerImage.repository | Init container image repository | appropriate/curl |
initContainerImage.tag | Init container image tag | latest |
initContainerImage.imagePullPolicy | Container image pull policy | IfNotPresent |
revisionHistoryLimit | How many old ReplicaSets for Mattermost Deployment you want to retain | 1 |
ingress.enabled | If true, an ingress is created | false |
ingress.hosts | A list of ingress hosts | [mattermost.example.com] |
ingress.tls | A list of ingress tls items | [] |
mysql.enabled | Enables deployment of a mysql server | true |
mysql.mysqlRootPassword | Root Password for Mysql (Optional) | "" |
mysql.mysqlUser | Username for Mysql (Required) | "" |
mysql.mysqlPassword | User Password for Mysql (Required) | "" |
mysql.mysqlDatabase | Database name (Required) | "mattermost" |
externalDB.enabled | Enables use of an preconfigured external database server | false |
externalDB.externalDriverType | "postgres" or "mysql" | "" |
externalDB.externalConnectionString | See the section about external databases. | "" |
extraPodAnnotations | Extra pod annotations to be used in the deployments | [] |
extraEnvVars | Extra environments variables to be used in the deployments | [] |
extraInitContainers | Additional init containers | [] |
securityContext | Security context for the pod | null |
service.annotations | Service annotations | {} |
service.loadBalancerIP | A user-specified IP address for service type LoadBalancer to use as External IP (if supported) | nil |
service.loadBalancerSourceRanges | list of IP CIDRs allowed access to load balancer (if supported) | [] |
serviceAccount.create | Enables creation and use of a service account for the mattermost pod | false |
serviceAccount.name | Name of the service account to create and use | "" |
serviceAccount.annotations | The service account annotations | {} |
Specify each parameter using the --set key=value[,key=value] argument to helm install. For example,
$ helm install --name my-release \
--set image.tag=5.35.3 \
--set mysql.mysqlUser=sampleUser \
--set mysql.mysqlPassword=samplePassword \
mattermost-team-edition/mattermost-team-edition
Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example,
$ helm install --name my-release -f values.yaml mattermost/mattermost-team-edition
Example configuration
A basic example of a .yaml file with values that could be passed to the helm
command with the -f or --values flag to get started.
ingress:
enabled: true
hosts:
- mattermost.example.com
configJSON:
ServiceSettings:
SiteURL: "https://mattermost.example.com"
TeamSettings:
SiteName: "Mattermost on Example.com"
External Databases
There is an option to use external database services (PostgreSQL or MySQL) for your Mattermost installation.
If you use an external Database you will need to disable the MySQL chart in the values.yaml
mysql:
enabled: false
PostgreSQL
To use an external PostgreSQL, You need to set Mattermost externalDB config
IMPORTANT: Make sure the DB is already created before deploying Mattermost services
externalDB:
enabled: true
externalDriverType: "postgres"
externalConnectionString: "<USERNAME>:<PASSWORD>@<HOST>:5432/<DATABASE_NAME>?sslmode=disable&connect_timeout=10"
MySQL
To use an external MySQL, You need to set Mattermost externalDB config
IMPORTANT: Make sure the DB is already created before deploying Mattermost services
externalDB:
enabled: true
externalDriverType: "mysql"
externalConnectionString: "<USERNAME>:<PASSWORD>@tcp(<HOST>:3306)/<DATABASE_NAME>?charset=utf8mb4,utf8&readTimeout=30s&writeTimeout=30s"
Expose extra ports
To use plugins that require extra ports to be exposed, you can use the following config
extraPorts:
- name: plugin-name
port: 8585
protocol: TCP
Local development
For local testing use minikube
Create local cluster using with specified Kubernetes version (e.g. 1.15.6)
$ minikube start --kubernetes-version v1.15.6
Initialize helm
$ helm init
Above command is not required for Helm v3
Get dependencies
$ helm dependency update
Perform local installation
$ helm install . \
--set image.tag=5.35.3 \
--set mysql.mysqlUser=sampleUser \
--set mysql.mysqlPassword=samplePassword
Helm v3 command
$ helm install . \
--generate-name \
--set image.tag=5.35.3 \
--set mysql.mysqlUser=sampleUser \
--set mysql.mysqlPassword=samplePassword
Limitations
For the Team Edition you can have just one replica running.
Deploy mattermost-team-edition with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has mattermost-team-edition on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartmattermost-team-edition is pinned at v6.6.83 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply