<p>I am trying to configure FluxCD in Kubernetes to send notifications to Microsfot Teams for reconciliation events.</p>
<p>I have followed the FluxCD &quot;<a href="https://fluxcd.io/docs/guides/notifications/" rel="nofollow noreferrer">Setup Notifications</a>&quot; instructions. Everything is deployed as expected.</p>
<p><a href="https://i.stack.imgur.com/39Bq5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/39Bq5.png" alt="enter image description here" /></a></p>
<p>I am not receiving any alerts in Teams as expected when I edit a config (e.g. pod replicaCount) and run &quot;flux reconcile ...&quot;. This is the error I am seeing in the Notification Controller</p>
<p><a href="https://i.stack.imgur.com/ZKiHH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZKiHH.png" alt="enter image description here" /></a></p>
<p><a href="https://i.stack.imgur.com/bjKjx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bjKjx.png" alt="enter image description here" /></a></p>
<p><a href="https://i.stack.imgur.com/fKaq3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fKaq3.png" alt="enter image description here" /></a></p>
<p>Here is the secret with the Microsoft Teams channel URL</p>
<p><a href="https://i.stack.imgur.com/GMM1h.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GMM1h.png" alt="enter image description here" /></a></p>
<p>Does anyone have any ideas to please share with me today. Thank you</p>

Koman
<p>So, firstly, I had not created an incoming webhook in Microsoft Teams UI: <a href="https://fluxcd.io/docs/components/notification/provider/#ms-teams" rel="nofollow noreferrer">https://fluxcd.io/docs/components/notification/provider/#ms-teams</a></p>
<p>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</p>
<p><a href="https://i.stack.imgur.com/1cRKK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1cRKK.png" alt="enter image description here" /></a></p>
<p>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.</p>
<pre><code>echo -n '&lt;teams url&gt;' | base64
</code></pre>
<p>My final Kubernetes config was as follows:
<a href="https://i.stack.imgur.com/VarHX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VarHX.png" alt="enter image description here" /></a></p>
<p><a href="https://i.stack.imgur.com/61fmu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/61fmu.png" alt="enter image description here" /></a></p>
<p><a href="https://i.stack.imgur.com/aiTCw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/aiTCw.png" alt="enter image description here" /></a></p>
<p>A full breakdown of the investigation can be seen here: <a href="https://github.com/fluxcd/flux2/discussions/2719" rel="nofollow noreferrer">https://github.com/fluxcd/flux2/discussions/2719</a></p>
