fluxcd / notification-controller

The GitOps Toolkit event forwarded and notification dispatcher

Home Page:https://fluxcd.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

support mattermost Provider type

resham7 opened this issue · comments

hey,
I want to use Mattermost to send notifications from flux to Mattermost, created secrets for Mattermost's incoming hook here are yaml files

apiVersion: notification.toolkit.fluxcd.io/v1beta1
kind: Provider
metadata:
  name: mattermost
  namespace: flux-system
spec:
  type: mattermost
  channel: general
  secretRef:
    name: mattermost-url
---
apiVersion: notification.toolkit.fluxcd.io/v1beta1
kind: Alert
metadata:
  name: default-notifications
  namespace: flux-system
spec:
  providerRef:
    name: slack
  eventSeverity: info
  eventSources:
    - kind: GitRepository
      name: '*'
    - kind: HelmRepository
      name: '*'
    - kind: Kustomization
      name: '*'

getting this error

alert.notification.toolkit.fluxcd.io/default-notifications created
The Provider "mattermost" is invalid: spec.type: Unsupported value: "mattermost": supported values: "slack", "discord", "msteams", "rocket", "generic", "generic-hmac", "github", "gitlab", "bitbucket", "azuredevops", "googlechat", "webex", "sentry", "azureeventhub", "telegram", "lark", "matrix", "opsgenie", "alertmanager", "grafana", "githubdispatch"```

For reference you'll find the list of supported providers here.

so I can not use Mattermost anyhow?

Mattermost should be compatible with Slack, so set the type: slack

it is created but I'm not receiving any notification in my channel

  providerRef:
    name: slack

This is wrong, it should be mattermost

how i can do that can you please help

apiVersion: notification.toolkit.fluxcd.io/v1beta1
kind: Provider
metadata:
  name: mattermost
  namespace: flux-system
spec:
  type: slack
  channel: general
  secretRef:
    name: mattermost-url
---
apiVersion: notification.toolkit.fluxcd.io/v1beta1
kind: Alert
metadata:
  name: default-notifications
  namespace: flux-system
spec:
  providerRef:
    name: mattermost
  eventSeverity: info
  eventSources:
    - kind: GitRepository
      name: '*'
    - kind: HelmRepository
      name: '*'
    - kind: Kustomization
      name: '*'

Use the above, then look in the notification-controller logs with kubectl logs <nc-pod>

kubectl -n flux-system create secret generic mattermost-url --from-literal=address=mattermost-incoming-hook

i have created secret like this is it correct coz there is no error in pod logs but not receiving any notification

or can you give me any yaml for that to do