<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Flux – Flux monitoring</title><link>https://deploy-preview-2413--fluxcd.netlify.app/flux/monitoring/</link><description>Recent content in Flux monitoring on Flux</description><generator>Hugo -- gohugo.io</generator><language>en</language><atom:link href="https://deploy-preview-2413--fluxcd.netlify.app/flux/monitoring/index.xml" rel="self" type="application/rss+xml"/><item><title>Flux: Flux alerts</title><link>https://deploy-preview-2413--fluxcd.netlify.app/flux/monitoring/alerts/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deploy-preview-2413--fluxcd.netlify.app/flux/monitoring/alerts/</guid><description>
&lt;p>When operating a cluster, different teams may wish to receive notifications about
the status of their GitOps pipelines.
For example, the on-call team would receive alerts about reconciliation
failures in the cluster, while the dev team may wish to be alerted when a new version
of an app was deployed and if the deployment is healthy.&lt;/p>
&lt;h2 id="prerequisites">Prerequisites&lt;/h2>
&lt;p>To follow this guide you&amp;rsquo;ll need a Kubernetes cluster bootstrap with Flux.
Please see the
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/get-started/">get started guide&lt;/a>
or the
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/installation/">installation guide&lt;/a>.&lt;/p>
&lt;p>The Flux controllers emit Kubernetes events whenever a resource status changes.
You can use the
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/components/notification/">notification-controller&lt;/a>
to forward these events to Slack, Microsoft Teams, Discord and others.
The notification controller is part of the default Flux installation.&lt;/p>
&lt;h2 id="define-a-provider">Define a provider&lt;/h2>
&lt;p>First create a secret with your Slack bot token:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f0f0f0;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>kubectl -n flagger-system create secret generic slack-bot-token &lt;span style="color:#4070a0;font-weight:bold">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-weight:bold">&lt;/span>--from-literal&lt;span style="color:#666">=&lt;/span>&lt;span style="color:#bb60d5">token&lt;/span>&lt;span style="color:#666">=&lt;/span>xoxb-YOUR-TOKEN
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Create a notification provider for Slack by referencing the above secret:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f0f0f0;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-yaml" data-lang="yaml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#062873;font-weight:bold">apiVersion&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>notification.toolkit.fluxcd.io/v1beta3&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">kind&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>Provider&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">metadata&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">name&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>slack-bot&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">namespace&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>flagger-system&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">spec&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">type&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>slack&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">channel&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>general&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">address&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>https://slack.com/api/chat.postMessage&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">secretRef&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">name&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>slack-bot-token&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;div class="alert alert-info" role="alert">
&lt;h4 class="alert-heading">Providers&lt;/h4>
Flux supports various providers such as Discord, PagerDuty, Teams, Telegram, Sentry and many others.
For a complete list please see the
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/components/notification/providers/#type">Provider &lt;code>.spec.type&lt;/code> documentation&lt;/a>.
&lt;/div>
&lt;h2 id="define-an-alert">Define an alert&lt;/h2>
&lt;p>Create an alert definition for all repositories and kustomizations:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f0f0f0;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-yaml" data-lang="yaml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#062873;font-weight:bold">apiVersion&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>notification.toolkit.fluxcd.io/v1beta3&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">kind&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>Alert&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">metadata&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">name&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#007020;font-weight:bold">on&lt;/span>-call-webapp&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">namespace&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>flux-system&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">spec&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">summary&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;cluster addons&amp;#34;&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">eventMetadata&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">env&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;production&amp;#34;&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">cluster&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;my-cluster&amp;#34;&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">region&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;us-east-2&amp;#34;&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">providerRef&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">name&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>slack-bot&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">eventSeverity&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>info&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">eventSources&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>- &lt;span style="color:#062873;font-weight:bold">kind&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>GitRepository&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">name&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#39;*&amp;#39;&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>- &lt;span style="color:#062873;font-weight:bold">kind&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>Kustomization&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">name&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#39;*&amp;#39;&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Apply the above files or commit them to the bootstrap repository.&lt;/p>
&lt;p>To verify that the alert has been acknowledged by the notification controller do:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f0f0f0;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>flux get alerts
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Multiple alerts can be used to send notifications to different channels or Slack organizations.&lt;/p>
&lt;p>The event severity can be set to &lt;code>info&lt;/code> or &lt;code>error&lt;/code>.
When the severity is set to &lt;code>error&lt;/code>, the kustomize controller will alert on any error
encountered during the reconciliation process.
This includes kustomize build and validation errors,
apply errors and health check failures.&lt;/p>
&lt;p>&lt;img src="https://deploy-preview-2413--fluxcd.netlify.app/img/slack-error-alert.png" alt="error alert">&lt;/p>
&lt;p>When the verbosity is set to &lt;code>info&lt;/code>, the controller will alert if:&lt;/p>
&lt;ul>
&lt;li>a Kubernetes object was created, updated or deleted&lt;/li>
&lt;li>health checks are passing&lt;/li>
&lt;li>a dependency is delaying the execution&lt;/li>
&lt;li>an error occurs&lt;/li>
&lt;/ul>
&lt;p>&lt;img src="https://deploy-preview-2413--fluxcd.netlify.app/img/slack-info-alert.png" alt="info alert">&lt;/p>
&lt;h2 id="git-commit-status">Git commit status&lt;/h2>
&lt;p>The GitHub, GitLab, Gitea, Bitbucket, and Azure DevOps providers are slightly different to the other providers. Instead of
a stateless stream of events, the Git notification providers will link the event with accompanying Git commit which
triggered the event. The linking is done by updating the commit status of a specific commit.&lt;/p>
&lt;p>In GitHub the commit status set by notification-controller will result in a green checkmark or red cross next to the commit hash.
Clicking the icon will show more detailed information about the status.&lt;/p>
&lt;p>&lt;img src="https://deploy-preview-2413--fluxcd.netlify.app/img/commit-status-github-overview.png" alt="commit status GitHub overview">&lt;/p>
&lt;p>Receiving an event in the form of a commit status rather than a message in a chat conversation has the benefit
that it closes the deployment loop giving quick and visible feedback if a commit has reconciled and if it succeeded.
This means that a deployment will work in a similar manner that people are used to with &amp;ldquo;traditional&amp;rdquo; push based CD pipelines.
Additionally the status can be fetched from the git providers API for a specific commit. Allowing for custom automation tools
that can automatically promote, commit to a new directory, after receiving a successful commit status. This can all be
done without requiring any access to the Kubernetes cluster.&lt;/p>
&lt;p>As stated before the provider works by referencing the same git repository as the Kustomization controller does.
When a new commit is pushed to the repository, source-controller will sync the commit, triggering the kustomize-controller
to reconcile the new commit. After this is done the kustomize-controller sends an event to the notification-controller
with the result and the commit hash it reconciled. Then notification-controller can update the correct commit and repository
when receiving the event.&lt;/p>
&lt;p>&lt;img src="https://deploy-preview-2413--fluxcd.netlify.app/img/commit-status-flow.png" alt="commit status flow">&lt;/p>
&lt;div class="alert alert-info" role="alert">
&lt;h4 class="alert-heading">Limitations&lt;/h4>
The git notification providers require that a commit hash present in the metadata
of the event. Therefore, the providers will only work with &lt;code>Kustomization&lt;/code> as an
event source, as it is the only resource which includes this data.
&lt;/div>
&lt;p>First follow the
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/get-started/">get started guide&lt;/a> if you do not have a Kubernetes cluster with Flux installed in it.
You will need a authentication token to communicate with the API. The authentication method depends on
the git provider used, refer to the
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/components/notification/providers/#git-commit-status-updates">Provider CRD&lt;/a>
for details about how to get the correct token. The guide will use GitHub, but the other providers will work in a very similar manner.
The token will need to have write access to the repository it is going to update the commit status in.
Store the generated token in a Secret with the following data format in the cluster.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f0f0f0;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-yaml" data-lang="yaml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#062873;font-weight:bold">apiVersion&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>v1&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">kind&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>Secret&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">metadata&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">name&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>github&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">namespace&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>flux-system&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">data&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">token&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;token&amp;gt;&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>When sending notification events the kustomization-controller will include the commit hash related to the event.
Note that the commit hash in the event does not come from the git repository the &lt;code>Kustomization&lt;/code> resource
comes from but rather the kustomization source ref. This mean that commit status notifications will not work
if the manifests comes from a repository which the API token is not allowed to write to.&lt;/p>
&lt;p>Copy the manifest content in the &amp;ldquo;
&lt;a href="https://github.com/stefanprodan/podinfo/tree/master/kustomize" target="_blank">kustomize&lt;/a>&amp;rdquo; directory
into the directory &amp;ldquo;./clusters/my-cluster/podinfo&amp;rdquo; in your fleet-infra repository. Make sure that you also add the
namespace podinfo.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f0f0f0;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-yaml" data-lang="yaml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#062873;font-weight:bold">apiVersion&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>v1&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">kind&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>Namespace&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">metadata&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">name&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>podinfo&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Then create a Kustomization to deploy podinfo.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f0f0f0;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-yaml" data-lang="yaml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#062873;font-weight:bold">apiVersion&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>kustomize.toolkit.fluxcd.io/v1&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">kind&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>Kustomization&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">metadata&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">name&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>podinfo&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">namespace&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>flux-system&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">spec&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">interval&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>5m&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">targetNamespace&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>podinfo&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">path&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>./clusters/my-cluster/podinfo&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">prune&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#007020;font-weight:bold">true&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">sourceRef&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">kind&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>GitRepository&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">name&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>flux-system&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">healthChecks&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>- &lt;span style="color:#062873;font-weight:bold">apiVersion&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>apps/v1&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">kind&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>Deployment&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">name&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>podinfo&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">namespace&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>podinfo&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">timeout&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>1m&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Creating a git provider is very similar to creating other types of providers.
The only caveat being that the provider address needs to point to the same
git repository as the event source originates from.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f0f0f0;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-yaml" data-lang="yaml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#062873;font-weight:bold">apiVersion&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>notification.toolkit.fluxcd.io/v1beta3&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">kind&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>Provider&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">metadata&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">name&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>flux-system&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">namespace&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>flux-system&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">spec&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">type&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>github&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">address&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>https://github.com/&amp;lt;username&amp;gt;/fleet-infra&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">secretRef&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">name&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>github&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#0e84b5;font-weight:bold">---&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">apiVersion&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>notification.toolkit.fluxcd.io/v1beta3&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">kind&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>Alert&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">metadata&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">name&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>podinfo&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">namespace&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>flux-system&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">spec&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">providerRef&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">name&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>flux-system&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">eventSeverity&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>info&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">eventSources&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>- &lt;span style="color:#062873;font-weight:bold">kind&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>Kustomization&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">name&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>podinfo&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">namespace&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>flux-system&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>By now the fleet-infra repository should have a similar directory structure.&lt;/p>
&lt;pre tabindex="0">&lt;code>fleet-infra
└── clusters/
└── my-cluster/
├── flux-system/
│ ├── gotk-components.yaml
│ ├── gotk-sync.yaml
│ └── kustomization.yaml
├── podinfo/
│ ├── namespace.yaml
│ ├── deployment.yaml
│ ├── hpa.yaml
│ ├── service.yaml
│ └── kustomization.yaml
├── podinfo-kustomization.yaml
└── podinfo-notification.yaml
&lt;/code>&lt;/pre>&lt;p>If podinfo is deployed and the health checks pass you should get a successful status in
your forked podinfo repository.&lt;/p>
&lt;p>If everything is setup correctly there should now be a green check-mark next to the latest commit.
Clicking the check-mark should show a detailed view.&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>GitHub&lt;/th>
&lt;th>GitLab&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>&lt;img src="https://deploy-preview-2413--fluxcd.netlify.app/img/commit-status-github-success.png" alt="commit status GitHub successful">&lt;/td>
&lt;td>&lt;img src="https://deploy-preview-2413--fluxcd.netlify.app/img/commit-status-gitlab-success.png" alt="commit status GitLab successful">&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>Generate error&lt;/p>
&lt;p>A deployment failure can be forced by setting an invalid image tag in the podinfo deployment.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f0f0f0;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-yaml" data-lang="yaml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#062873;font-weight:bold">apiVersion&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>apps/v1&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">kind&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>Deployment&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">spec&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">template&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">spec&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">containers&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>- &lt;span style="color:#062873;font-weight:bold">name&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>podinfod&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">image&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>ghcr.io/stefanprodan/podinfo:fake&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>After the commit has been reconciled it should return a failed commit status.
This is where the health check in the Kustomization comes into play together
with the timeout. The health check is used to asses the health of the Kustomization.
A failed commit status will not be sent until the health check timeout. Setting
a lower timeout will give feedback faster, but may sometimes not allow enough time
for a new application to deploy.&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>GitHub&lt;/th>
&lt;th>GitLab&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>&lt;img src="https://deploy-preview-2413--fluxcd.netlify.app/img/commit-status-github-failure.png" alt="commit status GitHub failure">&lt;/td>
&lt;td>&lt;img src="https://deploy-preview-2413--fluxcd.netlify.app/img/commit-status-gitlab-failure.png" alt="commit status GitLab failure">&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h3 id="status-changes">Status changes&lt;/h3>
&lt;p>The provider will continuously receive events as they happen, and multiple events may
be received for the same commit hash. The git providers are configured to only update
the status if the status has changed. This is to avoid spamming the commit status
history with the same status over and over again.&lt;/p>
&lt;p>There is an aspect of statefullness that needs to be considered, compared to the other
notification providers, as the events are stored by the git provider. This means that
the status of a commit can change over time. Initially a deployment may be healthy, resulting
in a successful status. Down the line the application, and the health check, may start failing
due to the amount of traffic it receives or external dependencies no longer being available.
The change in the health check would cause the status to go from successful to failed.
It is important to keep this in mind when building any automation tools that deals with the
status, and consider the fact that receiving a successful status once does not mean it will
always be successful.&lt;/p>
&lt;h2 id="grafana-annotations">Grafana annotations&lt;/h2>
&lt;p>&lt;img src="https://deploy-preview-2413--fluxcd.netlify.app/img/grafana-annotation.png" alt="Annotations Dashboard">&lt;/p>
&lt;p>To display the Flux notifications on Grafana dashboards
you can configure Flux to push events to Grafana annotations API:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f0f0f0;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-yaml" data-lang="yaml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#062873;font-weight:bold">apiVersion&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>notification.toolkit.fluxcd.io/v1beta3&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">kind&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>Alert&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">metadata&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">name&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>grafana&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">namespace&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>monitoring&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">spec&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">providerRef&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">name&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>grafana&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">eventSeverity&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>info&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">eventSources&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>- &lt;span style="color:#062873;font-weight:bold">kind&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>GitRepository&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">name&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#39;*&amp;#39;&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">namespace&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>flux-system&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#0e84b5;font-weight:bold">---&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">apiVersion&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>notification.toolkit.fluxcd.io/v1beta3&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">kind&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>Provider&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">metadata&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">name&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>grafana&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">namespace&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>monitoring&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">spec&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">type&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>grafana&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">address&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;http://kube-prometheus-stack-grafana.monitoring/api/annotations&amp;#34;&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">secretRef&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">name&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>grafana-auth&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>For more details on how to integrate Flux with Grafana API please see the
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/components/notification/providers/#grafana">Grafana provider documentation&lt;/a>.&lt;/p></description></item><item><title>Flux: Flux Prometheus metrics</title><link>https://deploy-preview-2413--fluxcd.netlify.app/flux/monitoring/metrics/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deploy-preview-2413--fluxcd.netlify.app/flux/monitoring/metrics/</guid><description>
&lt;p>Flux has native support for
&lt;a href="https://prometheus.io/" target="_blank">Prometheus&lt;/a> metrics to provide insights
into the state of the Flux components. These can be used to set up monitoring
for the Flux controllers. In addition, Flux Custom Resource metrics can also
be collected leveraging tools like
&lt;a href="https://github.com/kubernetes/kube-state-metrics" target="_blank">kube-state-metrics&lt;/a>.
This document provides information about Flux metrics that can be used to set up
monitoring, with some examples.&lt;/p>
&lt;p>The
&lt;a href="https://github.com/fluxcd/flux2-monitoring-example" target="_blank">fluxcd/flux2-monitoring-example&lt;/a> repository
provides a ready-made example setup to get started with monitoring Flux. It is
recommended to set up the monitoring example before continuing with this
document to follow along. Before getting into the monitoring setup, the
following sections will describe the kinds of metrics that can be collected for
Flux.&lt;/p>
&lt;h2 id="controller-metrics">Controller metrics&lt;/h2>
&lt;p>The default installation of Flux controllers export Prometheus metrics at
port &lt;code>8080&lt;/code> in the standard &lt;code>/metrics&lt;/code> path. These metrics are about the inner
workings of the controllers.&lt;/p>
&lt;p>Flux resource reconciliation duration metrics:&lt;/p>
&lt;pre tabindex="0">&lt;code>gotk_reconcile_duration_seconds_bucket{kind, name, namespace, le}
gotk_reconcile_duration_seconds_sum{kind, name, namespace}
gotk_reconcile_duration_seconds_count{kind, name, namespace}
&lt;/code>&lt;/pre>&lt;p>Cache event metrics:&lt;/p>
&lt;pre tabindex="0">&lt;code>gotk_cache_events_total{event_type, name, namespace}
&lt;/code>&lt;/pre>&lt;p>Token cache metrics:&lt;/p>
&lt;pre tabindex="0">&lt;code>gotk_token_cache_events_total{event_type, kind, name, namespace, operation}
gotk_token_cache_requests_total{status}
gotk_token_cache_evictions_total
gotk_token_cached_items
&lt;/code>&lt;/pre>&lt;p>Controller CPU and memory usage:&lt;/p>
&lt;pre tabindex="0">&lt;code>process_cpu_seconds_total{namespace, pod}
container_memory_working_set_bytes{namespace, pod}
&lt;/code>&lt;/pre>&lt;p>Kubernetes API usage:&lt;/p>
&lt;pre tabindex="0">&lt;code>rest_client_requests_total{namespace, pod}
&lt;/code>&lt;/pre>&lt;p>Controller runtime:&lt;/p>
&lt;pre tabindex="0">&lt;code>workqueue_longest_running_processor_seconds{name}
controller_runtime_reconcile_total{controller, result}
&lt;/code>&lt;/pre>&lt;p>In addition, many other Go runtime and
&lt;a href="https://book.kubebuilder.io/reference/metrics-reference" target="_blank">controller-runtime
metrics&lt;/a> are also exported.&lt;/p>
&lt;h2 id="resource-metrics">Resource metrics&lt;/h2>
&lt;p>Metrics for the Flux custom resources can be used to monitor the deployment of
workloads. Since the use case for these metrics may vary depending on the
needs, it&amp;rsquo;s hard to decide which fields of the resources would be useful to the
users. Hence, these metrics are not exported by the Flux controllers themselves
but can be collected and exported by using other tools that can read the custom
resource state from the kube-apiserver. One such tool is
&lt;a href="https://github.com/kubernetes/kube-state-metrics" target="_blank">kube-state-metrics
(KSM)&lt;/a>. KSM is also deployed as part of
&lt;a href="https://github.com/prometheus-operator/kube-prometheus" target="_blank">kube-prometheus-stack&lt;/a> and is used to export the metrics
of kubernetes core resources. It can be configured to also collect custom
resource metrics. The monitoring setup in
&lt;a href="https://github.com/fluxcd/flux2-monitoring-example" target="_blank">flux2-monitoring-example&lt;/a> uses KSM to collect and
export Flux custom resource metrics.&lt;/p>
&lt;p>In the
&lt;a href="https://github.com/fluxcd/flux2-monitoring-example" target="_blank">example monitoring setup&lt;/a>, the metric
&lt;code>gotk_resource_info&lt;/code> provides information about the current state of Flux
resources.&lt;/p>
&lt;pre tabindex="0">&lt;code>gotk_resource_info{customresource_group, customresource_kind, customresource_version, exported_namespace, name, ready, suspended, ...}
&lt;/code>&lt;/pre>&lt;ul>
&lt;li>&lt;code>customresource_group&lt;/code> is the API group of the resource, for example
&lt;code>source.toolkit.fluxcd.io&lt;/code> for the Flux source API.&lt;/li>
&lt;li>&lt;code>customresource_kind&lt;/code> is the kind of the resource, for example a
&lt;code>GitRepository&lt;/code> source.&lt;/li>
&lt;li>&lt;code>customresource_version&lt;/code> is the API version of the resource, for example &lt;code>v1&lt;/code>.&lt;/li>
&lt;li>&lt;code>exported_namespace&lt;/code> is the namespace of the resource.&lt;/li>
&lt;li>&lt;code>name&lt;/code> is the name of the resource.&lt;/li>
&lt;li>&lt;code>ready&lt;/code> shows the readiness of the resource.&lt;/li>
&lt;li>&lt;code>suspended&lt;/code> shows if the resource&amp;rsquo;s reconciliation is suspended.&lt;/li>
&lt;/ul>
&lt;p>These are some of the common labels that are present in metrics for all the
kinds of resources. In addition, there are a few resource kind specific labels.
See the following table for a list of labels associated with specific resource
kind.&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Resource Kind&lt;/th>
&lt;th>Labels&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>Kustomization&lt;/td>
&lt;td>&lt;code>revision&lt;/code>, &lt;code>source_name&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>HelmRelease&lt;/td>
&lt;td>&lt;code>revision&lt;/code>, &lt;code>chart_name&lt;/code>, &lt;code>chart_app_version&lt;/code>, &lt;code>chart_source_name&lt;/code>, &lt;code>chart_ref_name&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>GitRepository&lt;/td>
&lt;td>&lt;code>revision&lt;/code>, &lt;code>url&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Bucket&lt;/td>
&lt;td>&lt;code>revision&lt;/code>, &lt;code>endpoint&lt;/code>, &lt;code>bucket_name&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>HelmRepository&lt;/td>
&lt;td>&lt;code>revision&lt;/code>, &lt;code>url&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>HelmChart&lt;/td>
&lt;td>&lt;code>revision&lt;/code>, &lt;code>chart_name&lt;/code>, &lt;code>chart_version&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>OCIRepository&lt;/td>
&lt;td>&lt;code>revision&lt;/code>, &lt;code>url&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Receiver&lt;/td>
&lt;td>&lt;code>webhook_path&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>ImageRepository&lt;/td>
&lt;td>&lt;code>image&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>ImagePolicy&lt;/td>
&lt;td>&lt;code>source_name&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>ImageUpdateAutomation&lt;/td>
&lt;td>&lt;code>source_name&lt;/code>&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;div class="alert alert-info" role="alert">
&lt;strong>Note:&lt;/strong> The above metric may have extra labels after being collected in Prometheus. This
may be due to the default Prometheus scrape configuration used by
kube-prometheus-stack. Since they are about the kube-state-metrics service and
not about Flux itself, they can be ignored.
&lt;/div>
&lt;p>&lt;code>gotk_resource_info&lt;/code> is an example of a metric used to collect information about
the Flux resources. This metric can be customized to add more labels, or more
such metrics can also be created by changing the kube-state-metrics custom
resource state configuration. Please see
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/monitoring/custom-metrics/">Flux custom Prometheus
metrics&lt;/a> for details about them.&lt;/p>
&lt;h2 id="monitoring-setup">Monitoring setup&lt;/h2>
&lt;p>In the
&lt;a href="https://github.com/fluxcd/flux2-monitoring-example" target="_blank">monitoring example repository&lt;/a>, the monitoring configurations can be found in the
&lt;a href="https://github.com/fluxcd/flux2-monitoring-example/tree/main/monitoring" target="_blank">&lt;code>monitoring/&lt;/code>&lt;/a>
directory. &lt;code>monitoring/controllers/&lt;/code> directory contains the configurations for
deploying kube-prometheus-stack and loki-stack. We&amp;rsquo;ll discuss
kube-prometheus-stack below. For Flux log collection using Loki, refer to the
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/monitoring/logs/">Flux logs&lt;/a> docs.&lt;/p>
&lt;p>The configuration in the &lt;code>monitoring/controllers/kube-prometheus-stack/&lt;/code>
directory creates a HelmRepository of type OCI for the
&lt;a href="https://github.com/prometheus-community/helm-charts" target="_blank">prometheus-community
helm charts&lt;/a> and a
HelmRelease to deploy the &lt;code>kube-prometheus-stack&lt;/code> chart in the &lt;code>monitoring&lt;/code>
namespace. This installs all the monitoring components in the &lt;code>monitoring&lt;/code>
namespace. Please see the
&lt;a href="https://github.com/fluxcd/flux2-monitoring-example/blob/main/monitoring/controllers/kube-prometheus-stack/release.yaml" target="_blank">values&lt;/a>
used for the chart deployment and modify them accordingly.&lt;/p>
&lt;p>The chart values used for configuring kube-state-metrics are in the file
&lt;a href="https://github.com/fluxcd/flux2-monitoring-example/blob/main/monitoring/controllers/kube-prometheus-stack/kube-state-metrics-config.yaml" target="_blank">&lt;code>kube-state-metrics-config.yaml&lt;/code>&lt;/a>,
as seen in the
&lt;a href="https://github.com/fluxcd/flux2-monitoring-example/blob/main/monitoring/controllers/kube-prometheus-stack/kustomization.yaml" target="_blank">kustomization.yaml&lt;/a>,
which uses a kustomize ConfigMap generator to put the configurations in a
ConfigMap and use the chart values from the ConfigMap.
These values are merged with the inline chart values in the HelmRelease.
Kube-state-metrics values are in a separate file to make it easier to customize
the metrics it collects; refer to the
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/monitoring/custom-metrics/">Flux custom Prometheus
metrics&lt;/a> docs to see how they are used. Once
deployed with these values, the kube-state-metrics starts collecting and
exporting the Flux resource metrics.&lt;/p>
&lt;p>To configure Prometheus to scrape Flux controller metrics, a
&lt;a href="https://github.com/fluxcd/flux2-monitoring-example/blob/main/monitoring/configs/podmonitor.yaml" target="_blank">PodMonitor&lt;/a>
is used that selects all the Flux controller Pods and sets the metrics endpoint
to the &lt;code>http-prom&lt;/code> port. Once created, the prometheus-operator will
automatically configure Prometheus to scrape the Flux controller metrics.&lt;/p>
&lt;h3 id="flux-grafana-dashboards">Flux Grafana dashboards&lt;/h3>
&lt;p>The
&lt;a href="https://github.com/fluxcd/flux2-monitoring-example" target="_blank">example monitoring setup&lt;/a> provides two example
Grafana dashboards in
&lt;a href="https://github.com/fluxcd/flux2-monitoring-example/tree/main/monitoring/configs/dashboards" target="_blank">&lt;code>monitoring/configs/dashboards&lt;/code>&lt;/a>
that use the Flux controller and resource metrics. The Flux Cluster Stats
dashboard shows the overall state of the Flux Sources and Cluster Reconcilers.
The Flux Control Plane dashboard shows the statistics of the various components
that constitute the Flux Control Plane and their operational metrics.&lt;/p>
&lt;p>Control plane dashboard:&lt;/p>
&lt;p>&lt;img src="https://deploy-preview-2413--fluxcd.netlify.app/img/grafana-cp-dashboard-p1.png" alt="Control Plane Dashboard - Part 1">&lt;/p>
&lt;p>&lt;img src="https://deploy-preview-2413--fluxcd.netlify.app/img/grafana-cp-dashboard-p2.png" alt="Control Plane Dashboard - Part 2">&lt;/p>
&lt;p>&lt;img src="https://deploy-preview-2413--fluxcd.netlify.app/img/grafana-cp-dashboard-p3.png" alt="Control Plane Dashboard - Part 3">&lt;/p>
&lt;p>&lt;img src="https://deploy-preview-2413--fluxcd.netlify.app/img/grafana-cp-dashboard-p4.png" alt="Control Plane Dashboard - Part 4">&lt;/p>
&lt;p>Cluster reconciliation dashboard:&lt;/p>
&lt;p>&lt;img src="https://deploy-preview-2413--fluxcd.netlify.app/img/grafana-cluster-dashboard-p1.png" alt="Cluster reconciliation dashboard - Part 1">&lt;/p>
&lt;p>&lt;img src="https://deploy-preview-2413--fluxcd.netlify.app/img/grafana-cluster-dashboard-p2.png" alt="Cluster reconciliation dashboard - Part 2">&lt;/p>
&lt;p>More custom metrics can be created and used in the dashboards for monitoring
Flux.&lt;/p></description></item><item><title>Flux: Flux custom Prometheus metrics</title><link>https://deploy-preview-2413--fluxcd.netlify.app/flux/monitoring/custom-metrics/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deploy-preview-2413--fluxcd.netlify.app/flux/monitoring/custom-metrics/</guid><description>
&lt;p>By default, the standard installation of Flux exports a specific set of metrics
about the controllers and their inner workings that may not serve the needs of
all the users. Some of these metrics are common across all the Flux controllers,
and some are very specific to a few controllers. It&amp;rsquo;s not feasible to
add all the possible informational labels to these metrics, as that may increase
the cardinality of the metrics. Since these metrics are about the operations of
Flux, it may not be much of a benefit to add custom labels to these metrics,
as these are more useful for the people administering and maintaining Flux. Most
of the time, the users of Flux who interact with Flux through the Flux custom
resources want to know about the resources they work with. For example, the
state of GitRepositories and their branches or tag references. These metrics can
be scraped by using
&lt;a href="https://github.com/kubernetes/kube-state-metrics" target="_blank">kube-state-metrics (KSM)&lt;/a>, which is
part of the
&lt;a href="https://github.com/prometheus-operator/kube-prometheus" target="_blank">kube-prometheus-stack&lt;/a>. KSM can be
configured to add custom labels to the resource metrics, for example, some value
from the status of a resource or some arbitrary value like a team name, department name, etc.&lt;/p>
&lt;h2 id="set-up-kube-state-metrics">Set up kube-state-metrics&lt;/h2>
&lt;p>Kube-state-metrics can be installed along with the whole monitoring stack using
kube-prometheus-stack. The
&lt;a href="https://github.com/fluxcd/flux2-monitoring-example" target="_blank">fluxcd/flux2-monitoring-example&lt;/a> repository contains
example configurations for deploying and configuring kube-prometheus-stack to
monitor Flux. These configurations will be discussed in detail in the following
sections to show how they can be customized.&lt;/p>
&lt;p>The Kube-prometheus-stack Helm chart is used to install the monitoring stack.
The kube-state-metrics related configuration in the chart values exists in a
separate file called
&lt;a href="https://github.com/fluxcd/flux2-monitoring-example/blob/main/monitoring/controllers/kube-prometheus-stack/kube-state-metrics-config.yaml" target="_blank">kube-state-metrics-config.yaml&lt;/a>.
It configures KSM to run in &lt;code>custom-resource-state-only&lt;/code> mode. In this state,
KSM will not collect metrics for any of the Kubernetes core resources. The
&lt;code>rbac&lt;/code> section provides KSM access to list and watch Flux custom resources. If
image-reflector-controller and image-automation-controllers are not used, the
API group (&lt;code>image.toolkit.fluxcd.io&lt;/code>) and resources (&lt;code>imagerepositories&lt;/code>,
&lt;code>imagepolicies&lt;/code>, &lt;code>imageupdateautomations&lt;/code>) can be removed. The
&lt;code>customResourceState&lt;/code> section configures how the Flux metrics are composed.&lt;/p>
&lt;p>Once deployed, KSM will start collecting the Flux resource metrics from the
kube-apiserver and exporting them as configured.&lt;/p>
&lt;h2 id="adding-custom-metrics">Adding custom metrics&lt;/h2>
&lt;p>The example &lt;code>customResourceState&lt;/code> values used in the above setup add a metric
called &lt;code>gotk_resource_info&lt;/code> with labels &lt;code>name&lt;/code>, &lt;code>exported_namespace&lt;/code>,
&lt;code>suspended&lt;/code>, &lt;code>ready&lt;/code>, etc.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f0f0f0;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-yaml" data-lang="yaml">&lt;span style="display:flex;">&lt;span>- &lt;span style="color:#062873;font-weight:bold">name&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;resource_info&amp;#34;&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">help&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;The current state of a GitOps Toolkit resource.&amp;#34;&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">each&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">type&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>Info&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">info&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">labelsFromPath&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">name&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>[metadata, name]&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">labelsFromPath&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">exported_namespace&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>[metadata, namespace]&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">suspended&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>[spec, suspend]&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">ready&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>[status, conditions, &amp;#34;[type=Ready]&amp;#34;, status]&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>...&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>This provides the current state of the Flux resources. It can be used to monitor
the readiness of Flux resources. This can be edited to add more labels; more
about that in the next section.&lt;/p>
&lt;p>Similarly, more custom metrics can be added by appending them to the &lt;code>metrics&lt;/code>
list. For example, to create a metric about the HelmRelease last applied
chart and app version, append the HelmRelease resource metrics section:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f0f0f0;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-yaml" data-lang="yaml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#0e84b5;font-weight:bold">...&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">customResourceState&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">config&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">spec&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">resources&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>- &lt;span style="color:#062873;font-weight:bold">groupVersionKind&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">group&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>helm.toolkit.fluxcd.io&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">version&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;v2&amp;#34;&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">kind&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>HelmRelease&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">metricNamePrefix&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>gotk&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">metrics&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>- &lt;span style="color:#062873;font-weight:bold">name&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;resource_info&amp;#34;&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">help&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;The current state of a GitOps Toolkit resource.&amp;#34;&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">each&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">type&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>Info&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">info&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">labelsFromPath&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">name&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>[metadata, name]&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">labelsFromPath&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">exported_namespace&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>[metadata, namespace]&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">suspended&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>[spec, suspend]&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">ready&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>[status, conditions, &amp;#34;[type=Ready]&amp;#34;, status]&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>- &lt;span style="color:#062873;font-weight:bold">name&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;helmrelease_version_info&amp;#34;&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">help&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;The version information of helm release resource.&amp;#34;&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">each&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">type&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>Info&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">info&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">labelsFromPath&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">chart_version&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>[status, history, &amp;#34;0&amp;#34;, chartVersion]&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">app_version&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>[&lt;span style="color:#bbb"> &lt;/span>status, history, &amp;#34;0&amp;#34;, appVersion ]&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">labelsFromPath&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">name&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>[metadata, name]&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">exported_namespace&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>[metadata, namespace]&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">chart_name&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>[spec, chart, spec, chart]&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#0e84b5;font-weight:bold">...&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>In the above, &lt;code>gotk_resource_info&lt;/code> and &lt;code>gotk_helmrelease_version_info&lt;/code> metrics
will be exported for HelmReleases.&lt;/p>
&lt;pre tabindex="0">&lt;code># HELP gotk_resource_info The current state of a GitOps Toolkit resource.
# TYPE gotk_resource_info info
gotk_resource_info{customresource_group=&amp;#34;helm.toolkit.fluxcd.io&amp;#34;,customresource_kind=&amp;#34;HelmRelease&amp;#34;,customresource_version=&amp;#34;v2&amp;#34;,exported_namespace=&amp;#34;monitoring&amp;#34;,name=&amp;#34;kube-prometheus-stack&amp;#34;,ready=&amp;#34;True&amp;#34;} 1
# HELP gotk_helmrelease_version_info The version information of helm release resource.
# TYPE gotk_helmrelease_version_info info
gotk_helmrelease_version_info{chart_mame=&amp;#34;kube-prometheus-stack&amp;#34;,chart_version=&amp;#34;61.3.2&amp;#34;,app_version=&amp;#34;v0.75.1&amp;#34;,customresource_group=&amp;#34;helm.toolkit.fluxcd.io&amp;#34;,customresource_kind=&amp;#34;HelmRelease&amp;#34;,customresource_version=&amp;#34;v2&amp;#34;,exported_namespace=&amp;#34;monitoring&amp;#34;,name=&amp;#34;kube-prometheus-stack&amp;#34;} 1
&lt;/code>&lt;/pre>&lt;h2 id="adding-custom-metric-labels">Adding custom metric labels&lt;/h2>
&lt;p>Custom labels can be added to metrics to create more meaningful monitoring
metrics. For example, a common &lt;code>ownedBy&lt;/code> label across all the resources in a
cluster, &lt;code>businessUnit&lt;/code> or &lt;code>department&lt;/code> name from the labels of objects, etc.&lt;/p>
&lt;p>For example, if the GitRepository objects are labelled with &lt;code>department&lt;/code>:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f0f0f0;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-yaml" data-lang="yaml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#062873;font-weight:bold">apiVersion&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>source.toolkit.fluxcd.io/v1&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">kind&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>GitRepository&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">metadata&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">name&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>foo&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">namespace&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>bar&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">labels&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">department&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>baz&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">spec&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">interval&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>1h&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">ref&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">branch&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>main&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">url&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>https://github.com/fluxcd/flux2-monitoring-example&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The KSM &lt;code>customResourceState&lt;/code> value can be configured to extract the
department name, owned by team name and Git branch name, and include them as
labels in the &lt;code>gotk_resource_info&lt;/code> metric of GitRepositories.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f0f0f0;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-yaml" data-lang="yaml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#0e84b5;font-weight:bold">...&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">customResourceState&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">config&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">spec&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">resources&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>- &lt;span style="color:#062873;font-weight:bold">groupVersionKind&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">group&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>source.toolkit.fluxcd.io&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">version&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;v1&amp;#34;&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">kind&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>GitRepository&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">metricNamePrefix&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>gotk&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">commonLabels&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">ownedBy&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>teamA&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">labelsFromPath&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">department&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>[metadata, labels, department]&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">metrics&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>- &lt;span style="color:#062873;font-weight:bold">name&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;resource_info&amp;#34;&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">help&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;The current state of a GitOps Toolkit resource.&amp;#34;&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">each&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">type&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>Info&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">info&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">labelsFromPath&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">name&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>[metadata, name]&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">labelsFromPath&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">exported_namespace&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>[metadata, namespace]&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">suspended&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>[spec, suspend]&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">ready&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>[status, conditions, &amp;#34;[type=Ready]&amp;#34;, status]&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">branch&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>[spec, ref, branch]&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#0e84b5;font-weight:bold">...&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The above configuration will result in the following metric&lt;/p>
&lt;pre tabindex="0">&lt;code>gotk_resource_info{branch=&amp;#34;main&amp;#34;,customresource_group=&amp;#34;source.toolkit.fluxcd.io&amp;#34;,customresource_kind=&amp;#34;GitRepository&amp;#34;,customresource_version=&amp;#34;v1&amp;#34;,department=&amp;#34;baz&amp;#34;,exported_namespace=&amp;#34;bar&amp;#34;,name=&amp;#34;foo&amp;#34;,ownedBy=&amp;#34;teamA&amp;#34;,ready=&amp;#34;True&amp;#34;} 1
&lt;/code>&lt;/pre>&lt;p>It contains the &lt;code>ownedBy=&amp;quot;teamA&amp;quot;&lt;/code>, &lt;code>department=&amp;quot;baz&amp;quot;&lt;/code> and &lt;code>branch=&amp;quot;main&amp;quot;&lt;/code>
labels. Similarly, more custom labels can be added depending on the need.&lt;/p>
&lt;p>Refer to the
&lt;a href="https://github.com/kubernetes/kube-state-metrics/blob/main/docs/metrics/extend/customresourcestate-metrics.md" target="_blank">kube-state-metrics custom-resource state configuration
docs&lt;/a> to learn more about customizing the
metrics.&lt;/p></description></item><item><title>Flux: Flux logs</title><link>https://deploy-preview-2413--fluxcd.netlify.app/flux/monitoring/logs/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deploy-preview-2413--fluxcd.netlify.app/flux/monitoring/logs/</guid><description>
&lt;p>The Flux controllers follow the Kubernetes structured logging conventions. These
logs can be collected and analyzed to monitor the operations of the controllers.&lt;/p>
&lt;p>The
&lt;a href="https://github.com/fluxcd/flux2-monitoring-example" target="_blank">fluxcd/flux2-monitoring-example&lt;/a> repository
provides a ready-made example setup to get started with monitoring Flux, which
includes
&lt;a href="https://github.com/grafana/helm-charts/tree/main/charts/loki-stack" target="_blank">Loki-stack&lt;/a> to collect logs from all the Flux controllers
and explore them using Grafana. It is recommended to set up the monitoring
example before continuing with this document to follow along. Before getting
into Loki and Grafana setup, the following sections will describe the Flux logs
and how to interpret them.&lt;/p>
&lt;h2 id="controller-logs">Controller logs&lt;/h2>
&lt;p>The default installation of Flux controllers write logs to &lt;code>stderr&lt;/code> in JSON
format at the &lt;code>info&lt;/code> log level. This can be configured using the
&lt;code>--log-encoding&lt;/code> and &lt;code>--log-level&lt;/code> flags in the controllers. Refer to the
&lt;a href="https://github.com/fluxcd/flux2-monitoring-example/blob/main/clusters/test/flux-system/kustomization.yaml" target="_blank">flux-system
kustomization&lt;/a>
for an example of how to patch the Flux controllers with flags. The following
example patch snippet can be appended to the existing set of patches to add a
log level flag and change the log level of the controller to &lt;code>debug&lt;/code>.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f0f0f0;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-yaml" data-lang="yaml">&lt;span style="display:flex;">&lt;span>- &lt;span style="color:#062873;font-weight:bold">op&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>add&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">path&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>/spec/template/spec/containers/0/args/-&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">value&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>--log-level=&amp;#34;debug&amp;#34;&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;div class="alert alert-info" role="alert">
&lt;strong>Note:&lt;/strong> The patch configuration in the example only applies to a few targeted
controllers. Update the patch target to apply this to other controllers too.
&lt;/div>
&lt;h3 id="structured-logging">Structured logging&lt;/h3>
&lt;p>The Flux controllers support structured logging with the following common
labels:&lt;/p>
&lt;ul>
&lt;li>&lt;code>level&lt;/code> can be &lt;code>debug&lt;/code>, &lt;code>info&lt;/code> or &lt;code>error&lt;/code>&lt;/li>
&lt;li>&lt;code>ts&lt;/code> timestamp in the ISO 8601 format&lt;/li>
&lt;li>&lt;code>msg&lt;/code> info or error description&lt;/li>
&lt;li>&lt;code>error&lt;/code> error details (present when &lt;code>level&lt;/code> is &lt;code>error&lt;/code>)&lt;/li>
&lt;li>&lt;code>controllerGroup&lt;/code> the Flux CR group&lt;/li>
&lt;li>&lt;code>controllerKind&lt;/code> the Flux CR kind&lt;/li>
&lt;li>&lt;code>name&lt;/code> The Flux CR name&lt;/li>
&lt;li>&lt;code>namespace&lt;/code> The Flux CR namespace&lt;/li>
&lt;li>&lt;code>reconcileID&lt;/code> the UID of the Flux reconcile operation&lt;/li>
&lt;/ul>
&lt;p>Sample of an &lt;code>info&lt;/code> log produced by kustomize-controller:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f0f0f0;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-json" data-lang="json">&lt;span style="display:flex;">&lt;span>{
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;level&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;info&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;ts&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;2023-08-16T09:36:41.286Z&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;controllerGroup&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;kustomize.toolkit.fluxcd.io&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;controllerKind&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;Kustomization&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;name&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;redis&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;namespace&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;apps&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;msg&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;server-side apply completed&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;revision&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;main@sha1:30081ad7170fb8168536768fe399493dd43160d7&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;output&amp;#34;&lt;/span>: {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;ConfigMap/apps/redis&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;created&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;Deployment/apps/redis&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;configured&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;HorizontalPodAutoscaler/apps/redis&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;deleted&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;Service/apps/redis&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;unchanged&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;Secret/apps/redis&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;skipped&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Sample of an &lt;code>error&lt;/code> log produced by kustomize-controller:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f0f0f0;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-json" data-lang="json">&lt;span style="display:flex;">&lt;span>{
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;level&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;error&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;ts&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;2023-08-16T09:36:41.286Z&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;controllerGroup&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;kustomize.toolkit.fluxcd.io&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;controllerKind&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;Kustomization&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;name&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;redis&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;namespace&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;apps&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;msg&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;Reconciliation failed after 2s, next try in 5m0s&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;revision&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;main@sha1:f68c334e0f5fae791d1e47dbcabed256f4f89e68&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;error&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;Service/apps/redis dry-run failed, reason: Invalid, error: Service redis is invalid: spec.type: Unsupported value: Ingress&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The log labels shown above can be used to query for specific types of logs. For
example, error logs can be queried using the &lt;code>error&lt;/code> label, the output of
successful reconciliation of Kustomization can be queried using the &lt;code>output&lt;/code>
label, the logs about a specific controller can be queried using the
&lt;code>controllerKind&lt;/code> label.&lt;/p>
&lt;h2 id="querying-logs-associated-with-resources">Querying logs associated with resources&lt;/h2>
&lt;p>For querying logs associated with particular resources, the &lt;code>flux logs&lt;/code> CLI
command can be used. It connects to the cluster, fetches the relevant Flux logs,
and filters them based on the query request. For example, to list the logs
associated with Kustomization &lt;code>monitoring-configs&lt;/code>:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f0f0f0;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-console" data-lang="console">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#c65d09;font-weight:bold">$&lt;/span> flux logs --kind&lt;span style="color:#666">=&lt;/span>Kustomization --name&lt;span style="color:#666">=&lt;/span>monitoring-configs --namespace&lt;span style="color:#666">=&lt;/span>flux-system --since&lt;span style="color:#666">=&lt;/span>1m
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">...
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">2023-08-22T18:35:45.292Z info Kustomization/monitoring-configs.flux-system - All dependencies are ready, proceeding with reconciliation
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">2023-08-22T18:35:45.348Z info Kustomization/monitoring-configs.flux-system - server-side apply completed
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">2023-08-22T18:35:45.380Z info Kustomization/monitoring-configs.flux-system - Reconciliation finished in 88.208385ms, next run in 1h0m0s
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Refer to the
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/cmd/flux_logs/">&lt;code>flux logs&lt;/code>&lt;/a> CLI docs to learn more about
it.&lt;/p>
&lt;h2 id="log-aggregation-with-grafana-loki">Log aggregation with Grafana Loki&lt;/h2>
&lt;p>In the
&lt;a href="https://github.com/fluxcd/flux2-monitoring-example" target="_blank">monitoring example repository&lt;/a>, the monitoring
configurations can be found in the
&lt;a href="https://github.com/fluxcd/flux2-monitoring-example/tree/main/monitoring" target="_blank">&lt;code>monitoring/&lt;/code>&lt;/a>
directory. &lt;code>monitoring/controllers/&lt;/code> directory contains the configurations for
deploying kube-prometheus-stack and loki-stack. We&amp;rsquo;ll discuss loki-stack below.
For Flux metrics collection using Prometheus, refer to the
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/monitoring/metrics/">Flux Prometheus
metrics&lt;/a> docs.&lt;/p>
&lt;p>The configuration in the
&lt;a href="https://github.com/fluxcd/flux2-monitoring-example/tree/main/monitoring/controllers/loki-stack" target="_blank">&lt;code>monitoring/controllers/loki-stack&lt;/code>&lt;/a>
directory creates a HelmRepository for the
&lt;a href="https://github.com/grafana/helm-charts" target="_blank">Grafana
helm-charts&lt;/a> and a HelmRelease to
deploy the &lt;code>loki-stack&lt;/code> chart in the &lt;code>monitoring&lt;/code> namespace. Please see the
&lt;a href="https://github.com/fluxcd/flux2-monitoring-example/blob/main/monitoring/controllers/loki-stack/release.yaml" target="_blank">values&lt;/a>
used for the chart and modify them accordingly.&lt;/p>
&lt;p>Once deployed,
&lt;a href="https://grafana.com/docs/loki/latest/" target="_blank">Loki&lt;/a> and
&lt;a href="https://grafana.com/docs/loki/latest/clients/promtail/" target="_blank">Promtail&lt;/a> Pods get created, and Loki
is added as a data source in Grafana. Promtail aggregates the logs from all the
Pods in every node and sends them to Loki. Grafana can be used to query the logs
from Loki and analyze them. Refer to the
&lt;a href="https://grafana.com/docs/loki/latest/logql/" target="_blank">LogQL docs&lt;/a> to see examples of
queries and learn more about querying logs.&lt;/p>
&lt;h3 id="grafana-dashboard">Grafana dashboard&lt;/h3>
&lt;p>The
&lt;a href="https://github.com/fluxcd/flux2-monitoring-example" target="_blank">example monitoring setup&lt;/a> provides a Grafana
dashboard in
&lt;a href="https://github.com/fluxcd/flux2-monitoring-example/tree/main/monitoring/configs/dashboards/logs.json" target="_blank">&lt;code>monitoring/configs/dashboards/logs.json&lt;/code>&lt;/a>
that queries and shows logs from all the Flux controllers.&lt;/p>
&lt;p>Control plane logs:&lt;/p>
&lt;p>&lt;img src="https://deploy-preview-2413--fluxcd.netlify.app/img/grafana-logs-dashboard.png" alt="Control plane logs dashboard">&lt;/p>
&lt;p>This can be used to browse logs from all the Flux controllers in a centralized
manner.&lt;/p></description></item><item><title>Flux: Flux events</title><link>https://deploy-preview-2413--fluxcd.netlify.app/flux/monitoring/events/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deploy-preview-2413--fluxcd.netlify.app/flux/monitoring/events/</guid><description>
&lt;p>The Flux controllers emit
&lt;a href="https://kubernetes.io/docs/reference/kubernetes-api/cluster-resources/event-v1/" target="_blank">Kubernetes events&lt;/a> during the
reconciliation operation to provide information about the object being
reconciled. Unlike logs, events are always associated with an object, which is a
Flux resource in this case. Events are supplemental data that can be used along
with logs to provide a complete picture of controllers&amp;rsquo; operations. Some of
the events emitted by Flux controllers are also used to send notifications.
See the
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/monitoring/alerts/">Alerts docs&lt;/a> to learn more about the Flux
Alerts based on events from controllers. In the following sections, we will go
through the Flux events and how to interpret them.&lt;/p>
&lt;h2 id="kubernetes-events">Kubernetes events&lt;/h2>
&lt;p>The Flux controller events about a resource contain the following fields:&lt;/p>
&lt;ul>
&lt;li>&lt;code>type&lt;/code> can be &lt;code>Normal&lt;/code> or &lt;code>Warning&lt;/code>&lt;/li>
&lt;li>&lt;code>firstTimestamp&lt;/code> timestamp in the ISO 8601 format&lt;/li>
&lt;li>&lt;code>lastTimestamp&lt;/code> timestamp in the ISO 8601 format&lt;/li>
&lt;li>&lt;code>message&lt;/code> info or warning description&lt;/li>
&lt;li>&lt;code>reason&lt;/code> short machine understandable string&lt;/li>
&lt;li>&lt;code>involvedObject&lt;/code> the API version, kind, name and namespace of the Flux object&lt;/li>
&lt;li>&lt;code>metadata.annotations&lt;/code> the Flux specific metadata e.g. source revision&lt;/li>
&lt;li>&lt;code>source.component&lt;/code> the Flux controller name where the event originated from.&lt;/li>
&lt;/ul>
&lt;h3 id="examples">Examples&lt;/h3>
&lt;p>Example of a &lt;code>Normal&lt;/code> event produced by kustomize-controller:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f0f0f0;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-json" data-lang="json">&lt;span style="display:flex;">&lt;span>{
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;kind&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;Event&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;apiVersion&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;v1&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;metadata&amp;#34;&lt;/span>: {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;name&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;flux-system.177bd633e296a292&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;namespace&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;flux-system&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;annotations&amp;#34;&lt;/span>: {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;kustomize.toolkit.fluxcd.io/revision&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;main@sha1:802723078affd3eb2a3898630261ab3ca5d6dd40&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> },
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;involvedObject&amp;#34;&lt;/span>: {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;kind&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;Kustomization&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;namespace&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;flux-system&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;name&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;flux-system&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;apiVersion&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;kustomize.toolkit.fluxcd.io/v1&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> },
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;reason&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;ReconciliationSucceeded&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;message&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;Reconciliation finished in 436.493292ms, next run in 10m0s&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;source&amp;#34;&lt;/span>: {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;component&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;kustomize-controller&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> },
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;firstTimestamp&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;2023-08-16T10:26:43Z&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;lastTimestamp&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;2023-08-16T10:26:43Z&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;type&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;Normal&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>In the above example:&lt;/p>
&lt;ul>
&lt;li>The event is about a &lt;code>Kustomization&lt;/code> named &lt;code>flux-system&lt;/code> in the &lt;code>flux-system&lt;/code>
namespace, indicated by the &lt;code>involvedObject&lt;/code> field.&lt;/li>
&lt;li>The event originates from &lt;code>kustomize-controller&lt;/code>, indicated by the
&lt;code>source.component&lt;/code> field.&lt;/li>
&lt;li>The event is a &lt;code>Normal&lt;/code> type event about a successful reconciliation,
indicated by the &lt;code>reason&lt;/code> and &lt;code>message&lt;/code> fields.&lt;/li>
&lt;li>The &lt;code>metadata.annotations&lt;/code> field &lt;code>kustomize.toolkit.fluxcd.io/revision&lt;/code>
contains information about the source revision that was successfully applied
as a result of successful reconciliation of the Kustomization.&lt;/li>
&lt;/ul>
&lt;p>Example of a &lt;code>Warning&lt;/code> event produced by source-controller:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f0f0f0;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-json" data-lang="json">&lt;span style="display:flex;">&lt;span>{
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;apiVersion&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;v1&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;count&amp;#34;&lt;/span>: &lt;span style="color:#40a070">4&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;eventTime&amp;#34;&lt;/span>: &lt;span style="color:#007020;font-weight:bold">null&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;firstTimestamp&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;2023-08-22T20:24:06Z&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;involvedObject&amp;#34;&lt;/span>: {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;apiVersion&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;source.toolkit.fluxcd.io/v1&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;kind&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;GitRepository&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;name&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;podinfo&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;namespace&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;default&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;resourceVersion&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;1284973&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;uid&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;2c2ed1da-556f-4793-863d-7d96e8bab3f5&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> },
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;kind&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;Event&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;lastTimestamp&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;2023-08-22T20:24:18Z&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;message&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;failed to checkout and determine revision: unable to clone &amp;#39;https://github.com/stefanprodan/podinfo&amp;#39;: couldn&amp;#39;t find remote ref \&amp;#34;refs/tags/v1.8.9\&amp;#34;&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;metadata&amp;#34;&lt;/span>: {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;creationTimestamp&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;2023-08-22T20:24:06Z&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;name&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;podinfo.177dce48bc7db3a4&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;namespace&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;default&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;resourceVersion&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;1285016&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;uid&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;3c8f568a-c99b-4279-8093-6ef08fae325b&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> },
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;reason&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;GitOperationFailed&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;reportingComponent&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;reportingInstance&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;source&amp;#34;&lt;/span>: {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;component&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;source-controller&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> },
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;type&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;Warning&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>In the above example:&lt;/p>
&lt;ul>
&lt;li>The event is about a &lt;code>GitRepository&lt;/code> named &lt;code>podinfo&lt;/code> in the &lt;code>default&lt;/code>
namespace, indicated by the &lt;code>involvedObject&lt;/code> field.&lt;/li>
&lt;li>The event originates from &lt;code>source-controller&lt;/code>, indicated by the
&lt;code>source.component&lt;/code> field.&lt;/li>
&lt;li>The event is a &lt;code>Warning&lt;/code> type event about a failed Git operation, indicated by
the &lt;code>reason&lt;/code> and &lt;code>message&lt;/code> fields.&lt;/li>
&lt;/ul>
&lt;h2 id="events-inspection-with-kubectl">Events inspection with kubectl&lt;/h2>
&lt;p>The events associated with a Flux resource can be queried using &lt;code>kubectl events&lt;/code>
command:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f0f0f0;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-console" data-lang="console">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#c65d09;font-weight:bold">$&lt;/span> kubectl events -n flux-system --for kustomization/flux-system
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">LAST SEEN TYPE REASON OBJECT MESSAGE
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">58m Normal ReconciliationSucceeded Kustomization/flux-system Reconciliation finished in 448.00332ms, next run in 10m0s
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">48m Normal ReconciliationSucceeded Kustomization/flux-system Reconciliation finished in 486.826649ms, next run in 10m0s
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">38m Normal ReconciliationSucceeded Kustomization/flux-system Reconciliation finished in 502.282127ms, next run in 10m0s
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">28m Normal ReconciliationSucceeded Kustomization/flux-system Reconciliation finished in 543.745587ms, next run in 10m0s
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">18m Normal ReconciliationSucceeded Kustomization/flux-system Reconciliation finished in 465.177441ms, next run in 10m0s
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">8m27s Normal ReconciliationSucceeded Kustomization/flux-system Reconciliation finished in 494.543068ms, next run in 10m0s
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>This shows all the events associated with the queried resource in an hour.&lt;/p>
&lt;h2 id="events-inspection-with-flux-cli">Events inspection with flux CLI&lt;/h2>
&lt;p>The events associated with a Flux resource can be queried using the &lt;code>flux events&lt;/code> CLI command:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f0f0f0;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-console" data-lang="console">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#c65d09;font-weight:bold">$&lt;/span> flux events --for Kustomization/flux-system
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">LAST SEEN TYPE REASON OBJECT MESSAGE
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">52m Normal ReconciliationSucceeded Kustomization/flux-system Reconciliation finished in 506.467ms, next run in 10m0s
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">42m Normal ReconciliationSucceeded Kustomization/flux-system Reconciliation finished in 531.072726ms, next run in 10m0
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">32m Normal ReconciliationSucceeded Kustomization/flux-system Reconciliation finished in 506.673992ms, next run in 10m0
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">22m Normal ReconciliationSucceeded Kustomization/flux-system Reconciliation finished in 512.255817ms, next run in 10m0
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">12m Normal ReconciliationSucceeded Kustomization/flux-system Reconciliation finished in 507.521248ms, next run in 10m0
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">2m31s Normal ReconciliationSucceeded Kustomization/flux-system Reconciliation finished in 448.00332ms, next run in 10m0s
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>This can also be used to watch all the events issues by the Flux controllers
across all the namespaces:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f0f0f0;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-console" data-lang="console">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#c65d09;font-weight:bold">$&lt;/span> flux events --all-namespaces --watch
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">NAMESPACE LAST SEEN TYPE REASON OBJECT MESSAGE
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">flux-system 34m (x3 over 154m) Normal GitOperationSucceeded GitRepository/flux-system no changes since last reconcilation: observed revision &amp;#39;main@sha1:4d768edba5d409feb60870dd3b0ac0d307299898&amp;#39;
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">flux-system 54m Normal ReconciliationSucceeded Kustomization/flux-system Reconciliation finished in 486.814878ms, next run in 10m0s
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">flux-system 44m Normal ReconciliationSucceeded Kustomization/flux-system Reconciliation finished in 486.203813ms, next run in 10m0s
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">flux-system 34m Normal ReconciliationSucceeded Kustomization/flux-system Reconciliation finished in 512.160373ms, next run in 10m0s
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">flux-system 24m Normal ReconciliationSucceeded Kustomization/flux-system Reconciliation finished in 543.806383ms, next run in 10m0s
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">flux-system 14m Normal ReconciliationSucceeded Kustomization/flux-system Reconciliation finished in 524.293527ms, next run in 10m0s
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">flux-system 4m5s Normal ReconciliationSucceeded Kustomization/flux-system Reconciliation finished in 522.671955ms, next run in 10m0s
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">flux-system 47s Normal ReconciliationSucceeded Kustomization/flux-system Reconciliation finished in 523.892245ms, next run in 10m0s
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">flux-system 34m Normal ReconciliationSucceeded Kustomization/monitoring-configs Reconciliation finished in 104.609707ms, next run in 1h0m0s
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">flux-system 42s Normal ReconciliationSucceeded Kustomization/monitoring-configs Reconciliation finished in 90.70521ms, next run in 1h0m0s
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">flux-system 34m Normal ReconciliationSucceeded Kustomization/monitoring-controllers Reconciliation finished in 118.651968ms, next run in 1h0m0s
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">flux-system 39s Normal ReconciliationSucceeded Kustomization/monitoring-controllers Reconciliation finished in 132.34839ms, next run in 1h0m0s
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">monitoring 34m (x3 over 154m) Normal ArtifactUpToDate HelmChart/monitoring-kube-prometheus-stack artifact up-to-date with remote revision: &amp;#39;48.3.3&amp;#39;
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">monitoring 34m (x3 over 154m) Normal ArtifactUpToDate HelmChart/monitoring-loki-stack artifact up-to-date with remote revision: &amp;#39;2.9.11&amp;#39;
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Refer to the
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/cmd/flux_events/">&lt;code>flux events&lt;/code>&lt;/a> CLI docs to learn more
about it.&lt;/p></description></item></channel></rss>