Argo CD deployment notifications in Mattermost: what the integration does
A platform team that delivers applications through GitOps usually knows its sync state only by opening the Argo CD UI or watching a dashboard. When a deployment degrades or an application drifts out of sync at an unexpected hour, nobody hears about it until someone checks. Argo CD Notifications closes that gap by posting sync and health events to Mattermost channels, using a Mattermost service that the Argo CD project documents as the supported method for this integration. The integration has three configuration points: a service.mattermost entry in the argocd-notifications-cm ConfigMap that sets apiURL, a bot token held in the argocd-notifications-secret Secret, and a notifications.argoproj.io/subscribe.<trigger>.mattermost annotation on each Application that holds the target channel ID.
Argo CD is licensed under the Apache License 2.0, and the project itself offers no paid edition, so the notification feature carries no license fee from the Argo project. The costs sit elsewhere: the people who build and maintain the templates and triggers, the Mattermost server and bot account your organization already runs, and the Kubernetes cluster that hosts Argo CD. Confirm with your Mattermost administrator which team owns bot creation and channel membership, because the bot must be able to post in each channel that receives notifications. Also confirm whether your Mattermost edition and hosting model are the ones you intend to use before you decide where alerts should land.
Before you roll this out, decide which triggers and channels matter to which teams, and who may subscribe an Application to a channel. The annotations live on Application objects, so anyone who can edit an Application can change where its notifications go. Review the Argo CD RBAC model and the Argo CD Notifications documentation for the Mattermost service, and check the exact field names against the Argo CD version you run, since configuration keys can change between releases. This section sets the scope; the sections that follow cover the build, the access controls and the verification steps.
What you need before configuring Argo CD notifications in Mattermost
Four things have to be in place before the notification service can post anything: a supported Argo CD version, a cluster sized for the chosen install, a Mattermost API that the controller can reach and trust, and a bot with a token and channel IDs. The cards below cover each one and the checks to run before you edit any ConfigMap or Secret.
Confirm the Argo CD version line
Pick a patch release from a supported minor line before you write any notification config. The project patches only its three most recent minor versions, so an older line will not receive fixes for the Mattermost service or the controller. Check the current patch releases on the GitHub releases page and record the exact version your cluster runs, since the keys you edit depend on it. Upgrade first if you are on an unsupported minor line.
- Supported minor lines
- 3
Size the cluster for HA if you use it
If you run the high availability manifests, the cluster needs at least three nodes because of pod anti-affinity rules. A single-node or two-node cluster will not schedule the HA layout, so the notifications controller would be deployed in a different shape than your documentation describes. Confirm the node count, and confirm the cluster is IPv4 or dual-stack, since IPv6-only clusters are not supported by Argo CD's HA documentation.
Reach the Mattermost API over TLS
The apiURL in argocd-notifications-cm must point at a Mattermost server URL that the notifications controller can resolve and reach from inside the cluster. Confirm that the certificate chain is trusted by the controller pod, especially if Mattermost uses an internal certificate authority. Test the URL from a pod in the same namespace before you configure anything, so a trust failure does not look like a Argo CD bug later.
Create a bot account and token
Create a dedicated Mattermost bot account for Argo CD rather than reusing a person's login. Generate its access token, which will be stored as the bot token under argocd-notifications-secret. Confirm in your Mattermost version and plan which roles, bot creation settings and channel permissions apply, because bot and token administration can differ between releases and between self-hosted configurations. Invite the bot to every channel it must post into.
Collect channel IDs for each subscription
Each application subscribes with an annotation whose value is the Mattermost channel ID, not the channel display name. Collect the IDs for every target channel from the Mattermost interface or API and record which application and trigger each one serves. Keep this list in version control with the application manifests, so reviewers can see where each notification will land before the annotation merges.
Allow outbound traffic from the controller
Create a network path from the argocd-notifications controller pods to the Mattermost API on the port your server listens on. If your cluster uses NetworkPolicy, egress from the controller namespace must allow that destination, and any egress proxy must be configured for it. Confirm the path with your network team and test it, since a blocked request usually appears only as a failed notification in the controller logs.
How the Argo CD notification parts connect to Mattermost
The flow starts in the Argo CD application controller, which reports sync and health state for each application. The notifications controller reads the Mattermost service and templates from argocd-notifications-cm, takes the bot token from argocd-notifications-secret, and matches each application's subscription annotation to a trigger and channel ID. It then calls the Mattermost API across the boundary between the cluster and the Mattermost server. Check that the token is the only credential in this path and that the channel ID in each annotation points to the intended channel.
Credential and trust boundary for Argo CD notifications to Mattermost.
How to configure the Mattermost service in Argo CD Notifications
This sequence connects Argo CD Notifications to a Mattermost channel so that sync and health events for a test application arrive as messages. Each step ends with a check that confirms the connection before the next change is made.
Create the Mattermost bot and collect channel IDs
A Mattermost administrator creates a bot account in the self-hosted server, grants it permission to post in the target channel, and generates a personal access token for it. Record the bot token securely and copy the channel ID of each channel that will receive notifications, from the channel details view in Mattermost. Confirm the bot is a member of the channel, then send a test message through the Mattermost API with the token to verify that the token can post. Do not paste the token into tickets or chat, because anyone holding it can post as the bot.
Store the bot token in the notifications secret
On the cluster where Argo CD runs, add the bot token as a key in the argocd-notifications-secret Secret in the Argo CD namespace, using a key name that your service configuration will reference. Apply the change through your normal GitOps or manual process, and restrict who can read this Secret with Kubernetes RBAC, because Secrets are stored unencrypted in etcd unless encryption at rest is configured. Check the result by running a read of the Secret's key names (not its values) and confirming the key is present.
Add the Mattermost service to the notifications config
Edit the argocd-notifications-cm ConfigMap and add a service.mattermost entry that sets apiURL to the base URL of your self-hosted Mattermost server and references the bot token from the secret. Keep the apiURL on your own network, and confirm with your network team that the Argo CD notifications controller can reach it over TLS. Restart or wait for the notifications controller to reload the configuration, then check its logs for errors about the Mattermost service. A clean log with no configuration errors is the signal to continue.
Define a template and trigger
Add a template to argocd-notifications-cm that describes the message, such as the application name, sync status and revision, and add a trigger that fires on the events you want, for example when a sync succeeds or fails. Use the template and trigger names from the Argo CD notifications documentation as your starting point, and keep the first version short so the message is easy to verify. Check the configuration by reviewing the rendered template against a sample application in a non-production cluster, or by confirming the controller accepts the trigger without validation errors in its logs.
Subscribe one test application
Choose a single non-critical Argo CD Application and add a notifications.argoproj.io/subscribe annotation for the trigger, with the Mattermost service name and the channel ID from step one as its value. Limit the first test to this one application so that a misconfigured template or wrong channel does not flood a team channel. Confirm the annotation is present on the Application object, since subscriptions are set per application rather than globally.
Trigger a sync and verify the post
Start a sync of the test application, or change its target revision so that a sync runs, and watch the event. Confirm two things: the notifications controller logs show a successful post to Mattermost, and the message appears in the test channel with the expected application name and status. If the log shows an authentication or channel error, recheck the bot token, its channel membership and the channel ID before changing anything else. Only after the test message appears correctly should you widen subscriptions to other applications and channels.
Which Argo CD object holds each Mattermost setting
This table maps each Mattermost setting to the Argo CD object and key that holds it, and notes whether the value is a secret, a channel identifier or plain configuration. Read it to decide who edits each object and which values must stay out of Git. The main takeaway is that the bot token belongs in the Secret, while the channel ID and trigger names are configuration that the application owner can review.
| Setting | Object and key | Value type | Who should own it |
|---|---|---|---|
| Mattermost server API URL | argocd-notifications-cm, service.mattermost (apiURL) | Plain configuration | Platform team that runs Argo CD |
| Bot access token | argocd-notifications-secret, referenced by the Mattermost service entry | Secret | Platform team, with rotation handled outside Git |
| Channel ID for a notification | notifications.argoproj.io/subscribe.<trigger>.mattermost annotation on the Application | Channel identifier | Application owner who requested the subscription |
| Trigger names (for example, on-sync-succeeded) | argocd-notifications-cm, triggers entries | Plain configuration | Platform team, reviewed with application owners |
| Message templates | argocd-notifications-cm, templates entries | Plain configuration | Platform team, with input from the channel's users |
| Subscription scope | Application or AppProject metadata that carries the subscription annotation | Plain configuration | Team that owns the Argo CD project |
| Argo CD admin access to notification objects | Kubernetes RBAC on the argocd namespace | Access control | Cluster administrators; confirm who can read the Secret |
How to test notifications before they reach production channels
Start with a private test channel, one non-production application and a single trigger that fires on a sync you control. Create the Mattermost channel for testing, note its channel ID, and add the bot to it. Then add the notifications.argoproj.io/subscribe.<trigger>.mattermost annotation to the test application only, pointing at that channel ID. Trigger names are defined in the argocd-notifications-cm ConfigMap, and the names and template fields differ between Argo CD releases, so confirm both against the version you run using the Argo CD Mattermost notification service documentation before you write any subscription. Run a planned sync that succeeds, then a sync you can make fail, such as a manifest that references a missing image tag in a throwaway namespace. Confirm that each produces the message you expect in the test channel. Only after both messages arrive with the right application name, status and link should you widen subscriptions, one application and one channel at a time.
Confirm that subscriptions are per application by checking the annotation on a second, unsubscribed application. Syncing that application should produce nothing in the test channel. Check the reverse as well: the subscribed application should not post into channels named by other applications' annotations. Review the rendered annotations with kubectl get application <name> -n argocd -o yaml so the channel ID is visible and correct. For the healthy and failed cases, compare the message body with the sync status and health status shown in the Argo CD UI. A message that reports success for a failed sync is a defect in the template or trigger condition, and it must be fixed before any production channel receives notifications.
Then check that the bot token never leaks. Search the Argo CD controller and notifications controller logs for the token value, and confirm the token exists only in argocd-notifications-secret, not in argocd-notifications-cm, Application manifests or any repository that Argo CD syncs. Run a repository search for the token prefix before the change is merged, and make sure the secret is managed through your secret tooling rather than committed as plain text. Confirm who can read that Secret with RBAC, because Kubernetes stores Secrets unencrypted in etcd by default unless encryption at rest is configured. Record these checks in the change ticket so the production rollout can be repeated against the same evidence.
How to keep the Mattermost token and channel access under control
The bot token and the notification configuration give anyone who can read or change them a way to post into your channels and see how your deployments behave. The cards below cover where the token lives, who can read and edit it, how it is retired, and how the Argo CD login path is locked down.
Keep the token in the notifications secret
Store the Mattermost bot token only under the mattermost-token key in argocd-notifications-secret, and reference it from the service definition in argocd-notifications-cm instead of pasting it into the ConfigMap. Keep the token out of Git manifests, Helm values and pipeline logs. Kubernetes Secrets are stored unencrypted in etcd by default, so confirm that encryption at rest is enabled for the cluster before the token goes in.
Restrict who can read secrets
Grant get, list and watch on Secrets in the Argo CD namespace only to the service accounts and administrators who need them. Listing and watching Secrets returns their values, so a role that allows only list or watch can expose the token as readily as one that allows get. Review bindings that grant cluster-wide Secret access, since these reach the notifications secret from any namespace.
Use an external secret store if policy requires it
If your policy forbids Secrets as the system of record, source the bot token from an external store through the Secrets Store CSI Driver and let it populate argocd-notifications-secret. This moves the master copy and its audit trail to a vault you already operate. Confirm how the driver syncs and rotates values, and who can change the external entry, because that is now the real point of control.
Limit edits to notification configuration
Treat argocd-notifications-cm and the notifications.argoproj.io/subscribe annotations on applications as access controls. Anyone who can edit the ConfigMap can redirect the service to another apiURL, and anyone who can annotate an application can route its sync and health events to any channel ID. Restrict update and patch on the ConfigMap to platform administrators, and review annotation changes through Git history.
Disable the built-in admin user
Argo CD's own documentation recommends using the built-in admin user only for initial setup. Once local users or SSO are working, set admin.enabled to false in argocd-cm and confirm that administrators can still sign in through SSO with the roles they need. Keep a documented break-glass path before you disable it, so a failed identity provider does not lock you out.
Rotate the token on personnel and namespace changes
Rotate the Mattermost bot token when staff who had access to the secret leave or change roles, and when the Argo CD namespace or its service accounts are moved or rebuilt. Create the new token in Mattermost, update the secret, confirm a test notification arrives, then revoke the old token. Ask Mattermost administrators how bot tokens are disabled and listed on your server, since revocation depends on that.
Why Argo CD notifications fail to reach Mattermost
This table lists the failures most often seen when Argo CD sends sync and health notifications to Mattermost, with the probable cause, a check and a fix for each. Work down the rows in order: the subscription annotation and trigger are checked first because they are the most frequent cause of silence, and the token, TLS and channel checks follow once Argo CD is clearly attempting to post. Confirm exact key names against the Argo CD Mattermost notification documentation for your installed version.
| Symptom | Probable cause | Check | Fix |
|---|---|---|---|
| No message after a sync | Application lacks a notifications.argoproj.io/subscribe.<trigger>.mattermost annotation, or the trigger name does not match | Read the application's annotations and the trigger names defined in argocd-notifications-cm | Add the subscription annotation with the trigger name exactly as defined, then sync again and watch the notifications controller logs |
| No message after a sync | Trigger condition does not match the event (for example, the trigger watches health while the sync only changes sync status) | Compare the trigger's when condition with the state the application actually reached | Subscribe to a trigger whose condition matches the event you expect, or adjust the condition and test with a manual sync |
| No message after a sync | Channel ID value in the annotation is a channel name, not the channel ID | Open the channel in Mattermost and copy the channel ID from its settings or the API | Replace the value with the channel ID string, then trigger a new sync |
| Authentication error from Mattermost | Bot token is invalid, expired or was copied with extra whitespace | Inspect the controller logs for 401 responses and confirm the key in argocd-notifications-secret holds the current token | Generate or copy the token again, update the secret, and restart the notifications controller if it does not pick up the change |
| Authentication error from Mattermost | Bot account is not a member of the target channel | Check the channel's member list for the bot user | Add the bot to the channel, then retry a sync; the bot must be able to post there |
| TLS error connecting to Mattermost | The Mattermost certificate chain is signed by an internal CA that the Argo CD controller does not trust | Check the controller logs for x509 or certificate verification errors and confirm the apiURL uses the expected host name | Add the internal CA to the controller trust store as your platform team standardizes it, and keep apiURL on the name the certificate covers |
| Missing service configuration | service.mattermost key is misnamed in argocd-notifications-cm, or the ConfigMap has a YAML indentation error | Compare the key with the Argo CD Mattermost service documentation and validate the ConfigMap YAML | Correct the key and indentation, apply the ConfigMap, and confirm the controller loaded it from its logs |
| Missing service configuration | ConfigMap or secret changed but the notifications controller still uses the previous values | Check when the controller was last restarted relative to the edit | Restart the Argo CD notifications controller after the change and send a test notification |
| Message posted to the wrong channel | Channel ID copied from another channel, or a shared annotation applied to several applications | List every application's subscribe annotation and compare channel IDs with the intended channel | Correct the channel ID on each application, and give each team its own channel ID in its application manifests |
Questions teams ask before configuring Argo CD notifications in Mattermost
How much effort does Argo CD notification setup take for one cluster compared with many?
For one cluster with a handful of applications, the work is mostly a single configuration change: a Mattermost bot token, one service entry, and an annotation on each application that should post. Effort rises with every cluster, because each cluster runs its own Argo CD instance and its own notifications configuration, so the token, template and subscription pattern must be repeated or deliberately shared. No duration is quoted here. Ask for an effort estimate that counts clusters, applications, channels and templates separately, since those four numbers drive most of the difference.
What drives the work up on an Argo CD notifications project?
The main drivers are:
- The number of applications and channels, since each subscription is an annotation that must be reviewed and kept correct.
- Multiple clusters, each with its own Argo CD instance and secret handling.
- Template design, including what a sync or health message should show and who reads it.
- TLS trust, so Argo CD can reach the Mattermost
apiURLusing the certificate chain your organization uses. - Secret policy, covering where the bot token lives and who can read the
argocd-notifications-secretobject. - Change control, because notification configuration changes often need approval and a test window before they reach production channels.
What does the client need to provide for this work?
The work needs three named roles at minimum. A Mattermost administrator creates the bot account, issues the token and confirms the target channels and team membership. A cluster administrator owns the Argo CD namespace, the ConfigMap and the secret, and can apply changes safely. A named channel owner decides which events belong in each channel and accepts alert volume. A test window is also needed so sync and health messages can be checked without flooding a live channel. Ask the vendor or your own team to confirm who approves changes to the secret store.
Can an internal platform team set up Argo CD notifications in Mattermost alone?
Yes, for a small, single-cluster setup, an experienced platform team can follow the Argo CD Mattermost service documentation with the existing Mattermost and Argo CD administrators. The harder part is repeatable work: template standards, consistent subscription annotations across many applications, secret handling that passes internal review, and documentation for the next person. A team without recent Argo CD or Mattermost administration experience should plan for a review pass before production use. DeployOpen plans, implements and documents this work in infrastructure you control, scoped in writing before work starts.
Which parts of the setup should we confirm against Argo CD and Mattermost release notes?
Confirm the configuration keys and their behavior against the Argo CD version you run, because the 2.14 to 3.0 upgrade notes changed several access and tracking defaults that affect how applications are read and managed. Confirm the Mattermost bot account permissions and token behavior against the Mattermost version you run, since Mattermost publishes monthly server releases and Extended Support Releases with their own support end dates. Check the Argo CD release process page for the minor versions still receiving patches before you pick a target version.
How do we keep the Mattermost bot token secure and rotate it?
Store the token only in argocd-notifications-secret, reference it from the service configuration, and restrict who can read or list that secret with least-privilege RBAC. Kubernetes stores Secrets unencrypted in etcd by default, so confirm that encryption at rest is enabled or that an external store is used. Plan rotation as a change: create a new token, update the secret, verify a test notification, then revoke the old token. Record who holds the admin role in each cluster.
Does the Argo CD notifications setup need a paid license or plan?
Argo CD is released under the Apache License 2.0 with no paid edition from the project itself, so the notifications feature carries no project license fee. Mattermost licensing is separate: its server binaries are under the MIT license and its plans are sold as prepaid annual subscriptions based on seat licenses, with no public prices on its pricing page. Confirm with Mattermost which plan your deployment uses and whether any features you need depend on that plan.
How DeployOpen scopes and delivers Argo CD notifications for Mattermost
DeployOpen plans and builds the Argo CD notification path into Mattermost inside your own infrastructure, from the bot account and channel design to the per-application subscriptions. Each engagement is fixed-scope, with the deliverables and the tests agreed in writing before work starts.
How we scope
- Inventory the Argo CD instances, applications, projects and Mattermost channels that will receive sync and health events.
- Agree which triggers notify which channels, and who owns each subscription annotation.
- Confirm the Mattermost bot account, token ownership and the Argo CD version your team runs before build starts.
How we build
- Configure the service.mattermost entry in argocd-notifications-cm with your Mattermost apiURL and channel conventions.
- Store the bot token in argocd-notifications-secret, with access limited to the namespace that needs it.
- Add per-application subscribe annotations, then test sync and health events end to end in a non-production cluster.
How we hand over
- Deliver the manifests, the subscription annotation standard and a runbook for rotating the bot token.
- Document the verification steps, including a test notification for each trigger and each channel.
- Walk your platform and security engineers through the configuration so they can review and extend it.
How we support
- Offer ongoing support, upgrades and continuous testing as a retainer after handover.
- Retest notification paths after Argo CD minor upgrades, since release timing follows the project's published cadence.
- Confirm each change against your written scope, and agree any extra channels or triggers in a new scope.

