I am trying to configure FluxCD in Kubernetes to send notifications to Microsfot Teams for reconciliation events.
I have followed the FluxCD "Setup Notifications" instructions. Everything is deployed as expected.
I am not receiving any alerts in Teams as expected when I edit a config (e.g. pod replicaCount) and run "flux reconcile ...". This is the error I am seeing in the Notification Controller
Here is the secret with the Microsoft Teams channel URL
Does anyone have any ideas to please share with me today. Thank you
So, firstly, I had not created an incoming webhook in Microsoft Teams UI: https://fluxcd.io/docs/components/notification/provider/#ms-teams
Secondly, I asked a question to the Flux maintainers as @Nalum suggested and there was a follow-on issue with encoding the Teams URL correctly. I had a trailing newline character which caused the URL to be invalid as reported by the Provider. I was reciving the following error
To resolve this I had to use the -n switch on the echo command when base64'ing the Teams URL for the Secret in Kubernetes.
echo -n '<teams url>' | base64
My final Kubernetes config was as follows:
A full breakdown of the investigation can be seen here: https://github.com/fluxcd/flux2/discussions/2719