Skip to content

Latest commit

 

History

History
110 lines (78 loc) · 5.76 KB

configuration.md

File metadata and controls

110 lines (78 loc) · 5.76 KB

Configuration

This Mattermost package is primarily configured through the upstream Mattermost chart.

Networking

Network policies are controlled via the uds-mattermost-config chart in accordance with the common patterns for networking within UDS Software Factory. Mattermost interacts with Postgresql and S3 externally and supports the following keys:

  • postgres: sets network policies for accessing a Postgres database from the Mattermost pod
  • storage: sets network policies for accessing S3-compatible object storage from the Mattermost pod
  • additionalNetworkAllow: sets custom network policies for the Mattermost namespace - this allows for custom integrations with other services

Database

SonarQube uses Postgres as its backing database service and supports the common database providers within UDS Software Factory.

Manual Database Connection

If you are using the UDS Postgres Operator or another external database that uses usernames/passwords you can use the following Helm overrides to configure it:

uds-mattermost-config chart:

Important

The postgres.password and postgres.username settings are not applicable when using the UDS Postgres Operator package or when supplying a secret manually!

  • postgres.password - provides a password to generate a secret to pass to Mattermost
  • postgres.username - provides the username to use when connecting to the database (i.e. mattermost)

Important

The postgres.existingSecret settings are not applicable when providing a password/username to the uds-mattermost-config chart manually.

  • postgres.existingSecret.name - provides the secret that contains the database password (defaults to mattermost.mattermost.pg-cluster.credentials.postgresql.acid.zalan.do)
  • postgres.existingSecret.passwordKey - provides the secret key that contains the database password (defaults to password)
  • postgres.existingSecret.passwordKey - provides the secret key that contains the database username (defaults to username)
  • postgres.host - provides the host/domain name to use for the database (i.e. pg-cluster.postgres.svc.cluster.local)
  • postgres.connectionOptions - provides connection options to use when connecting to the database (i.e. ?connect_timeout=10)

IAM Roles for Service Accounts

The Software Factory team has not yet tested IRSA with AWS RDS - there is an open issue linked below with further linked issues to test this that could act as a starting point to implement:

defenseunicorns/uds-software-factory#45

Object Storage

Note

This section is subject to change / improvement once uds-package-minio-operator is fully ready for production use cases.

Object storage configuration is setup in the uds-mattermost-config chart and should be done via bundle overrides (variables or values) like the below:

    overrides:
      mattermost:
        uds-mattermost-config:
          values:
            - path: "objectStorage.endpoint"
              value: "minio.dev-minio.svc.cluster.local:9000"

The full list of override config can be found in the values under objectStorage here. In addition zarf vars are exposed for ACCESS_KEY and SECRET_KEY for convenience if using import/exports in your bundle.

To use IRSA make sure to NOT set the two key variables and add the appropriate role ARN annotation to the service account via an override to serviceAccount.annotations. As an example:

    overrides:
      mattermost:
        mattermost-enterprise-edition:
          values:
            - path: "serviceAccount.annotations.irsa/role-arn"
              value: "arn:aws:iam::123456789:role/mattermost-role"

Plugins

For installing plugins into your environment, we recommend the included mattermost-plugins Zarf package. It includes the following plugins by default:

In order to load these plugins into the Mattermost server, the uds-package-mattermost/mattermost-extra-plugins image provided by this package should be injected as an initContainer by adding the following overrides to your UDS bundle:

  - name: mattermost
    overrides:
      mattermost:
        mattermost-enterprise-edition:
          values:
            - path: "mattermostApp.extraInitContainers"
              value:
                # Extra Container to install plugins
                - name: mattermost-extra-plugins
                  image: uds-package-mattermost/mattermost-extra-plugins:latest
                  imagePullPolicy: Always
                  volumeMounts:
                    # Must match plugins volumes from chart

                    # In mattermost-team-edition chart, this is `/mattermost/$MM_PLUGINSETTINGS_CLIENTDIRECTORY`
                    # see: https://github.com/mattermost/mattermost-helm/blob/master/charts/mattermost-team-edition/templates/deployment.yaml#L103-L104

                    # In mattermost-enterprise-edition chart, it is hardcoded to `/mattermost/plugins/`
                    # see: https://github.com/mattermost/mattermost-helm/blob/master/charts/mattermost-enterprise-edition/templates/deployment-mattermost-app.yaml#L174-L177
                    - name: mattermost-plugins
                      mountPath: /mattermost/plugins/