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

fix: make monitoring optional based on license #108

Merged
merged 4 commits into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ To use IRSA make sure to NOT set the two key variables and add the appropriate r
value: "arn:aws:iam::123456789:role/mattermost-role"
```

### Monitoring

Mattermost supports emitting metrics to Prometheus, but only if yo uhave a license. This package configures the necessary service monitor to enable metrics, but only when a license has been provided via the `MM_LICENSE` var. By default (no license), it does not provision the Service Monitor as it will show unhealthy because metrics is not enabled via the license.
zachariahmiller marked this conversation as resolved.
Show resolved Hide resolved

## Flavors

| Flavor | Description | Example Creation |
Expand Down
3 changes: 2 additions & 1 deletion chart/templates/uds-package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,13 @@ spec:
MM_EMAILSETTINGS_ENABLESIGNINWITHUSERNAME: "{{ .Values.sso.enable_sign_in_with_username | toString }}"
{{- end }}
monitor:
{{- if ne .Values.mattermostLicense "" }}
- selector:
app.kubernetes.io/name: mattermost-enterprise-edition
targetPort: 8067
portName: mattermost-app-metrics
description: Metrics

{{- end }}
network:
expose:
- service: mattermost-enterprise-edition
Expand Down
2 changes: 1 addition & 1 deletion chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ postgres:
cluster-name: pg-cluster
namespace: postgres
port: 5432

mattermostLicense: ""
sso:
enabled: true
# Options: "gitlab", "openid_connect"
Expand Down
1 change: 1 addition & 0 deletions values/config-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ postgres:
password: "###ZARF_VAR_DB_PASSWORD###"

subdomain: "###ZARF_VAR_SUBDOMAIN###"
mattermostLicense: "###ZARF_VAR_MM_LICENSE###"
3 changes: 3 additions & 0 deletions zarf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ variables:
description: "Secret Key for S3 compatible storage"
- name: DB_PASSWORD
description: "Database Password for Mattermost"
- name: MM_LICENSE
description: "License for Mattermost"
default: ""

components:
- name: mattermost
Expand Down
Loading