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

Flagger MS Teams Alerting Not Working as Expected #1698

Open
claudiu-albu opened this issue Aug 22, 2024 · 0 comments
Open

Flagger MS Teams Alerting Not Working as Expected #1698

claudiu-albu opened this issue Aug 22, 2024 · 0 comments

Comments

@claudiu-albu
Copy link

claudiu-albu commented Aug 22, 2024

@stefanprodan

We do have support for MS Teams by setting type: msteams in the AlertProvider, docs here: https://docs.flagger.app/usage/alerting#canary-configuration

I'm trying exactly this with following setup:

Flagger AlertProvider:

apiVersion: flagger.app/v1beta1
kind: AlertProvider
metadata:
  name: msteams-notifs
  namespace: flagger
spec:
  type: msteams
  secretRef:
    name: msteams-webhook

Flagger HelmRelease:

apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
  name: flagger
  namespace: flagger
spec:
  interval: 5m
  chart:
    spec:
      chart: flagger
      version: 1.38.0
      sourceRef:
        kind: HelmRepository
        name: flagger
        namespace: flagger
      interval: 1m
  install:
    remediation:
      retries: 3
  upgrade:
    remediation:
      remediateLastFailure: false
  values:
    meshProvider: istio
    metricsServer: http://kube-prometheus-stack-prometheus.monitoring.svc.cluster.local:9090
    clusterName: "${project}-${environment_name}"

and added this bit to Flagger Canary, in spec.analysis:

    alerts:
      - name: "MS Teams Notifications"
        severity: info
        providerRef:
          name: msteams-notifs
          namespace: flagger

I may not be entirely clear about what documentation explains,
but I can't for the life of me make it send MS Teams notifications other than:

image
and:
image
(these might as well be generated by underlying FluxCD alerting given their title "FluxCD Alerts". not entirely sure at the moment.)

this is a typical output for my canary deployment testing:
image

but even when I make Canary fail altogether, I still don't get anything corresponding in MS Teams, like documentation shows here:
image

while using setup shown above, I don't get any errors in Flagger k8s pod either while Canary deployment is running.

in Flagger HelmRelease, in spec.values, I've also tried using:

    env:
    - name: MSTEAMS_URL
      valueFrom:
       secretKeyRef:
         name: msteams-webhook
         key: address

or:

    msteams:
      url: <MSTEAMS_WEBHOOK_URL>

but this only results in making error "Error sending event to webhook Summary or Text is required for MSTeams" show up in Flagger pod logs again.

so am I getting it wrong in terms of what Flagger MS Teams alerting does?
what can I actually make Flagger alert on in MS Teams notifications?

Additional context

  • Flagger version: 1.38.0
  • Kubernetes version: 1.28.11
  • Service Mesh provider: Istio

any input would be greatly appreciated.
thanks in advance,
Claudiu

Originally posted by @claudiu-albu in #1140 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant