-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
131 additions
and
120 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,37 @@ | ||
# uds-package-mattermost | ||
# UDS Mattermost Package | ||
|
||
UDS Mattermost Zarf Package | ||
This repo contains the UDS Mattermost Package along with an example bundle and UDS tasks for development. | ||
|
||
## Dependencies | ||
|
||
Mattermost requires two dependencies, postgres and s3 compatible object storage. Wiring Mattermost to your dependencies is done via secrets created in the `mattermost` namespace. | ||
Mattermost requires two dependencies, postgres and s3 compatible object storage. Wiring Mattermost to your dependencies is done primarily via helm values, which will require the use of a bundle created with uds-cli. | ||
|
||
### Postgres | ||
|
||
You should create a secret named `mattermost-postgres` with a single key containing the DB connection string like the following: | ||
|
||
Postgres configuration is setup in the `uds-mattermost-config` chart and should be done via bundle overrides (variables or values) like the below: | ||
```yaml | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: mattermost-postgres | ||
namespace: mattermost | ||
type: kubernetes.io/opaque | ||
stringData: | ||
DB_CONNECTION_STRING: "postgres://username:password@hostname:port/dbname?postgresoptions" | ||
overrides: | ||
mattermost: | ||
uds-mattermost-config: | ||
values: | ||
- path: "postgres.host" | ||
value: "postgresql.dev-postgres.svc.cluster.local" | ||
``` | ||
### S3 Compatible Object Storage | ||
The full list of override config can be found in the values under `postgres` [here](./chart/values.yaml). In addition a zarf var is exposed for `DB_PASSWORD` for convenience if using import/exports in your bundle. | ||
|
||
You should create a secret named `mattermost-object-store` with a number of keys matching the below: | ||
### S3 Compatible Object Storage | ||
|
||
Object storage configuration is setup in the `uds-mattermost-config` chart and should be done via bundle overrides (variables or values) like the below: | ||
```yaml | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: mattermost-object-store | ||
namespace: mattermost | ||
type: kubernetes.io/opaque | ||
stringData: | ||
secure_connection: <true/false> # Typically false for insecure connections like MinIO | ||
access_key: <your-access-key> | ||
secret_key: <your-secret-key> | ||
region: <your-region> | ||
bucket: <your-bucket> | ||
endpoint: <your-endpoint> | ||
overrides: | ||
mattermost: | ||
uds-mattermost-config: | ||
values: | ||
- path: "objectStorage.endpoint" | ||
value: "minio.dev-minio.svc.cluster.local:9000" | ||
``` | ||
|
||
To use IRSA make sure to set the two keys to empty strings and add the appropriate annotations to the service account via `serviceAccount.annotations` (override in a UDS Bundle). | ||
The full list of override config can be found in the values under `objectStorage` [here](./chart/values.yaml). In addition zarf vars are exposed for `ACCESS_KEY` and `SECRET_KEY` for convenience if using import/exports in your bundle. | ||
|
||
TODO: Figure out if this setup works and a better way to handle the keys... | ||
To use IRSA make sure to not set the two keys and add the appropriate annotation to the service account via an override to `serviceAccount.annotations`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: mattermost-object-store | ||
namespace: {{ .Release.Namespace }} | ||
type: Opaque | ||
stringData: | ||
MM_FILESETTINGS_AMAZONS3SSL: "{{ .Values.objectStorage.secure | toString }}" | ||
MM_FILESETTINGS_AMAZONS3ACCESSKEYID: "{{ .Values.objectStorage.accessKey }}" | ||
MM_FILESETTINGS_AMAZONS3SECRETACCESSKEY: "{{ .Values.objectStorage.secretKey }}" | ||
MM_FILESETTINGS_AMAZONS3BUCKET: "{{ .Values.objectStorage.bucket }}" | ||
MM_FILESETTINGS_AMAZONS3ENDPOINT: "{{ .Values.objectStorage.endpoint }}" | ||
MM_FILESETTINGS_AMAZONS3REGION: "{{ .Values.objectStorage.region }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: mattermost-postgres | ||
namespace: {{ .Release.Namespace }} | ||
type: Opaque | ||
stringData: | ||
db_connection_string: "postgres://{{ .Values.postgres.username }}:{{ .Values.postgres.password }}@{{ .Values.postgres.host }}:{{ .Values.postgres.port }}/{{ .Values.postgres.dbName }}{{ .Values.postgres.connectionOptions }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,28 @@ | ||
objectStorage: | ||
secure: true | ||
accessKey: "" | ||
secretKey: "" | ||
bucket: "mattermost" | ||
endpoint: "s3.amazonaws.com" | ||
region: "us-west-1" | ||
|
||
postgres: | ||
username: "mattermost" | ||
password: "" | ||
host: "" | ||
port: 5432 | ||
dbName: "mattermost" | ||
# Example: "?connect_timeout=10&sslmode=disable" | ||
connectionOptions: "" | ||
|
||
sso: | ||
enabled: false | ||
client_id: "" | ||
client_secret: "" | ||
auth_endpoint: "" | ||
token_endpoint: "" | ||
user_api_endpoint: "" | ||
enable_sign_up_with_email: "" | ||
enable_sign_in_with_email: "" | ||
enable_sign_in_with_username: "" | ||
# These should typically be disabled if SSO is enabled | ||
enable_sign_up_with_email: true | ||
enable_sign_in_with_email: true | ||
enable_sign_in_with_username: true |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,6 +34,7 @@ tasks: | |
|
||
- name: test-package | ||
actions: | ||
- task: test:health-check | ||
- task: test:ingress | ||
|
||
- name: cleanup | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,6 @@ | ||
sso: | ||
enabled: ###ZARF_VAR_MATTERMOST_SSO_ENABLED### | ||
client_id: ###ZARF_VAR_MATTERMOST_SSO_CLIENT_ID### | ||
client_secret: ###ZARF_VAR_MATTERMOST_SSO_CLIENT_SECRET### | ||
auth_endpoint: ###ZARF_VAR_MATTERMOST_SSO_AUTH_ENDPOINT### | ||
token_endpoint: ###ZARF_VAR_MATTERMOST_SSO_TOKEN_ENDPOINT### | ||
user_api_endpoint: ###ZARF_VAR_MATTERMOST_SSO_USER_API_ENDPOINT### | ||
enable_sign_up_with_email: ###ZARF_VAR_MATTERMOST_SSO_EMAIL_SIGNUP_ENABLED### | ||
enable_sign_in_with_email: ###ZARF_VAR_MATTERMOST_SSO_EMAIL_SIGNIN_ENABLED### | ||
enable_sign_in_with_username: ###ZARF_VAR_MATTERMOST_SSO_USERNAME_SIGNIN_ENABLED### | ||
objectStorage: | ||
accessKey: "###ZARF_VAR_ACCESS_KEY###" | ||
secretKey: "###ZARF_VAR_SECRET_KEY###" | ||
|
||
postgres: | ||
password: "###ZARF_VAR_DB_PASSWORD###" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters