<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Static mode Kubernetes operator (Beta) on Grafana Labs</title><link>https://grafana.com/docs/agent/v0.43/operator/</link><description>Recent content in Static mode Kubernetes operator (Beta) on Grafana Labs</description><generator>Hugo -- gohugo.io</generator><language>en</language><atom:link href="/docs/agent/v0.43/operator/index.xml" rel="self" type="application/rss+xml"/><item><title>Install the Operator with Helm</title><link>https://grafana.com/docs/agent/v0.43/operator/helm-getting-started/</link><pubDate>Wed, 12 Mar 2025 11:45:31 +0100</pubDate><guid>https://grafana.com/docs/agent/v0.43/operator/helm-getting-started/</guid><content><![CDATA[&lt;h1 id=&#34;install-the-operator-with-helm&#34;&gt;Install the Operator with Helm&lt;/h1&gt;
&lt;p&gt;In this guide, you&amp;rsquo;ll learn how to deploy &lt;a href=&#34;./&#34;&gt;Grafana Agent Operator&lt;/a&gt; into your Kubernetes cluster using the &lt;a href=&#34;https://github.com/grafana/helm-charts/tree/main/charts/agent-operator&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;grafana-agent-operator Helm chart&lt;/a&gt;. To learn how to deploy Agent Operator without using Helm, see &lt;a href=&#34;../getting-started/&#34;&gt;Install Grafana Agent Operator&lt;/a&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: If you are shipping your data to Grafana Cloud, use &lt;a href=&#34;/docs/grafana-cloud/kubernetes-monitoring/&#34;&gt;Kubernetes Monitoring&lt;/a&gt; to set up Agent Operator. Kubernetes Monitoring provides a simplified approach and preconfigured dashboards and alerts.&lt;/p&gt;&lt;/blockquote&gt;
&lt;h2 id=&#34;before-you-begin&#34;&gt;Before you begin&lt;/h2&gt;
&lt;p&gt;To deploy Agent Operator with Helm, make sure that you have the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A Kubernetes cluster&lt;/li&gt;
&lt;li&gt;The &lt;a href=&#34;https://kubernetes.io/docs/tasks/tools/#kubectl&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;kubectl&lt;/code&gt;&lt;/a&gt; command-line client installed and configured on your machine&lt;/li&gt;
&lt;li&gt;The &lt;a href=&#34;https://helm.sh/docs/intro/install/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;helm&lt;/code&gt;&lt;/a&gt; command-line client installed and configured on your machine&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Agent Operator is currently in beta and its custom resources are subject to change.&lt;/p&gt;&lt;/blockquote&gt;
&lt;h2 id=&#34;install-the-agent-operator-helm-chart&#34;&gt;Install the Agent Operator Helm Chart&lt;/h2&gt;
&lt;p&gt;In this section, you&amp;rsquo;ll install the &lt;a href=&#34;https://github.com/grafana/helm-charts/tree/main/charts/agent-operator&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;grafana-agent-operator Helm chart&lt;/a&gt; into your Kubernetes cluster. This will install the latest version of Agent Operator and its &lt;a href=&#34;https://github.com/grafana/agent/tree/main/operations/agent-static-operator/crds&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Custom Resource Definitions&lt;/a&gt; (CRDs). The chart configures Operator to maintain a Service that lets you scrape kubelets using a &lt;code&gt;ServiceMonitor&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;To install the Agent Operator Helm chart:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Add and update the &lt;code&gt;grafana&lt;/code&gt; Helm chart repo:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;helm repo add grafana https://grafana.github.io/helm-charts
helm repo update&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Install the chart, replacing &lt;code&gt;my-release&lt;/code&gt; with your release name:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;helm install my-release grafana/grafana-agent-operator&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;If you want to modify the default parameters, you can create a &lt;code&gt;values.yaml&lt;/code&gt; file and pass it to &lt;code&gt;helm install&lt;/code&gt;:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;helm install my-release grafana/grafana-agent-operator -f values.yaml&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;If you want to deploy Agent Operator into a namespace other than &lt;code&gt;default&lt;/code&gt;, use the &lt;code&gt;-n&lt;/code&gt; flag:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;helm install my-release grafana/grafana-agent-operator -f values.yaml -n my-namespace&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;You can find a list of configurable template parameters in the &lt;a href=&#34;https://github.com/grafana/helm-charts/blob/main/charts/agent-operator/values.yaml&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Helm chart repository&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Once you&amp;rsquo;ve successfully deployed the Helm release, confirm that Agent Operator is up and running:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;kubectl get pod
kubectl get svc&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;You should see an Agent Operator Pod in &lt;code&gt;RUNNING&lt;/code&gt; state, and a &lt;code&gt;kubelet&lt;/code&gt; service. Depending on your setup, this could take a moment.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;deploy-the-grafana-agent-operator-resources&#34;&gt;Deploy the Grafana Agent Operator resources&lt;/h2&gt;
&lt;p&gt;Agent Operator is now up and running. Next, you need to install a Grafana Agent for Agent Operator to run for you. To do so, follow the instructions in the &lt;a href=&#34;../deploy-agent-operator-resources/&#34;&gt;Deploy the Grafana Agent Operator resources&lt;/a&gt; topic. To learn more about the custom resources Agent Operator provides and their hierarchy, see &lt;a href=&#34;../architecture/&#34;&gt;Grafana Agent Operator architecture&lt;/a&gt;.&lt;/p&gt;
]]></content><description>&lt;h1 id="install-the-operator-with-helm">Install the Operator with Helm&lt;/h1>
&lt;p>In this guide, you&amp;rsquo;ll learn how to deploy &lt;a href="./">Grafana Agent Operator&lt;/a> into your Kubernetes cluster using the &lt;a href="https://github.com/grafana/helm-charts/tree/main/charts/agent-operator" target="_blank" rel="noopener noreferrer">grafana-agent-operator Helm chart&lt;/a>. To learn how to deploy Agent Operator without using Helm, see &lt;a href="../getting-started/">Install Grafana Agent Operator&lt;/a>.&lt;/p></description></item><item><title>Install the Operator</title><link>https://grafana.com/docs/agent/v0.43/operator/getting-started/</link><pubDate>Wed, 12 Mar 2025 11:45:31 +0100</pubDate><guid>https://grafana.com/docs/agent/v0.43/operator/getting-started/</guid><content><![CDATA[&lt;h1 id=&#34;install-the-operator&#34;&gt;Install the Operator&lt;/h1&gt;
&lt;p&gt;In this guide, you&amp;rsquo;ll learn how to deploy &lt;a href=&#34;./&#34;&gt;Grafana Agent Operator&lt;/a&gt; into your Kubernetes cluster. This guide does not use Helm. To learn how to deploy Agent Operator using the &lt;a href=&#34;https://github.com/grafana/helm-charts/tree/main/charts/agent-operator&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;grafana-agent-operator Helm chart&lt;/a&gt;, see &lt;a href=&#34;../helm-getting-started/&#34;&gt;Install Grafana Agent Operator with Helm&lt;/a&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: If you are shipping your data to Grafana Cloud, use &lt;a href=&#34;/docs/grafana-cloud/kubernetes-monitoring/&#34;&gt;Kubernetes Monitoring&lt;/a&gt; to set up Agent Operator. Kubernetes Monitoring provides a simplified approach and preconfigured dashboards and alerts.&lt;/p&gt;&lt;/blockquote&gt;
&lt;h2 id=&#34;before-you-begin&#34;&gt;Before you begin&lt;/h2&gt;
&lt;p&gt;To deploy Agent Operator, make sure that you have the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A Kubernetes cluster&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;kubectl&lt;/code&gt; command-line client installed and configured on your machine&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Agent Operator is currently in beta and its custom resources are subject to change.&lt;/p&gt;&lt;/blockquote&gt;
&lt;h2 id=&#34;deploy-the-agent-operator-custom-resource-definitions-crds&#34;&gt;Deploy the Agent Operator Custom Resource Definitions (CRDs)&lt;/h2&gt;
&lt;p&gt;Before you can create the custom resources for a Grafana Agent deployment,
you need to deploy the
&lt;a href=&#34;https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Custom Resource Definitions&lt;/a&gt;
to the cluster. These definitions describe the schema that the custom
resources will conform to. This is also required for Grafana Agent Operator to run; it
will fail if it can&amp;rsquo;t find the Custom Resource Definitions of objects it is
looking to use. To learn more about the custom resources Agent Operator provides and their hierarchy, see &lt;a href=&#34;../architecture/&#34;&gt;Grafana Agent Operator architecture&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;You can find the set of Custom Resource Definitions for Grafana Agent Operator in the Grafana Agent repository under
&lt;a href=&#34;https://github.com/grafana/agent/tree/main/operations/agent-static-operator/crds&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;operations/agent-static-operator/crds&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;To deploy the CRDs:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Clone the agent repo and then apply the CRDs from the root of the agent repository:&lt;/p&gt;

&lt;div class=&#34;code-snippet code-snippet__mini&#34;&gt;&lt;div class=&#34;lang-toolbar__mini&#34;&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet code-snippet__border&#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-none&#34;&gt;kubectl apply -f production/operator/crds&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This step &lt;em&gt;must&lt;/em&gt; be completed before installing Agent Operator—it will
fail to start if the CRDs do not exist.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To check that the CRDs are deployed to your Kubernetes cluster and to access documentation for each resource, use &lt;code&gt;kubectl explain &amp;lt;resource&amp;gt;&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;For example, &lt;code&gt;kubectl explain GrafanaAgent&lt;/code&gt; describes the GrafanaAgent CRD, and &lt;code&gt;kubectl explain GrafanaAgent.spec&lt;/code&gt; gives you information on its spec field.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;install-grafana-agent-operator&#34;&gt;Install Grafana Agent Operator&lt;/h2&gt;
&lt;p&gt;Next, install Agent Operator by applying the Agent Operator deployment schema.&lt;/p&gt;
&lt;p&gt;To install Agent Operator:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Copy the following deployment schema to a file, updating the namespace if needed:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;YAML&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-yaml&#34;&gt;apiVersion: apps/v1
kind: Deployment
metadata:
  name: grafana-agent-operator
  namespace: default
  labels:
    app: grafana-agent-operator
spec:
  replicas: 1
  selector:
    matchLabels:
      app: grafana-agent-operator
  template:
    metadata:
      labels:
        app: grafana-agent-operator
    spec:
      serviceAccountName: grafana-agent-operator
      containers:
      - name: operator
        image: grafana/agent-operator:v0.43.4
        args:
        - --kubelet-service=default/kubelet
---

apiVersion: v1
kind: ServiceAccount
metadata:
  name: grafana-agent-operator
  namespace: default

---

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: grafana-agent-operator
rules:
- apiGroups: [monitoring.grafana.com]
  resources:
  - grafanaagents
  - metricsinstances
  - logsinstances
  - podlogs
  - integrations
  verbs: [get, list, watch]
- apiGroups: [monitoring.coreos.com]
  resources:
  - podmonitors
  - probes
  - servicemonitors
  verbs: [get, list, watch]
- apiGroups: [&amp;#34;&amp;#34;]
  resources:
  - namespaces
  - nodes
  verbs: [get, list, watch]
- apiGroups: [&amp;#34;&amp;#34;]
  resources:
  - secrets
  - services
  - configmaps
  - endpoints
  verbs: [get, list, watch, create, update, patch, delete]
- apiGroups: [&amp;#34;apps&amp;#34;]
  resources:
  - statefulsets
  - daemonsets
  - deployments
  verbs: [get, list, watch, create, update, patch, delete]

---

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: grafana-agent-operator
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: grafana-agent-operator
subjects:
- kind: ServiceAccount
  name: grafana-agent-operator
  namespace: default&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Roll out the deployment in your cluster using &lt;code&gt;kubectl apply -f&lt;/code&gt; followed by your  deployment filename.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: If you want to run Agent Operator locally, make sure your kubectl context is correct. Running locally uses your current kubectl context. If it is set to your production environment, you could accidentally deploy a new Grafana Agent to production. Install CRDs on the cluster prior to running locally. Afterwards, you can run Agent Operator using &lt;code&gt;go run ./cmd/grafana-agent-operator&lt;/code&gt;.&lt;/p&gt;&lt;/blockquote&gt;
&lt;h2 id=&#34;deploy-the-grafana-agent-operator-resources&#34;&gt;Deploy the Grafana Agent Operator resources&lt;/h2&gt;
&lt;p&gt;Agent Operator is now up and running. Next, you need to install a Grafana Agent for Agent Operator to run for you. To do so, follow the instructions in the &lt;a href=&#34;../deploy-agent-operator-resources/&#34;&gt;Deploy the Grafana Agent Operator resources&lt;/a&gt; topic.&lt;/p&gt;
]]></content><description>&lt;h1 id="install-the-operator">Install the Operator&lt;/h1>
&lt;p>In this guide, you&amp;rsquo;ll learn how to deploy &lt;a href="./">Grafana Agent Operator&lt;/a> into your Kubernetes cluster. This guide does not use Helm. To learn how to deploy Agent Operator using the &lt;a href="https://github.com/grafana/helm-charts/tree/main/charts/agent-operator" target="_blank" rel="noopener noreferrer">grafana-agent-operator Helm chart&lt;/a>, see &lt;a href="../helm-getting-started/">Install Grafana Agent Operator with Helm&lt;/a>.&lt;/p></description></item><item><title>Deploy Operator resources</title><link>https://grafana.com/docs/agent/v0.43/operator/deploy-agent-operator-resources/</link><pubDate>Wed, 12 Mar 2025 11:45:31 +0100</pubDate><guid>https://grafana.com/docs/agent/v0.43/operator/deploy-agent-operator-resources/</guid><content><![CDATA[&lt;h1 id=&#34;deploy-operator-resources&#34;&gt;Deploy Operator resources&lt;/h1&gt;
&lt;p&gt;To start collecting telemetry data, you need to roll out Grafana Agent Operator custom resources into your Kubernetes cluster. Before you can create the custom resources, you must first apply the Agent Custom Resource Definitions (CRDs) and install Agent Operator, with or without Helm. If you haven&amp;rsquo;t yet taken these steps, follow the instructions in one of the following topics:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;../getting-started/&#34;&gt;Install Agent Operator&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;../helm-getting-started/&#34;&gt;Install Agent Operator with Helm&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Follow the steps in this guide to roll out the Grafana Agent Operator custom resources to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Scrape and ship cAdvisor and kubelet metrics to a Prometheus-compatible metrics endpoint.&lt;/li&gt;
&lt;li&gt;Collect and ship your Pods’ container logs to a Loki-compatible logs endpoint.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The hierarchy of custom resources is as follows:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;GrafanaAgent&lt;/code&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;MetricsInstance&lt;/code&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;PodMonitor&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Probe&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ServiceMonitor&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;code&gt;LogsInstance&lt;/code&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;PodLogs&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To learn more about the custom resources Agent Operator provides and their hierarchy, see &lt;a href=&#34;../architecture/&#34;&gt;Grafana Agent Operator architecture&lt;/a&gt;.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Agent Operator is currently in &lt;a href=&#34;../../stability/#beta&#34;&gt;beta&lt;/a&gt; and its custom resources are subject to change.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;h2 id=&#34;before-you-begin&#34;&gt;Before you begin&lt;/h2&gt;
&lt;p&gt;Before you begin, make sure that you have deployed the Grafana Agent Operator CRDs and installed Agent Operator into your cluster. See &lt;a href=&#34;../helm-getting-started/&#34;&gt;Install Grafana Agent Operator with Helm&lt;/a&gt; or &lt;a href=&#34;../getting-started/&#34;&gt;Install Grafana Agent Operator&lt;/a&gt; for instructions.&lt;/p&gt;
&lt;h2 id=&#34;deploy-the-grafanaagent-resource&#34;&gt;Deploy the GrafanaAgent resource&lt;/h2&gt;
&lt;p&gt;In this section, you&amp;rsquo;ll roll out a &lt;code&gt;GrafanaAgent&lt;/code&gt; resource. See &lt;a href=&#34;../architecture/&#34;&gt;Grafana Agent Operator architecture&lt;/a&gt; for a discussion of the resources in the &lt;code&gt;GrafanaAgent&lt;/code&gt; resource hierarchy.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Due to the variety of possible deployment architectures, the official Agent Operator Helm chart does not provide built-in templates for the custom resources described in this guide. You must configure and deploy these manually as described in this section. We recommend templating and adding the following manifests to your own in-house Helm charts and GitOps flows.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;p&gt;To deploy the &lt;code&gt;GrafanaAgent&lt;/code&gt; resource:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Copy the following manifests to a file:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;YAML&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-yaml&#34;&gt;apiVersion: monitoring.grafana.com/v1alpha1
kind: GrafanaAgent
metadata:
  name: grafana-agent
  namespace: default
  labels:
    app: grafana-agent
spec:
  image: grafana/agent:v0.43.4
  integrations:
    selector:
      matchLabels:
          agent: grafana-agent-integrations
  logLevel: info
  serviceAccountName: grafana-agent
  metrics:
    instanceSelector:
      matchLabels:
        agent: grafana-agent-metrics
    externalLabels:
      cluster: cloud

  logs:
    instanceSelector:
      matchLabels:
        agent: grafana-agent-logs

---

apiVersion: v1
kind: ServiceAccount
metadata:
  name: grafana-agent
  namespace: default

---

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: grafana-agent
rules:
- apiGroups:
  - &amp;#34;&amp;#34;
  resources:
  - nodes
  - nodes/proxy
  - nodes/metrics
  - services
  - endpoints
  - pods
  - events
  verbs:
  - get
  - list
  - watch
- apiGroups:
  - networking.k8s.io
  resources:
  - ingresses
  verbs:
  - get
  - list
  - watch
- nonResourceURLs:
  - /metrics
  - /metrics/cadvisor
  verbs:
  - get

---

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: grafana-agent
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: grafana-agent
subjects:
- kind: ServiceAccount
  name: grafana-agent
  namespace: default&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;In the first manifest, the &lt;code&gt;GrafanaAgent&lt;/code&gt; resource:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Specifies an Agent image version.&lt;/li&gt;
&lt;li&gt;Specifies &lt;code&gt;MetricsInstance&lt;/code&gt; and &lt;code&gt;LogsInstance&lt;/code&gt; selectors. These search for &lt;code&gt;MetricsInstances&lt;/code&gt; and &lt;code&gt;LogsInstances&lt;/code&gt; in the same namespace with labels matching &lt;code&gt;agent: grafana-agent-metrics&lt;/code&gt; and &lt;code&gt;agent: grafana-agent-logs&lt;/code&gt;, respectively.&lt;/li&gt;
&lt;li&gt;Sets a &lt;code&gt;cluster: cloud&lt;/code&gt; label for all metrics shipped to your Prometheus-compatible endpoint. Change this label to your cluster name. To search for &lt;code&gt;MetricsInstances&lt;/code&gt; or &lt;code&gt;LogsInstances&lt;/code&gt; in a &lt;em&gt;different&lt;/em&gt; namespace, use the &lt;code&gt;instanceNamespaceSelector&lt;/code&gt; field. To learn more about this field, see the &lt;code&gt;GrafanaAgent&lt;/code&gt; &lt;a href=&#34;https://github.com/grafana/agent/tree/main/operations/agent-static-operator/crds/monitoring.grafana.com_grafanaagents.yaml&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;CRD specification&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Customize the manifests as needed and roll them out to your cluster using &lt;code&gt;kubectl apply -f&lt;/code&gt; followed by the filename.&lt;/p&gt;
&lt;p&gt;This step creates a &lt;code&gt;ServiceAccount&lt;/code&gt;, &lt;code&gt;ClusterRole&lt;/code&gt;, and &lt;code&gt;ClusterRoleBinding&lt;/code&gt; for the &lt;code&gt;GrafanaAgent&lt;/code&gt; resource.&lt;/p&gt;
&lt;p&gt;Deploying a &lt;code&gt;GrafanaAgent&lt;/code&gt; resource on its own does not spin up Agent Pods. Agent Operator creates Agent Pods once &lt;code&gt;MetricsInstance&lt;/code&gt; and &lt;code&gt;LogsIntance&lt;/code&gt; resources have been created. Follow the instructions in the &lt;a href=&#34;#deploy-a-metricsinstance-resource&#34;&gt;Deploy a MetricsInstance resource&lt;/a&gt; and &lt;a href=&#34;#deploy-logsinstance-and-podlogs-resources&#34;&gt;Deploy LogsInstance and PodLogs resources&lt;/a&gt; sections to create these resources.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&#34;disable-feature-flags-reporting&#34;&gt;Disable feature flags reporting&lt;/h3&gt;
&lt;p&gt;To disable the &lt;a href=&#34;../../static/configuration/flags/#report-information-usage&#34;&gt;reporting&lt;/a&gt; usage of feature flags to Grafana, set &lt;code&gt;disableReporting&lt;/code&gt; field to &lt;code&gt;true&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&#34;disable-support-bundle-generation&#34;&gt;Disable support bundle generation&lt;/h3&gt;
&lt;p&gt;To disable the &lt;a href=&#34;../../static/configuration/flags/#support-bundles&#34;&gt;support bundles functionality&lt;/a&gt;, set the &lt;code&gt;disableSupportBundle&lt;/code&gt; field to &lt;code&gt;true&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&#34;deploy-a-metricsinstance-resource&#34;&gt;Deploy a MetricsInstance resource&lt;/h2&gt;
&lt;p&gt;Next, you&amp;rsquo;ll roll out a &lt;code&gt;MetricsInstance&lt;/code&gt; resource. &lt;code&gt;MetricsInstance&lt;/code&gt; resources define a &lt;code&gt;remote_write&lt;/code&gt; sink for metrics and configure one or more selectors to watch for creation and updates to &lt;code&gt;*Monitor&lt;/code&gt; objects. These objects allow you to define Agent scrape targets via Kubernetes manifests:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#servicemonitor&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;ServiceMonitors&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#podmonitor&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;PodMonitors&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#probe&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Probes&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To deploy a &lt;code&gt;MetricsInstance&lt;/code&gt; resource:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Copy the following manifest to a file:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;YAML&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-yaml&#34;&gt;apiVersion: monitoring.grafana.com/v1alpha1
kind: MetricsInstance
metadata:
  name: primary
  namespace: default
  labels:
    agent: grafana-agent-metrics
spec:
  remoteWrite:
  - url: your_remote_write_URL
    basicAuth:
      username:
        name: primary-credentials-metrics
        key: username
      password:
        name: primary-credentials-metrics
        key: password

  # Supply an empty namespace selector to look in all namespaces. Remove
  # this to only look in the same namespace as the MetricsInstance CR
  serviceMonitorNamespaceSelector: {}
  serviceMonitorSelector:
    matchLabels:
      instance: primary

  # Supply an empty namespace selector to look in all namespaces. Remove
  # this to only look in the same namespace as the MetricsInstance CR.
  podMonitorNamespaceSelector: {}
  podMonitorSelector:
    matchLabels:
      instance: primary

  # Supply an empty namespace selector to look in all namespaces. Remove
  # this to only look in the same namespace as the MetricsInstance CR.
  probeNamespaceSelector: {}
  probeSelector:
    matchLabels:
      instance: primary&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Replace the &lt;code&gt;remote_write&lt;/code&gt; URL and customize the namespace and label configuration as necessary.&lt;/p&gt;
&lt;p&gt;This step associates the &lt;code&gt;MetricsInstance&lt;/code&gt; resource with the &lt;code&gt;agent: grafana-agent&lt;/code&gt; &lt;code&gt;GrafanaAgent&lt;/code&gt; resource deployed in the previous step. The &lt;code&gt;MetricsInstance&lt;/code&gt; resource watches for creation and updates to &lt;code&gt;*Monitors&lt;/code&gt; with the &lt;code&gt;instance: primary&lt;/code&gt; label.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Once you&amp;rsquo;ve rolled out the manifest, create the &lt;code&gt;basicAuth&lt;/code&gt; credentials &lt;a href=&#34;https://kubernetes.io/docs/tasks/configmap-secret/managing-secret-using-config-file/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;using a Kubernetes Secret&lt;/a&gt;:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;YAML&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-yaml&#34;&gt;apiVersion: v1
kind: Secret
metadata:
  name: primary-credentials-metrics
  namespace: default
stringData:
  username: &amp;#39;your_cloud_prometheus_username&amp;#39;
  password: &amp;#39;your_cloud_prometheus_API_key&amp;#39;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;If you&amp;rsquo;re using Grafana Cloud, you can find your hosted Loki endpoint username and password by clicking &lt;strong&gt;Details&lt;/strong&gt; on the Loki tile on the &lt;a href=&#34;/profile/org&#34;&gt;Grafana Cloud Portal&lt;/a&gt;. If you want to base64-encode these values yourself, use &lt;code&gt;data&lt;/code&gt; instead of &lt;code&gt;stringData&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Once you&amp;rsquo;ve rolled out the &lt;code&gt;MetricsInstance&lt;/code&gt; and its Secret, you can confirm that the &lt;code&gt;MetricsInstance&lt;/code&gt; Agent is up and running using &lt;code&gt;kubectl get pod&lt;/code&gt;. Since you haven&amp;rsquo;t defined any monitors yet, this Agent doesn&amp;rsquo;t have any scrape targets defined. In the next section, you&amp;rsquo;ll create scrape targets for the cAdvisor and kubelet endpoints exposed by the &lt;code&gt;kubelet&lt;/code&gt; service in the cluster.&lt;/p&gt;
&lt;h2 id=&#34;create-servicemonitors-for-kubelet-and-cadvisor-endpoints&#34;&gt;Create ServiceMonitors for kubelet and cAdvisor endpoints&lt;/h2&gt;
&lt;p&gt;Next, you&amp;rsquo;ll create ServiceMonitors for kubelet and cAdvisor metrics exposed by the &lt;code&gt;kubelet&lt;/code&gt; service. Every Node in your cluster exposes kubelet and cAdvisor metrics at &lt;code&gt;/metrics&lt;/code&gt; and &lt;code&gt;/metrics/cadvisor&lt;/code&gt;, respectively. Agent Operator creates a &lt;code&gt;kubelet&lt;/code&gt; service that exposes these Node endpoints so that they can be scraped using ServiceMonitors.&lt;/p&gt;
&lt;p&gt;To scrape the kubelet and cAdvisor endpoints:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Copy the following kubelet ServiceMonitor manifest to a file, then roll it out in your cluster using &lt;code&gt;kubectl apply -f&lt;/code&gt; followed by the filename.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;YAML&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-yaml&#34;&gt;apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  labels:
    instance: primary
  name: kubelet-monitor
  namespace: default
spec:
  endpoints:
  - bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
    honorLabels: true
    interval: 60s
    metricRelabelings:
    - action: keep
      regex: kubelet_cgroup_manager_duration_seconds_count|go_goroutines|kubelet_pod_start_duration_seconds_count|kubelet_runtime_operations_total|kubelet_pleg_relist_duration_seconds_bucket|volume_manager_total_volumes|kubelet_volume_stats_capacity_bytes|container_cpu_usage_seconds_total|container_network_transmit_bytes_total|kubelet_runtime_operations_errors_total|container_network_receive_bytes_total|container_memory_swap|container_network_receive_packets_total|container_cpu_cfs_periods_total|container_cpu_cfs_throttled_periods_total|kubelet_running_pod_count|node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate|container_memory_working_set_bytes|storage_operation_errors_total|kubelet_pleg_relist_duration_seconds_count|kubelet_running_pods|rest_client_request_duration_seconds_bucket|process_resident_memory_bytes|storage_operation_duration_seconds_count|kubelet_running_containers|kubelet_runtime_operations_duration_seconds_bucket|kubelet_node_config_error|kubelet_cgroup_manager_duration_seconds_bucket|kubelet_running_container_count|kubelet_volume_stats_available_bytes|kubelet_volume_stats_inodes|container_memory_rss|kubelet_pod_worker_duration_seconds_count|kubelet_node_name|kubelet_pleg_relist_interval_seconds_bucket|container_network_receive_packets_dropped_total|kubelet_pod_worker_duration_seconds_bucket|container_start_time_seconds|container_network_transmit_packets_dropped_total|process_cpu_seconds_total|storage_operation_duration_seconds_bucket|container_memory_cache|container_network_transmit_packets_total|kubelet_volume_stats_inodes_used|up|rest_client_requests_total
      sourceLabels:
      - __name__
    port: https-metrics
    relabelings:
    - sourceLabels:
      - __metrics_path__
      targetLabel: metrics_path
    - action: replace
      targetLabel: job
      replacement: integrations/kubernetes/kubelet
    scheme: https
    tlsConfig:
      insecureSkipVerify: true
  namespaceSelector:
    matchNames:
    - default
  selector:
    matchLabels:
      app.kubernetes.io/name: kubelet&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Copy the following cAdvisor ServiceMonitor manifest to a file, then roll it out in your cluster using &lt;code&gt;kubectl apply -f&lt;/code&gt; followed by the filename.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;YAML&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-yaml&#34;&gt;apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  labels:
    instance: primary
  name: cadvisor-monitor
  namespace: default
spec:
  endpoints:
  - bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
    honorLabels: true
    honorTimestamps: false
    interval: 60s
    metricRelabelings:
    - action: keep
      regex: kubelet_cgroup_manager_duration_seconds_count|go_goroutines|kubelet_pod_start_duration_seconds_count|kubelet_runtime_operations_total|kubelet_pleg_relist_duration_seconds_bucket|volume_manager_total_volumes|kubelet_volume_stats_capacity_bytes|container_cpu_usage_seconds_total|container_network_transmit_bytes_total|kubelet_runtime_operations_errors_total|container_network_receive_bytes_total|container_memory_swap|container_network_receive_packets_total|container_cpu_cfs_periods_total|container_cpu_cfs_throttled_periods_total|kubelet_running_pod_count|node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate|container_memory_working_set_bytes|storage_operation_errors_total|kubelet_pleg_relist_duration_seconds_count|kubelet_running_pods|rest_client_request_duration_seconds_bucket|process_resident_memory_bytes|storage_operation_duration_seconds_count|kubelet_running_containers|kubelet_runtime_operations_duration_seconds_bucket|kubelet_node_config_error|kubelet_cgroup_manager_duration_seconds_bucket|kubelet_running_container_count|kubelet_volume_stats_available_bytes|kubelet_volume_stats_inodes|container_memory_rss|kubelet_pod_worker_duration_seconds_count|kubelet_node_name|kubelet_pleg_relist_interval_seconds_bucket|container_network_receive_packets_dropped_total|kubelet_pod_worker_duration_seconds_bucket|container_start_time_seconds|container_network_transmit_packets_dropped_total|process_cpu_seconds_total|storage_operation_duration_seconds_bucket|container_memory_cache|container_network_transmit_packets_total|kubelet_volume_stats_inodes_used|up|rest_client_requests_total
      sourceLabels:
      - __name__
    path: /metrics/cadvisor
    port: https-metrics
    relabelings:
    - sourceLabels:
      - __metrics_path__
      targetLabel: metrics_path
    - action: replace
      targetLabel: job
      replacement: integrations/kubernetes/cadvisor
    scheme: https
    tlsConfig:
      insecureSkipVerify: true
  namespaceSelector:
    matchNames:
    - default
  selector:
    matchLabels:
      app.kubernetes.io/name: kubelet&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;These two ServiceMonitors configure Agent to scrape all the kubelet and cAdvisor endpoints in your Kubernetes cluster (one of each per Node). In addition, it defines a &lt;code&gt;job&lt;/code&gt; label which you can update (it is preset here for compatibility with Grafana Cloud&amp;rsquo;s Kubernetes integration). It also provides an allowlist containing a core set of Kubernetes metrics to reduce remote metrics usage. If you don&amp;rsquo;t need this allowlist, you can omit it, however, your metrics usage will increase significantly.&lt;/p&gt;
&lt;p&gt;When you&amp;rsquo;re done, Agent should now be shipping kubelet and cAdvisor metrics to your remote Prometheus endpoint. To check this in Grafana Cloud, go to your dashboards, select &lt;strong&gt;Integration - Kubernetes&lt;/strong&gt;, then select &lt;strong&gt;Kubernetes / Kubelet&lt;/strong&gt;.&lt;/p&gt;
&lt;h2 id=&#34;deploy-logsinstance-and-podlogs-resources&#34;&gt;Deploy LogsInstance and PodLogs resources&lt;/h2&gt;
&lt;p&gt;Next, you&amp;rsquo;ll deploy a &lt;code&gt;LogsInstance&lt;/code&gt; resource to collect logs from your cluster Nodes and ship these to your remote Loki endpoint. Agent Operator deploys a DaemonSet of Agents in your cluster that will tail log files defined in &lt;code&gt;PodLogs&lt;/code&gt; resources.&lt;/p&gt;
&lt;p&gt;To deploy the &lt;code&gt;LogsInstance&lt;/code&gt; resource into your cluster:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Copy the following manifest to a file, then roll it out in your cluster using &lt;code&gt;kubectl apply -f&lt;/code&gt; followed by the filename.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;YAML&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-yaml&#34;&gt;apiVersion: monitoring.grafana.com/v1alpha1
kind: LogsInstance
metadata:
  name: primary
  namespace: default
  labels:
    agent: grafana-agent-logs
spec:
  clients:
  - url: your_remote_logs_URL
    basicAuth:
      username:
        name: primary-credentials-logs
        key: username
      password:
        name: primary-credentials-logs
        key: password

  # Supply an empty namespace selector to look in all namespaces. Remove
  # this to only look in the same namespace as the LogsInstance CR
  podLogsNamespaceSelector: {}
  podLogsSelector:
    matchLabels:
      instance: primary&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This &lt;code&gt;LogsInstance&lt;/code&gt; picks up &lt;code&gt;PodLogs&lt;/code&gt; resources with the &lt;code&gt;instance: primary&lt;/code&gt; label. Be sure to set the Loki URL to the correct push endpoint. For Grafana Cloud, this will look similar to &lt;code&gt;logs-prod-us-central1.grafana.net/loki/api/v1/push&lt;/code&gt;, however check the &lt;a href=&#34;/profile/org&#34;&gt;Grafana Cloud Portal&lt;/a&gt; to confirm by clicking &lt;strong&gt;Details&lt;/strong&gt; on the Loki tile.&lt;/p&gt;
&lt;p&gt;Also note that this example uses the &lt;code&gt;agent: grafana-agent-logs&lt;/code&gt; label, which associates this &lt;code&gt;LogsInstance&lt;/code&gt; with the &lt;code&gt;GrafanaAgent&lt;/code&gt; resource defined earlier. This means that it will inherit requests, limits, affinities and other properties defined in the &lt;code&gt;GrafanaAgent&lt;/code&gt; custom resource.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To create the Secret for the &lt;code&gt;LogsInstance&lt;/code&gt; resource, copy the following Secret manifest to a file, then roll it out in your cluster using &lt;code&gt;kubectl apply -f&lt;/code&gt; followed by the filename.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;YAML&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-yaml&#34;&gt;apiVersion: v1
kind: Secret
metadata:
  name: primary-credentials-logs
  namespace: default
stringData:
  username: &amp;#39;your_username_here&amp;#39;
  password: &amp;#39;your_password_here&amp;#39;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;If you&amp;rsquo;re using Grafana Cloud, you can find your hosted Loki endpoint username and password by clicking &lt;strong&gt;Details&lt;/strong&gt; on the Loki tile on the &lt;a href=&#34;/profile/org&#34;&gt;Grafana Cloud Portal&lt;/a&gt;. If you want to base64-encode these values yourself, use &lt;code&gt;data&lt;/code&gt; instead of &lt;code&gt;stringData&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Copy the following &lt;code&gt;PodLogs&lt;/code&gt; manifest to a file, then roll it to your cluster using &lt;code&gt;kubectl apply -f&lt;/code&gt; followed by the filename. The manifest defines your logging targets. Agent Operator  turns this into Agent configuration for the logs subsystem, and rolls it out to the DaemonSet of logging Agents.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;The following is a minimal working example which you should adapt to your production needs.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;


&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;YAML&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-yaml&#34;&gt;apiVersion: monitoring.grafana.com/v1alpha1
kind: PodLogs
metadata:
  labels:
    instance: primary
  name: kubernetes-pods
  namespace: default
spec:
  pipelineStages:
    - docker: {}
  namespaceSelector:
    matchNames:
    - default
  selector:
    matchLabels: {}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This example tails container logs for all Pods in the &lt;code&gt;default&lt;/code&gt; namespace. You can restrict the set of matched Pods by using the &lt;code&gt;matchLabels&lt;/code&gt; selector. You can also set additional &lt;code&gt;pipelineStages&lt;/code&gt; and create &lt;code&gt;relabelings&lt;/code&gt; to add or modify log line labels. To learn more about the &lt;code&gt;PodLogs&lt;/code&gt; specification and available resource fields, see the &lt;a href=&#34;https://github.com/grafana/agent/tree/main/operations/agent-static-operator/crds/monitoring.grafana.com_podlogs.yaml&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;PodLogs CRD&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The above &lt;code&gt;PodLogs&lt;/code&gt; resource adds the following labels to log lines:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;namespace&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;service&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;pod&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;container&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;job&lt;/code&gt; (set to &lt;code&gt;PodLogs_namespace/PodLogs_name&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__path__&lt;/code&gt; (the path to log files, set to &lt;code&gt;/var/log/pods/*$1/*.log&lt;/code&gt; where &lt;code&gt;$1&lt;/code&gt; is &lt;code&gt;__meta_kubernetes_pod_uid/__meta_kubernetes_pod_container_name&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To learn more about this configuration format and other available labels, see the &lt;a href=&#34;/docs/loki/latest/clients/promtail/scraping/#promtail-scraping-service-discovery&#34;&gt;Promtail Scraping&lt;/a&gt; documentation. Agent Operator loads this configuration into the &lt;code&gt;LogsInstance&lt;/code&gt; agents automatically.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The DaemonSet of logging agents should be tailing your container logs, applying  default labels to the log lines, and shipping them to your remote Loki endpoint.&lt;/p&gt;
&lt;h2 id=&#34;summary&#34;&gt;Summary&lt;/h2&gt;
&lt;p&gt;You&amp;rsquo;ve now rolled out the following into your cluster:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A &lt;code&gt;GrafanaAgent&lt;/code&gt; resource that discovers one or more &lt;code&gt;MetricsInstance&lt;/code&gt; and &lt;code&gt;LogsInstances&lt;/code&gt; resources.&lt;/li&gt;
&lt;li&gt;A &lt;code&gt;MetricsInstance&lt;/code&gt; resource that defines where to ship collected metrics.&lt;/li&gt;
&lt;li&gt;A &lt;code&gt;ServiceMonitor&lt;/code&gt; resource to collect cAdvisor and kubelet metrics.&lt;/li&gt;
&lt;li&gt;A &lt;code&gt;LogsInstance&lt;/code&gt; resource that defines where to ship collected logs.&lt;/li&gt;
&lt;li&gt;A &lt;code&gt;PodLogs&lt;/code&gt; resource to collect container logs from Kubernetes Pods.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;whats-next&#34;&gt;What&amp;rsquo;s next&lt;/h2&gt;
&lt;p&gt;You can verify that everything is working correctly by navigating to your Grafana instance and querying your Loki and Prometheus data sources.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Tip: You can deploy multiple GrafanaAgent resources to isolate allocated resources to the agent pods. By default, the GrafanaAgent resource determines the resources of all deployed agent containers. However, you might want different memory limits for metrics versus logs.&lt;/p&gt;&lt;/blockquote&gt;
]]></content><description>&lt;h1 id="deploy-operator-resources">Deploy Operator resources&lt;/h1>
&lt;p>To start collecting telemetry data, you need to roll out Grafana Agent Operator custom resources into your Kubernetes cluster. Before you can create the custom resources, you must first apply the Agent Custom Resource Definitions (CRDs) and install Agent Operator, with or without Helm. If you haven&amp;rsquo;t yet taken these steps, follow the instructions in one of the following topics:&lt;/p></description></item><item><title>Architecture</title><link>https://grafana.com/docs/agent/v0.43/operator/architecture/</link><pubDate>Wed, 12 Mar 2025 11:45:31 +0100</pubDate><guid>https://grafana.com/docs/agent/v0.43/operator/architecture/</guid><content><![CDATA[&lt;h1 id=&#34;architecture&#34;&gt;Architecture&lt;/h1&gt;
&lt;p&gt;Grafana Agent Operator works by watching for Kubernetes &lt;a href=&#34;https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;custom resources&lt;/a&gt; that specify how to collect telemetry data from your Kubernetes cluster and where to send it. Agent Operator manages corresponding Grafana Agent deployments in your cluster by watching for changes against the custom resources.&lt;/p&gt;
&lt;p&gt;Grafana Agent Operator works in two phases—it discovers a hierarchy of custom resources and it reconciles that hierarchy into a Grafana Agent deployment.&lt;/p&gt;
&lt;h2 id=&#34;custom-resource-hierarchy&#34;&gt;Custom resource hierarchy&lt;/h2&gt;
&lt;p&gt;The root of the custom resource hierarchy is the &lt;code&gt;GrafanaAgent&lt;/code&gt; resource—the primary resource Agent Operator looks for. &lt;code&gt;GrafanaAgent&lt;/code&gt; is called the &lt;em&gt;root&lt;/em&gt; because it
discovers other sub-resources, &lt;code&gt;MetricsInstance&lt;/code&gt; and &lt;code&gt;LogsInstance&lt;/code&gt;. The &lt;code&gt;GrafanaAgent&lt;/code&gt; resource endows them with Pod attributes defined in the GrafanaAgent specification, for example, Pod requests, limits, affinities, and tolerations, and defines the Grafana Agent image. You can only define Pod attributes at the &lt;code&gt;GrafanaAgent&lt;/code&gt; level. They are propagated to MetricsInstance and LogsInstance Pods.&lt;/p&gt;
&lt;p&gt;The full hierarchy of custom resources is as follows:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;GrafanaAgent&lt;/code&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;MetricsInstance&lt;/code&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;PodMonitor&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Probe&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ServiceMonitor&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;code&gt;LogsInstance&lt;/code&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;PodLogs&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The following table describes these custom resources:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Custom resource&lt;/th&gt;
              &lt;th&gt;description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;GrafanaAgent&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Discovers one or more &lt;code&gt;MetricsInstance&lt;/code&gt; and &lt;code&gt;LogsInstance&lt;/code&gt; resources.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;MetricsInstance&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Defines where to ship collected metrics. This rolls out a Grafana Agent StatefulSet that will scrape and ship metrics to a &lt;code&gt;remote_write&lt;/code&gt; endpoint.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;ServiceMonitor&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Collects &lt;a href=&#34;https://github.com/google/cadvisor&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;cAdvisor&lt;/a&gt; and &lt;a href=&#34;https://github.com/kubernetes/kube-state-metrics&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;kubelet metrics&lt;/a&gt;. This configures the &lt;code&gt;MetricsInstance&lt;/code&gt; / Agent StatefulSet&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;LogsInstance&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Defines where to ship collected logs. This rolls out a Grafana Agent &lt;a href=&#34;https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;DaemonSet&lt;/a&gt; that will tail log files on your cluster nodes.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;PodLogs&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Collects container logs from Kubernetes Pods. This configures the &lt;code&gt;LogsInstance&lt;/code&gt; / Agent DaemonSet.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;Most of the Grafana Agent Operator resources have the ability to reference a &lt;a href=&#34;https://kubernetes.io/docs/concepts/configuration/configmap/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;ConfigMap&lt;/a&gt; or a
&lt;a href=&#34;https://kubernetes.io/docs/concepts/configuration/secret/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Secret&lt;/a&gt;. All referenced ConfigMaps or Secrets are added into the resource
hierarchy.&lt;/p&gt;
&lt;p&gt;When a hierarchy is established, each item is watched for changes. Any changed
item causes a reconcile of the root &lt;code&gt;GrafanaAgent&lt;/code&gt; resource, either
creating, modifying, or deleting the corresponding Grafana Agent deployment.&lt;/p&gt;
&lt;p&gt;A single resource can belong to multiple hierarchies. For example, if two
&lt;code&gt;GrafanaAgents&lt;/code&gt; use the same Probe, modifying that Probe causes both
&lt;code&gt;GrafanaAgents&lt;/code&gt; to be reconciled.&lt;/p&gt;
&lt;p&gt;To set up monitoring, Grafana Agent Operator works in the following two phases:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Builds (discovers) a hierarchy of custom resources.&lt;/li&gt;
&lt;li&gt;Reconciles that hierarchy into a Grafana Agent deployment.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Agent Operator also performs &lt;a href=&#34;#sharding-and-replication&#34;&gt;sharding and replication&lt;/a&gt; and adds &lt;a href=&#34;#added-labels&#34;&gt;labels&lt;/a&gt; to every metric.&lt;/p&gt;
&lt;h2 id=&#34;how-agent-operator-builds-the-custom-resource-hierarchy&#34;&gt;How Agent Operator builds the custom resource hierarchy&lt;/h2&gt;
&lt;p&gt;Grafana Agent Operator builds the hierarchy using label matching on the custom resources. The following figure illustrates the matching. The &lt;code&gt;GrafanaAgent&lt;/code&gt; picks up the &lt;code&gt;MetricsInstance&lt;/code&gt;
and &lt;code&gt;LogsInstance&lt;/code&gt; that match the label &lt;code&gt;instance: primary&lt;/code&gt;. The instances pick up the resources the same way.&lt;/p&gt;
&lt;figure
    class=&#34;figure-wrapper figure-wrapper__lightbox w-100p float-right&#34;
    style=&#34;max-width: px;&#34;
    itemprop=&#34;associatedMedia&#34;
    itemscope=&#34;&#34;
    itemtype=&#34;http://schema.org/ImageObject&#34;
  &gt;&lt;a
        class=&#34;lightbox-link&#34;
        href=&#34;../../assets/hierarchy.svg&#34;
        itemprop=&#34;contentUrl&#34;
      &gt;&lt;div class=&#34;img-wrapper w-100p h-auto&#34;&gt;&lt;img
          class=&#34;lazyload &#34;
          data-src=&#34;../../assets/hierarchy.svg&#34;alt=&#34;&#34;/&gt;
        &lt;noscript&gt;
          &lt;img
            src=&#34;../../assets/hierarchy.svg&#34;
            alt=&#34;&#34;class=&#34;float-right&#34;/&gt;
        &lt;/noscript&gt;&lt;/div&gt;&lt;/a&gt;&lt;/figure&gt;
&lt;h3 id=&#34;to-validate-the-secrets&#34;&gt;To validate the Secrets&lt;/h3&gt;
&lt;p&gt;The generated configurations are saved in Secrets. To download and
validate them manually, use the following commands:&lt;/p&gt;

&lt;div class=&#34;code-snippet code-snippet__mini&#34;&gt;&lt;div class=&#34;lang-toolbar__mini&#34;&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet code-snippet__border&#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-none&#34;&gt;$ kubectl get secrets &amp;lt;???&amp;gt;-logs-config -o json | jq -r &amp;#39;.data.&amp;#34;agent.yml&amp;#34;&amp;#39; | base64 --decode
$ kubectl get secrets &amp;lt;???&amp;gt;-config -o json | jq -r &amp;#39;.data.&amp;#34;agent.yml&amp;#34;&amp;#39; | base64 --decode&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;how-agent-operator-reconciles-the-custom-resource-hierarchy&#34;&gt;How Agent Operator reconciles the custom resource hierarchy&lt;/h2&gt;
&lt;p&gt;When a resource hierarchy is created, updated, or deleted, a reconcile occurs.
When a &lt;code&gt;GrafanaAgent&lt;/code&gt; resource is deleted, the corresponding Grafana Agent
deployment will also be deleted.&lt;/p&gt;
&lt;p&gt;Reconciling creates the following cluster resources:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;A Secret that holds the Grafana Agent
&lt;a href=&#34;../../static/configuration/&#34;&gt;configuration&lt;/a&gt; is generated.&lt;/li&gt;
&lt;li&gt;A Secret that holds all referenced Secrets or ConfigMaps from
the resource hierarchy is generated. This ensures that Secrets referenced from a custom
resource in another namespace can still be read.&lt;/li&gt;
&lt;li&gt;A Service is created to govern the StatefulSets that are generated.&lt;/li&gt;
&lt;li&gt;One StatefulSet per Prometheus shard is created.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;PodMonitors, Probes, and ServiceMonitors are turned into individual scrape jobs
which all use Kubernetes Service Discovery (SD).&lt;/p&gt;
&lt;h2 id=&#34;sharding-and-replication&#34;&gt;Sharding and replication&lt;/h2&gt;
&lt;p&gt;The GrafanaAgent resource can specify a number of shards. Each shard results in
the creation of a StatefulSet with a hashmod &#43; keep relabel_config per job:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;YAML&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-yaml&#34;&gt;- source_labels: [__address__]
  target_label: __tmp_hash
  modulus: NUM_SHARDS
  action: hashmod
- source_labels: [__tmp_hash]
  regex: CURRENT_STATEFULSET_SHARD
  action: keep&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This allows for horizontal scaling capabilities, where each shard
will handle roughly 1/N of the total scrape load. Note that this does not use
consistent hashing, which means changing the number of shards will cause
anywhere between 1/N to N targets to reshuffle.&lt;/p&gt;
&lt;p&gt;The sharding mechanism is borrowed from the Prometheus Operator.&lt;/p&gt;
&lt;p&gt;The number of replicas can be defined, similarly to the number of shards. This
creates deduplicate shards. This must be paired with a &lt;code&gt;remote_write&lt;/code&gt; system that
can perform HA deduplication. &lt;a href=&#34;/docs/grafana-cloud/&#34;&gt;Grafana Cloud&lt;/a&gt; and &lt;a href=&#34;/docs/mimir/latest/&#34;&gt;Mimir&lt;/a&gt; provide this out of the
box, and the Grafana Agent Operator defaults support these two systems.&lt;/p&gt;
&lt;p&gt;The total number of created metrics pods will be the product of &lt;code&gt;numShards * numReplicas&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&#34;added-labels&#34;&gt;Added labels&lt;/h2&gt;
&lt;p&gt;Two labels are added by default to every metric:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;cluster&lt;/code&gt;, representing the &lt;code&gt;GrafanaAgent&lt;/code&gt; deployment. Holds the value of
&lt;code&gt;&amp;lt;GrafanaAgent.metadata.namespace&amp;gt;/&amp;lt;GrafanaAgent.metadata.name&amp;gt;&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__replica__&lt;/code&gt;, representing the replica number of the Agent. This label works
out of the box with Grafana Cloud and Cortex&amp;rsquo;s &lt;a href=&#34;https://cortexmetrics.io/docs/guides/ha-pair-handling/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;HA
deduplication&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The shard number is not added as a label, as sharding is designed to be
transparent on the receiver end.&lt;/p&gt;
&lt;h2 id=&#34;enable-sharding-and-replication&#34;&gt;Enable sharding and replication&lt;/h2&gt;
&lt;p&gt;To enable sharding and replication, you must set the &lt;code&gt;shards&lt;/code&gt; and &lt;code&gt;replicas&lt;/code&gt; properties in the Grafana Agent configuration file. For example, the following configuration file would shard the data into three shards and replicate each shard to two other Grafana Agent instances:&lt;/p&gt;

&lt;div class=&#34;code-snippet code-snippet__mini&#34;&gt;&lt;div class=&#34;lang-toolbar__mini&#34;&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet code-snippet__border&#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-none&#34;&gt;shards: 3
replicas: 2&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;You can also enable sharding and replication by setting the &lt;code&gt;shards&lt;/code&gt; and &lt;code&gt;replicas&lt;/code&gt; arguments when you start the Grafana Agent.&lt;/p&gt;
&lt;h3 id=&#34;examples&#34;&gt;Examples&lt;/h3&gt;
&lt;p&gt;The following examples show you how to enable sharding and replication in a Kubernetes environment.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;To shard the data into three shards and replicate each shard to two other Grafana Agent instances, you would use the following deployment manifest:&lt;/p&gt;

&lt;div class=&#34;code-snippet code-snippet__mini&#34;&gt;&lt;div class=&#34;lang-toolbar__mini&#34;&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet code-snippet__border&#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-none&#34;&gt;apiVersion: apps/v1
kind: Deployment
metadata:
  name: grafana-agent
spec:
  replicas: 3
  selector:
    matchLabels:
      app: grafana-agent
  template:
    metadata:
      labels:
        app: grafana-agent
    spec:
      containers:
      - name: grafana-agent
        image: grafana/agent:latest
        args:
        - &amp;#34;--shards=3&amp;#34;
        - &amp;#34;--replicas=2&amp;#34;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To shard the data into 10 shards and replicate each shard to three other Grafana Agent instances, you would use the following deployment manifest:&lt;/p&gt;

&lt;div class=&#34;code-snippet code-snippet__mini&#34;&gt;&lt;div class=&#34;lang-toolbar__mini&#34;&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet code-snippet__border&#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-none&#34;&gt;apiVersion: apps/v1
kind: Deployment
metadata:
  name: grafana-agent
spec:
  replicas: 10
  selector:
    matchLabels:
      app: grafana-agent
  template:
    metadata:
      labels:
        app: grafana-agent
    spec:
      containers:
      - name: grafana-agent
        image: grafana/agent:latest
        args:
        - &amp;#34;--shards=10&amp;#34;
        - &amp;#34;--replicas=3&amp;#34;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
]]></content><description>&lt;h1 id="architecture">Architecture&lt;/h1>
&lt;p>Grafana Agent Operator works by watching for Kubernetes &lt;a href="https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/" target="_blank" rel="noopener noreferrer">custom resources&lt;/a> that specify how to collect telemetry data from your Kubernetes cluster and where to send it. Agent Operator manages corresponding Grafana Agent deployments in your cluster by watching for changes against the custom resources.&lt;/p></description></item><item><title>Set up integrations</title><link>https://grafana.com/docs/agent/v0.43/operator/operator-integrations/</link><pubDate>Wed, 12 Mar 2025 11:45:31 +0100</pubDate><guid>https://grafana.com/docs/agent/v0.43/operator/operator-integrations/</guid><content><![CDATA[&lt;h1 id=&#34;set-up-integrations&#34;&gt;Set up integrations&lt;/h1&gt;
&lt;p&gt;This topic provides examples of setting up Grafana Agent Operator integrations, including &lt;a href=&#34;#set-up-an-agent-operator-node_exporter-integration&#34;&gt;node_exporter&lt;/a&gt; and &lt;a href=&#34;#set-up-an-agent-operator-mysqld_exporter-integration&#34;&gt;mysqld_exporter&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;before-you-begin&#34;&gt;Before you begin&lt;/h2&gt;
&lt;p&gt;Before you begin, make sure that you have deployed the Grafana Agent Operator CRDs and installed Agent Operator into your cluster. See &lt;a href=&#34;../helm-getting-started/&#34;&gt;Install Grafana Agent Operator with Helm&lt;/a&gt; or &lt;a href=&#34;../getting-started/&#34;&gt;Install Grafana Agent Operator&lt;/a&gt; for instructions.&lt;/p&gt;
&lt;p&gt;Also, make sure that you &lt;a href=&#34;../deploy-agent-operator-resources/&#34;&gt;deploy the GrafanaAgent resource&lt;/a&gt; and the &lt;code&gt;yaml&lt;/code&gt; you use has the &lt;code&gt;integrations&lt;/code&gt; definition under &lt;code&gt;spec&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Important:&lt;/strong&gt; The field &lt;code&gt;name&lt;/code&gt; under the &lt;code&gt;spec&lt;/code&gt; section of the manifest must contain the name of the integration to be installed according to the list of integrations defined &lt;a href=&#34;../../static/configuration/integrations/integrations-next/#config-changes&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Important:&lt;/strong&gt; The value of the &lt;code&gt;metrics_instance&lt;/code&gt; field needs to be in the format &lt;code&gt;&amp;lt;namespace&amp;gt;/&amp;lt;name&amp;gt;&lt;/code&gt;, with namespace and name matching the values defined in the &lt;code&gt;metadata&lt;/code&gt; section from the &lt;code&gt;MetricsInstance&lt;/code&gt; resource as explained in &lt;a href=&#34;../deploy-agent-operator-resources/#deploy-a-metricsinstance-resource&#34;&gt;deploy a MetricsInstance resource&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;set-up-an-agent-operator-node_exporter-integration&#34;&gt;Set up an Agent Operator node_exporter integration&lt;/h2&gt;
&lt;p&gt;The Agent Operator node_exporter integration lets you monitor your hardware and OS metrics from Unix-based machines, including Linux machines.&lt;/p&gt;
&lt;p&gt;To set up a node_exporter integration:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Copy the following manifest to a file:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;YAML&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-yaml&#34;&gt;apiVersion: monitoring.grafana.com/v1alpha1
kind: Integration
metadata:
 name: node-exporter
 namespace: default
 labels:
   agent: grafana-agent-integrations
spec:
 name: node_exporter
 type:
   allNodes: true
   unique: true
 config:
   autoscrape:
     enable: true
     metrics_instance: default/primary
   rootfs_path: /default/node_exporter/rootfs
   sysfs_path: /default/node_exporter/sys
   procfs_path: /default/node_exporter/proc
 volumeMounts:
   - mountPath: /default/node_exporter/proc
     name: proc
   - mountPath: /default/node_exporter/sys
     name: sys
   - mountPath: /default/node_exporter/rootfs
     name: root
 volumes:
   - name: proc
     hostPath:
       path: /proc
   - name: sys
     hostPath:
       path: /sys
   - name: root
     hostPath:
       path: /root&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Customize the manifest as needed and roll it out to your cluster using &lt;code&gt;kubectl apply -f&lt;/code&gt; followed by the filename.&lt;/p&gt;
&lt;p&gt;The manifest causes Agent Operator to create an instance of a grafana-agent-integrations-deploy resource that exports Node metrics.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;set-up-an-agent-operator-mysqld_exporter-integration&#34;&gt;Set up an Agent Operator mysqld_exporter integration&lt;/h2&gt;
&lt;p&gt;The Agent Operator mysqld_exporter integration is an embedded version of mysqld_exporter that lets you collect metrics from MySQL servers.&lt;/p&gt;
&lt;p&gt;To set up a mysqld_exporter integration:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Copy the following manifest to a file:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;YAML&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-yaml&#34;&gt;apiVersion: monitoring.grafana.com/v1alpha1
kind: Integration
metadata:
 name: mysqld-exporter
 namespace: default
 labels:
   agent: grafana-agent-integrations
spec:
 name: mysql
 type:
   allNodes: true
   unique: true
 config:
   autoscrape:
     enable: true
     metrics_instance: default/primary
   data_source_name: root@(server-a:3306)/&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Customize the manifest as needed and roll it out to your cluster using &lt;code&gt;kubectl apply -f&lt;/code&gt; followed by the filename.&lt;/p&gt;
&lt;p&gt;The manifest causes Agent Operator to create an instance of a grafana-agent-integrations-deploy resource that exports MySQL metrics.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
]]></content><description>&lt;h1 id="set-up-integrations">Set up integrations&lt;/h1>
&lt;p>This topic provides examples of setting up Grafana Agent Operator integrations, including &lt;a href="#set-up-an-agent-operator-node_exporter-integration">node_exporter&lt;/a> and &lt;a href="#set-up-an-agent-operator-mysqld_exporter-integration">mysqld_exporter&lt;/a>.&lt;/p>
&lt;h2 id="before-you-begin">Before you begin&lt;/h2>
&lt;p>Before you begin, make sure that you have deployed the Grafana Agent Operator CRDs and installed Agent Operator into your cluster. See &lt;a href="../helm-getting-started/">Install Grafana Agent Operator with Helm&lt;/a> or &lt;a href="../getting-started/">Install Grafana Agent Operator&lt;/a> for instructions.&lt;/p></description></item><item><title>Add custom scrape jobs</title><link>https://grafana.com/docs/agent/v0.43/operator/add-custom-scrape-jobs/</link><pubDate>Wed, 11 Sep 2024 17:43:35 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.43/operator/add-custom-scrape-jobs/</guid><content><![CDATA[&lt;h1 id=&#34;add-custom-scrape-jobs&#34;&gt;Add custom scrape jobs&lt;/h1&gt;
&lt;p&gt;Sometimes you want to add a scrape job for something that isn&amp;rsquo;t supported by the
standard set of Prometheus Operator CRDs. A common example of this is node-level
metrics.&lt;/p&gt;
&lt;p&gt;To do this, you&amp;rsquo;ll need to write custom scrape configs and store it in a
Kubernetes Secret:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;YAML&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-yaml&#34;&gt;apiVersion: v1
kind: Secret
metadata:
  name: extra-jobs
  namespace: operator
stringData:
  jobs.yaml: |
    &amp;lt;SCRAPE CONFIGS&amp;gt;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace &lt;code&gt;&amp;lt;SCRAPE CONFIGS&amp;gt;&lt;/code&gt; above with the array of Prometheus scrape jobs to
include.&lt;/p&gt;
&lt;p&gt;For example, to collect metrics from Kubelet and cAdvisor, use the following:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;YAML&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-yaml&#34;&gt;apiVersion: v1
kind: Secret
metadata:
  name: extra-jobs
  namespace: operator
stringData:
  jobs.yaml: |
    - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
      job_name: integrations/kubernetes/kubelet
      kubernetes_sd_configs:
      - role: node
      relabel_configs:
      - replacement: kubernetes.default.svc:443
        target_label: __address__
      - regex: (.&amp;#43;)
        source_labels: [__meta_kubernetes_node_name]
        replacement: /api/v1/nodes/$1/proxy/metrics
        target_label: __metrics_path__
      - action: hashmod
        modulus: $(SHARDS)
        source_labels:
        - __address__
        target_label: __tmp_hash
      - action: keep
        regex: $(SHARD)
        source_labels:
        - __tmp_hash
      scheme: https
      tls_config:
        ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
    - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
      job_name: integrations/kubernetes/cadvisor
      kubernetes_sd_configs:
      - role: node
      relabel_configs:
      - replacement: kubernetes.default.svc:443
        target_label: __address__
      - regex: (.&amp;#43;)
        replacement: /api/v1/nodes/$1/proxy/metrics/cadvisor
        source_labels:
        - __meta_kubernetes_node_name
        target_label: __metrics_path__
      - action: hashmod
        modulus: $(SHARDS)
        source_labels:
        - __address__
        target_label: __tmp_hash
      - action: keep
        regex: $(SHARD)
        source_labels:
        - __tmp_hash
      scheme: https
      tls_config:
        ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Note that you &lt;strong&gt;should&lt;/strong&gt; always add these two relabel_configs for each custom job:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;YAML&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-yaml&#34;&gt;- action: hashmod
  modulus: $(SHARDS)
  source_labels:
  - __address__
  target_label: __tmp_hash
- action: keep
  regex: $(SHARD)
  source_labels:
  - __tmp_hash&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;These rules ensure if your GrafanaAgent has multiple metrics shards, only one
pod per replica will collect metrics for each job.&lt;/p&gt;
&lt;p&gt;Once your Secret is defined, you&amp;rsquo;ll then need to add a &lt;code&gt;additionalScrapeConfigs&lt;/code&gt;
field to your MetricsInstance:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;YAML&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-yaml&#34;&gt;apiVersion: monitoring.grafana.com/v1alpha1
kind: MetricsInstance
metadata:
  labels:
    name: grafana-agent
  name: primary
  namespace: operator
spec:
  additionalScrapeConfigs:
    name: extra-jobs
    key: jobs.yaml
  # ... Other settings ...&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The Secret &lt;strong&gt;MUST&lt;/strong&gt; be in the same namespace as the MetricsInstance.&lt;/p&gt;
]]></content><description>&lt;h1 id="add-custom-scrape-jobs">Add custom scrape jobs&lt;/h1>
&lt;p>Sometimes you want to add a scrape job for something that isn&amp;rsquo;t supported by the
standard set of Prometheus Operator CRDs. A common example of this is node-level
metrics.&lt;/p></description></item><item><title>Custom Resource Definition Reference</title><link>https://grafana.com/docs/agent/v0.43/operator/api/</link><pubDate>Wed, 11 Sep 2024 17:43:35 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.43/operator/api/</guid><content><![CDATA[&lt;h1 id=&#34;custom-resource-definition-reference&#34;&gt;Custom Resource Definition Reference&lt;/h1&gt;
&lt;h2 id=&#34;resource-types&#34;&gt;Resource Types:&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.Deployment&#34;&gt;Deployment&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.GrafanaAgent&#34;&gt;GrafanaAgent&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.IntegrationsDeployment&#34;&gt;IntegrationsDeployment&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.LogsDeployment&#34;&gt;LogsDeployment&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.MetricsDeployment&#34;&gt;MetricsDeployment&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;deployment&#34;&gt;Deployment &lt;a name=&#34;monitoring.grafana.com/v1alpha1.Deployment&#34;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Deployment is a set of discovered resources relative to a GrafanaAgent. The tree of resources contained in a Deployment form the resource hierarchy used for reconciling a GrafanaAgent.&lt;/p&gt;
&lt;h4 id=&#34;fields&#34;&gt;Fields&lt;/h4&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Field&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;apiVersion&lt;/td&gt;
              &lt;td&gt;string&lt;br/&gt;&lt;code&gt;monitoring.grafana.com/v1alpha1&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;kind&lt;/td&gt;
              &lt;td&gt;string&lt;br/&gt;&lt;code&gt;Deployment&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;Agent&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.GrafanaAgent&#34;&gt;GrafanaAgent&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Root resource in the deployment.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;Metrics&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.MetricsDeployment&#34;&gt;[]MetricsDeployment&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Metrics resources discovered by Agent.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;Logs&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.LogsDeployment&#34;&gt;[]LogsDeployment&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Logs resources discovered by Agent.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;Integrations&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.IntegrationsDeployment&#34;&gt;[]IntegrationsDeployment&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Integrations resources discovered by Agent.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;Secrets&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://pkg.go.dev/github.com/grafana/agent/static/operator/assets#SecretStore&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;github.com/grafana/agent/static/operator/assets.SecretStore&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;The full list of Secrets referenced by resources in the Deployment.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;grafanaagent&#34;&gt;GrafanaAgent &lt;a name=&#34;monitoring.grafana.com/v1alpha1.GrafanaAgent&#34;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;(Appears on:&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.Deployment&#34;&gt;Deployment&lt;/a&gt;)
GrafanaAgent defines a Grafana Agent deployment.&lt;/p&gt;
&lt;h4 id=&#34;fields-1&#34;&gt;Fields&lt;/h4&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Field&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;apiVersion&lt;/td&gt;
              &lt;td&gt;string&lt;br/&gt;&lt;code&gt;monitoring.grafana.com/v1alpha1&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;kind&lt;/td&gt;
              &lt;td&gt;string&lt;br/&gt;&lt;code&gt;GrafanaAgent&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;metadata&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#objectmeta-v1-meta&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Kubernetes meta/v1.ObjectMeta&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Refer to the Kubernetes API documentation for the fields of the &lt;code&gt;metadata&lt;/code&gt; field.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;spec&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.GrafanaAgentSpec&#34;&gt;GrafanaAgentSpec&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Spec holds the specification of the desired behavior for the Grafana Agent cluster.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;logLevel&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;LogLevel controls the log level of the generated pods. Defaults to &amp;quot;info&amp;quot; if not set.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;logFormat&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;LogFormat controls the logging format of the generated pods. Defaults to &amp;quot;logfmt&amp;quot; if not set.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;apiServer&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://prometheus-operator.dev/docs/operator/api/#monitoring.coreos.com/v1.APIServerConfig&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1.APIServerConfig&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;APIServerConfig lets you specify a host and auth methods to access the Kubernetes API server. If left empty, the Agent assumes that it is running inside of the cluster and will discover API servers automatically and use the pod&#39;s CA certificate and bearer token file at /var/run/secrets/kubernetes.io/serviceaccount.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;podMetadata&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://prometheus-operator.dev/docs/operator/api/#monitoring.coreos.com/v1.EmbeddedObjectMetadata&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1.EmbeddedObjectMetadata&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;PodMetadata configures Labels and Annotations which are propagated to created Grafana Agent pods.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;version&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Version of Grafana Agent to be deployed.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;paused&lt;/code&gt;&lt;br/&gt;&lt;em&gt;bool&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Paused prevents actions except for deletion to be performed on the underlying managed objects.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;image&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Image, when specified, overrides the image used to run Agent. Specify the image along with a tag. You still need to set the version to ensure Grafana Agent Operator knows which version of Grafana Agent is being configured.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;configReloaderVersion&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Version of Config Reloader to be deployed.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;configReloaderImage&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Image, when specified, overrides the image used to run Config Reloader. Specify the image along with a tag. You still need to set the version to ensure Grafana Agent Operator knows which version of Grafana Agent is being configured.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;imagePullSecrets&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#localobjectreference-v1-core&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;[]Kubernetes core/v1.LocalObjectReference&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;ImagePullSecrets holds an optional list of references to Secrets within the same namespace used for pulling the Grafana Agent image from registries. More info: &lt;a href=&#34;https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod&lt;/a&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;storage&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://prometheus-operator.dev/docs/operator/api/#monitoring.coreos.com/v1.StorageSpec&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1.StorageSpec&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Storage spec to specify how storage will be used.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;volumes&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#volume-v1-core&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;[]Kubernetes core/v1.Volume&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Volumes allows configuration of additional volumes on the output StatefulSet definition. The volumes specified are appended to other volumes that are generated as a result of StorageSpec objects.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;volumeMounts&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#volumemount-v1-core&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;[]Kubernetes core/v1.VolumeMount&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;VolumeMounts lets you configure additional VolumeMounts on the output StatefulSet definition. Specified VolumeMounts are appended to other VolumeMounts generated as a result of StorageSpec objects in the Grafana Agent container.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;resources&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#resourcerequirements-v1-core&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Kubernetes core/v1.ResourceRequirements&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Resources holds requests and limits for individual pods.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;nodeSelector&lt;/code&gt;&lt;br/&gt;&lt;em&gt;map[string]string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;NodeSelector defines which nodes pods should be scheduling on.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;serviceAccountName&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;ServiceAccountName is the name of the ServiceAccount to use for running Grafana Agent pods.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;secrets&lt;/code&gt;&lt;br/&gt;&lt;em&gt;[]string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Secrets is a list of secrets in the same namespace as the GrafanaAgent object which will be mounted into each running Grafana Agent pod. The secrets are mounted into /var/lib/grafana-agent/extra-secrets/&amp;lt;secret-name&amp;gt;.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;configMaps&lt;/code&gt;&lt;br/&gt;&lt;em&gt;[]string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;ConfigMaps is a list of config maps in the same namespace as the GrafanaAgent object which will be mounted into each running Grafana Agent pod. The ConfigMaps are mounted into /var/lib/grafana-agent/extra-configmaps/&amp;lt;configmap-name&amp;gt;.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;affinity&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#affinity-v1-core&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Kubernetes core/v1.Affinity&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Affinity, if specified, controls pod scheduling constraints.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;tolerations&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#toleration-v1-core&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;[]Kubernetes core/v1.Toleration&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Tolerations, if specified, controls the pod&#39;s tolerations.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;topologySpreadConstraints&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#topologyspreadconstraint-v1-core&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;[]Kubernetes core/v1.TopologySpreadConstraint&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;TopologySpreadConstraints, if specified, controls the pod&#39;s topology spread constraints.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;securityContext&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#podsecuritycontext-v1-core&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Kubernetes core/v1.PodSecurityContext&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;SecurityContext holds pod-level security attributes and common container settings. When unspecified, defaults to the default PodSecurityContext.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;containers&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#container-v1-core&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;[]Kubernetes core/v1.Container&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Containers lets you inject additional containers or modify operator-generated containers. This can be used to add an authentication proxy to a Grafana Agent pod or to change the behavior of an operator-generated container. Containers described here modify an operator-generated container if they share the same name and if modifications are done via a strategic merge patch. The current container names are: &lt;code&gt;grafana-agent&lt;/code&gt; and &lt;code&gt;config-reloader&lt;/code&gt;. Overriding containers is entirely outside the scope of what the Grafana Agent team supports and by doing so, you accept that this behavior may break at any time without notice.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;initContainers&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#container-v1-core&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;[]Kubernetes core/v1.Container&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;InitContainers let you add initContainers to the pod definition. These can be used to, for example, fetch secrets for injection into the Grafana Agent configuration from external sources. Errors during the execution of an initContainer cause the pod to restart. More info: &lt;a href=&#34;https://kubernetes.io/docs/concepts/workloads/pods/init-containers/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;https://kubernetes.io/docs/concepts/workloads/pods/init-containers/&lt;/a&gt; Using initContainers for any use case other than secret fetching is entirely outside the scope of what the Grafana Agent maintainers support and by doing so, you accept that this behavior may break at any time without notice.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;priorityClassName&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;PriorityClassName is the priority class assigned to pods.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;runtimeClassName&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;RuntimeClassName is the runtime class assigned to pods.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;portName&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Port name used for the pods and governing service. This defaults to agent-metrics.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;metrics&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.MetricsSubsystemSpec&#34;&gt;MetricsSubsystemSpec&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Metrics controls the metrics subsystem of the Agent and settings unique to metrics-specific pods that are deployed.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;logs&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.LogsSubsystemSpec&#34;&gt;LogsSubsystemSpec&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Logs controls the logging subsystem of the Agent and settings unique to logging-specific pods that are deployed.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;integrations&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.IntegrationsSubsystemSpec&#34;&gt;IntegrationsSubsystemSpec&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Integrations controls the integration subsystem of the Agent and settings unique to deployed integration-specific pods.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enableConfigReadAPI&lt;/code&gt;&lt;br/&gt;&lt;em&gt;bool&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;enableConfigReadAPI enables the read API for viewing the currently running config port 8080 on the agent. &#43;kubebuilder:default=false&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;disableReporting&lt;/code&gt;&lt;br/&gt;&lt;em&gt;bool&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;disableReporting disables reporting of enabled feature flags to Grafana. &#43;kubebuilder:default=false&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;disableSupportBundle&lt;/code&gt;&lt;br/&gt;&lt;em&gt;bool&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;disableSupportBundle disables the generation of support bundles. &#43;kubebuilder:default=false&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;integrationsdeployment&#34;&gt;IntegrationsDeployment &lt;a name=&#34;monitoring.grafana.com/v1alpha1.IntegrationsDeployment&#34;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;(Appears on:&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.Deployment&#34;&gt;Deployment&lt;/a&gt;)
IntegrationsDeployment is a set of discovered resources relative to an IntegrationsDeployment.&lt;/p&gt;
&lt;h4 id=&#34;fields-2&#34;&gt;Fields&lt;/h4&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Field&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;apiVersion&lt;/td&gt;
              &lt;td&gt;string&lt;br/&gt;&lt;code&gt;monitoring.grafana.com/v1alpha1&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;kind&lt;/td&gt;
              &lt;td&gt;string&lt;br/&gt;&lt;code&gt;IntegrationsDeployment&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;Instance&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.Integration&#34;&gt;Integration&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;logsdeployment&#34;&gt;LogsDeployment &lt;a name=&#34;monitoring.grafana.com/v1alpha1.LogsDeployment&#34;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;(Appears on:&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.Deployment&#34;&gt;Deployment&lt;/a&gt;)
LogsDeployment is a set of discovered resources relative to a LogsInstance.&lt;/p&gt;
&lt;h4 id=&#34;fields-3&#34;&gt;Fields&lt;/h4&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Field&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;apiVersion&lt;/td&gt;
              &lt;td&gt;string&lt;br/&gt;&lt;code&gt;monitoring.grafana.com/v1alpha1&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;kind&lt;/td&gt;
              &lt;td&gt;string&lt;br/&gt;&lt;code&gt;LogsDeployment&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;Instance&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.LogsInstance&#34;&gt;LogsInstance&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;PodLogs&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.PodLogs&#34;&gt;[]PodLogs&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;metricsdeployment&#34;&gt;MetricsDeployment &lt;a name=&#34;monitoring.grafana.com/v1alpha1.MetricsDeployment&#34;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;(Appears on:&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.Deployment&#34;&gt;Deployment&lt;/a&gt;)
MetricsDeployment is a set of discovered resources relative to a MetricsInstance.&lt;/p&gt;
&lt;h4 id=&#34;fields-4&#34;&gt;Fields&lt;/h4&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Field&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;apiVersion&lt;/td&gt;
              &lt;td&gt;string&lt;br/&gt;&lt;code&gt;monitoring.grafana.com/v1alpha1&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;kind&lt;/td&gt;
              &lt;td&gt;string&lt;br/&gt;&lt;code&gt;MetricsDeployment&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;Instance&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.MetricsInstance&#34;&gt;MetricsInstance&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;ServiceMonitors&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://prometheus-operator.dev/docs/operator/api/#monitoring.coreos.com/v1.ServiceMonitor&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;[]github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1.ServiceMonitor&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;PodMonitors&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://prometheus-operator.dev/docs/operator/api/#monitoring.coreos.com/v1.PodMonitor&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;[]github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1.PodMonitor&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;Probes&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://prometheus-operator.dev/docs/operator/api/#monitoring.coreos.com/v1.Probe&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;[]github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1.Probe&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;cristagespec&#34;&gt;CRIStageSpec &lt;a name=&#34;monitoring.grafana.com/v1alpha1.CRIStageSpec&#34;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;(Appears on:&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.PipelineStageSpec&#34;&gt;PipelineStageSpec&lt;/a&gt;)
CRIStageSpec is a parsing stage that reads log lines using the standard CRI logging format. It needs no defined fields.&lt;/p&gt;
&lt;h3 id=&#34;dockerstagespec&#34;&gt;DockerStageSpec &lt;a name=&#34;monitoring.grafana.com/v1alpha1.DockerStageSpec&#34;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;(Appears on:&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.PipelineStageSpec&#34;&gt;PipelineStageSpec&lt;/a&gt;)
DockerStageSpec is a parsing stage that reads log lines using the standard Docker logging format. It needs no defined fields.&lt;/p&gt;
&lt;h3 id=&#34;dropstagespec&#34;&gt;DropStageSpec &lt;a name=&#34;monitoring.grafana.com/v1alpha1.DropStageSpec&#34;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;(Appears on:&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.PipelineStageSpec&#34;&gt;PipelineStageSpec&lt;/a&gt;)
DropStageSpec is a filtering stage that lets you drop certain logs.&lt;/p&gt;
&lt;h4 id=&#34;fields-5&#34;&gt;Fields&lt;/h4&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Field&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;source&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Name from the extract data to parse. If empty, uses the log message.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;expression&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;RE2 regular expression.  If source is provided, the regex attempts to match the source.  If no source is provided, then the regex attempts to attach the log line.  If the provided regex matches the log line or a provided source, the line is dropped.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;value&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Value can only be specified when source is specified. If the value provided is an exact match for the given source then the line will be dropped.  Mutually exclusive with expression.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;olderThan&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;OlderThan will be parsed as a Go duration. If the log line&#39;s timestamp is older than the current time minus the provided duration, it will be dropped.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;longerThan&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;LongerThan will drop a log line if it its content is longer than this value (in bytes). Can be expressed as an integer (8192) or a number with a suffix (8kb).&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;dropCounterReason&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Every time a log line is dropped, the metric logentry_dropped_lines_total is incremented. A &amp;quot;reason&amp;quot; label is added, and can be customized by providing a custom value here. Defaults to &amp;quot;drop_stage&amp;quot;.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;grafanaagentspec&#34;&gt;GrafanaAgentSpec &lt;a name=&#34;monitoring.grafana.com/v1alpha1.GrafanaAgentSpec&#34;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;(Appears on:&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.GrafanaAgent&#34;&gt;GrafanaAgent&lt;/a&gt;)
GrafanaAgentSpec is a specification of the desired behavior of the Grafana Agent cluster.&lt;/p&gt;
&lt;h4 id=&#34;fields-6&#34;&gt;Fields&lt;/h4&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Field&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;logLevel&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;LogLevel controls the log level of the generated pods. Defaults to &amp;quot;info&amp;quot; if not set.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;logFormat&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;LogFormat controls the logging format of the generated pods. Defaults to &amp;quot;logfmt&amp;quot; if not set.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;apiServer&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://prometheus-operator.dev/docs/operator/api/#monitoring.coreos.com/v1.APIServerConfig&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1.APIServerConfig&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;APIServerConfig lets you specify a host and auth methods to access the Kubernetes API server. If left empty, the Agent assumes that it is running inside of the cluster and will discover API servers automatically and use the pod&#39;s CA certificate and bearer token file at /var/run/secrets/kubernetes.io/serviceaccount.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;podMetadata&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://prometheus-operator.dev/docs/operator/api/#monitoring.coreos.com/v1.EmbeddedObjectMetadata&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1.EmbeddedObjectMetadata&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;PodMetadata configures Labels and Annotations which are propagated to created Grafana Agent pods.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;version&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Version of Grafana Agent to be deployed.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;paused&lt;/code&gt;&lt;br/&gt;&lt;em&gt;bool&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Paused prevents actions except for deletion to be performed on the underlying managed objects.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;image&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Image, when specified, overrides the image used to run Agent. Specify the image along with a tag. You still need to set the version to ensure Grafana Agent Operator knows which version of Grafana Agent is being configured.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;configReloaderVersion&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Version of Config Reloader to be deployed.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;configReloaderImage&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Image, when specified, overrides the image used to run Config Reloader. Specify the image along with a tag. You still need to set the version to ensure Grafana Agent Operator knows which version of Grafana Agent is being configured.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;imagePullSecrets&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#localobjectreference-v1-core&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;[]Kubernetes core/v1.LocalObjectReference&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;ImagePullSecrets holds an optional list of references to Secrets within the same namespace used for pulling the Grafana Agent image from registries. More info: &lt;a href=&#34;https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod&lt;/a&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;storage&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://prometheus-operator.dev/docs/operator/api/#monitoring.coreos.com/v1.StorageSpec&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1.StorageSpec&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Storage spec to specify how storage will be used.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;volumes&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#volume-v1-core&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;[]Kubernetes core/v1.Volume&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Volumes allows configuration of additional volumes on the output StatefulSet definition. The volumes specified are appended to other volumes that are generated as a result of StorageSpec objects.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;volumeMounts&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#volumemount-v1-core&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;[]Kubernetes core/v1.VolumeMount&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;VolumeMounts lets you configure additional VolumeMounts on the output StatefulSet definition. Specified VolumeMounts are appended to other VolumeMounts generated as a result of StorageSpec objects in the Grafana Agent container.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;resources&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#resourcerequirements-v1-core&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Kubernetes core/v1.ResourceRequirements&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Resources holds requests and limits for individual pods.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;nodeSelector&lt;/code&gt;&lt;br/&gt;&lt;em&gt;map[string]string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;NodeSelector defines which nodes pods should be scheduling on.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;serviceAccountName&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;ServiceAccountName is the name of the ServiceAccount to use for running Grafana Agent pods.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;secrets&lt;/code&gt;&lt;br/&gt;&lt;em&gt;[]string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Secrets is a list of secrets in the same namespace as the GrafanaAgent object which will be mounted into each running Grafana Agent pod. The secrets are mounted into /var/lib/grafana-agent/extra-secrets/&amp;lt;secret-name&amp;gt;.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;configMaps&lt;/code&gt;&lt;br/&gt;&lt;em&gt;[]string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;ConfigMaps is a list of config maps in the same namespace as the GrafanaAgent object which will be mounted into each running Grafana Agent pod. The ConfigMaps are mounted into /var/lib/grafana-agent/extra-configmaps/&amp;lt;configmap-name&amp;gt;.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;affinity&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#affinity-v1-core&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Kubernetes core/v1.Affinity&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Affinity, if specified, controls pod scheduling constraints.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;tolerations&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#toleration-v1-core&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;[]Kubernetes core/v1.Toleration&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Tolerations, if specified, controls the pod&#39;s tolerations.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;topologySpreadConstraints&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#topologyspreadconstraint-v1-core&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;[]Kubernetes core/v1.TopologySpreadConstraint&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;TopologySpreadConstraints, if specified, controls the pod&#39;s topology spread constraints.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;securityContext&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#podsecuritycontext-v1-core&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Kubernetes core/v1.PodSecurityContext&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;SecurityContext holds pod-level security attributes and common container settings. When unspecified, defaults to the default PodSecurityContext.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;containers&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#container-v1-core&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;[]Kubernetes core/v1.Container&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Containers lets you inject additional containers or modify operator-generated containers. This can be used to add an authentication proxy to a Grafana Agent pod or to change the behavior of an operator-generated container. Containers described here modify an operator-generated container if they share the same name and if modifications are done via a strategic merge patch. The current container names are: &lt;code&gt;grafana-agent&lt;/code&gt; and &lt;code&gt;config-reloader&lt;/code&gt;. Overriding containers is entirely outside the scope of what the Grafana Agent team supports and by doing so, you accept that this behavior may break at any time without notice.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;initContainers&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#container-v1-core&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;[]Kubernetes core/v1.Container&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;InitContainers let you add initContainers to the pod definition. These can be used to, for example, fetch secrets for injection into the Grafana Agent configuration from external sources. Errors during the execution of an initContainer cause the pod to restart. More info: &lt;a href=&#34;https://kubernetes.io/docs/concepts/workloads/pods/init-containers/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;https://kubernetes.io/docs/concepts/workloads/pods/init-containers/&lt;/a&gt; Using initContainers for any use case other than secret fetching is entirely outside the scope of what the Grafana Agent maintainers support and by doing so, you accept that this behavior may break at any time without notice.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;priorityClassName&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;PriorityClassName is the priority class assigned to pods.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;runtimeClassName&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;RuntimeClassName is the runtime class assigned to pods.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;portName&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Port name used for the pods and governing service. This defaults to agent-metrics.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;metrics&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.MetricsSubsystemSpec&#34;&gt;MetricsSubsystemSpec&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Metrics controls the metrics subsystem of the Agent and settings unique to metrics-specific pods that are deployed.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;logs&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.LogsSubsystemSpec&#34;&gt;LogsSubsystemSpec&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Logs controls the logging subsystem of the Agent and settings unique to logging-specific pods that are deployed.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;integrations&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.IntegrationsSubsystemSpec&#34;&gt;IntegrationsSubsystemSpec&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Integrations controls the integration subsystem of the Agent and settings unique to deployed integration-specific pods.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enableConfigReadAPI&lt;/code&gt;&lt;br/&gt;&lt;em&gt;bool&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;enableConfigReadAPI enables the read API for viewing the currently running config port 8080 on the agent. &#43;kubebuilder:default=false&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;disableReporting&lt;/code&gt;&lt;br/&gt;&lt;em&gt;bool&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;disableReporting disables reporting of enabled feature flags to Grafana. &#43;kubebuilder:default=false&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;disableSupportBundle&lt;/code&gt;&lt;br/&gt;&lt;em&gt;bool&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;disableSupportBundle disables the generation of support bundles. &#43;kubebuilder:default=false&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;integration&#34;&gt;Integration &lt;a name=&#34;monitoring.grafana.com/v1alpha1.Integration&#34;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;(Appears on:&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.IntegrationsDeployment&#34;&gt;IntegrationsDeployment&lt;/a&gt;)
Integration runs a single Grafana Agent integration. Integrations that generate telemetry must be configured to send that telemetry somewhere, such as autoscrape for exporter-based integrations.  Integrations have access to the LogsInstances and MetricsInstances in the same GrafanaAgent resource set, referenced by the &amp;lt;namespace&amp;gt;/&amp;lt;name&amp;gt; of the Instance resource.  For example, if there is a default/production MetricsInstance, you can configure a supported integration&#39;s autoscrape block with:  	autoscrape: 	  enable: true 	  metrics_instance: default/production  There is currently no way for telemetry created by an Operator-managed integration to be collected from outside of the integration itself.&lt;/p&gt;
&lt;h4 id=&#34;fields-7&#34;&gt;Fields&lt;/h4&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Field&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;metadata&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#objectmeta-v1-meta&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Kubernetes meta/v1.ObjectMeta&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Refer to the Kubernetes API documentation for the fields of the &lt;code&gt;metadata&lt;/code&gt; field.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;spec&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.IntegrationSpec&#34;&gt;IntegrationSpec&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Specifies the desired behavior of the Integration.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;name&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Name of the integration to run (e.g., &amp;quot;node_exporter&amp;quot;, &amp;quot;mysqld_exporter&amp;quot;).&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;type&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.IntegrationType&#34;&gt;IntegrationType&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Type informs Grafana Agent Operator about how to manage the integration being configured.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;config&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://pkg.go.dev/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1#JSON&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSON&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;The configuration for the named integration. Note that Integrations are deployed with the integrations-next feature flag, which has different common settings:    &lt;a href=&#34;/docs/agent/latest/configuration/integrations/integrations-next/&#34;&gt;https://grafana.com/docs/agent/latest/configuration/integrations/integrations-next/&lt;/a&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;volumes&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#volume-v1-core&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;[]Kubernetes core/v1.Volume&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;An extra list of Volumes to be associated with the Grafana Agent pods running this integration. Volume names are mutated to be unique across all Integrations. Note that the specified volumes should be able to tolerate existing on multiple pods at once when type is daemonset.  Don&#39;t use volumes for loading Secrets or ConfigMaps from the same namespace as the Integration; use the Secrets and ConfigMaps fields instead.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;volumeMounts&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#volumemount-v1-core&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;[]Kubernetes core/v1.VolumeMount&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;An extra list of VolumeMounts to be associated with the Grafana Agent pods running this integration. VolumeMount names are mutated to be unique across all used IntegrationSpecs.  Mount paths should include the namespace/name of the Integration CR to avoid potentially colliding with other resources.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;secrets&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#secretkeyselector-v1-core&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;[]Kubernetes core/v1.SecretKeySelector&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;An extra list of keys from Secrets in the same namespace as the Integration which will be mounted into the Grafana Agent pod running this Integration.  Secrets will be mounted at /etc/grafana-agent/integrations/secrets/&amp;lt;secret_namespace&amp;gt;/&amp;lt;secret_name&amp;gt;/&amp;lt;key&amp;gt;.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;configMaps&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#configmapkeyselector-v1-core&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;[]Kubernetes core/v1.ConfigMapKeySelector&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;An extra list of keys from ConfigMaps in the same namespace as the Integration which will be mounted into the Grafana Agent pod running this Integration.  ConfigMaps are mounted at /etc/grafana-agent/integrations/configMaps/&amp;lt;configmap_namespace&amp;gt;/&amp;lt;configmap_name&amp;gt;/&amp;lt;key&amp;gt;.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;integrationspec&#34;&gt;IntegrationSpec &lt;a name=&#34;monitoring.grafana.com/v1alpha1.IntegrationSpec&#34;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;(Appears on:&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.Integration&#34;&gt;Integration&lt;/a&gt;)
IntegrationSpec specifies the desired behavior of a metrics integration.&lt;/p&gt;
&lt;h4 id=&#34;fields-8&#34;&gt;Fields&lt;/h4&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Field&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;name&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Name of the integration to run (e.g., &amp;quot;node_exporter&amp;quot;, &amp;quot;mysqld_exporter&amp;quot;).&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;type&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.IntegrationType&#34;&gt;IntegrationType&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Type informs Grafana Agent Operator about how to manage the integration being configured.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;config&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://pkg.go.dev/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1#JSON&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSON&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;The configuration for the named integration. Note that Integrations are deployed with the integrations-next feature flag, which has different common settings:    &lt;a href=&#34;/docs/agent/latest/configuration/integrations/integrations-next/&#34;&gt;https://grafana.com/docs/agent/latest/configuration/integrations/integrations-next/&lt;/a&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;volumes&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#volume-v1-core&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;[]Kubernetes core/v1.Volume&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;An extra list of Volumes to be associated with the Grafana Agent pods running this integration. Volume names are mutated to be unique across all Integrations. Note that the specified volumes should be able to tolerate existing on multiple pods at once when type is daemonset.  Don&#39;t use volumes for loading Secrets or ConfigMaps from the same namespace as the Integration; use the Secrets and ConfigMaps fields instead.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;volumeMounts&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#volumemount-v1-core&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;[]Kubernetes core/v1.VolumeMount&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;An extra list of VolumeMounts to be associated with the Grafana Agent pods running this integration. VolumeMount names are mutated to be unique across all used IntegrationSpecs.  Mount paths should include the namespace/name of the Integration CR to avoid potentially colliding with other resources.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;secrets&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#secretkeyselector-v1-core&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;[]Kubernetes core/v1.SecretKeySelector&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;An extra list of keys from Secrets in the same namespace as the Integration which will be mounted into the Grafana Agent pod running this Integration.  Secrets will be mounted at /etc/grafana-agent/integrations/secrets/&amp;lt;secret_namespace&amp;gt;/&amp;lt;secret_name&amp;gt;/&amp;lt;key&amp;gt;.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;configMaps&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#configmapkeyselector-v1-core&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;[]Kubernetes core/v1.ConfigMapKeySelector&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;An extra list of keys from ConfigMaps in the same namespace as the Integration which will be mounted into the Grafana Agent pod running this Integration.  ConfigMaps are mounted at /etc/grafana-agent/integrations/configMaps/&amp;lt;configmap_namespace&amp;gt;/&amp;lt;configmap_name&amp;gt;/&amp;lt;key&amp;gt;.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;integrationtype&#34;&gt;IntegrationType &lt;a name=&#34;monitoring.grafana.com/v1alpha1.IntegrationType&#34;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;(Appears on:&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.IntegrationSpec&#34;&gt;IntegrationSpec&lt;/a&gt;)
IntegrationType determines specific behaviors of a configured integration.&lt;/p&gt;
&lt;h4 id=&#34;fields-9&#34;&gt;Fields&lt;/h4&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Field&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;allNodes&lt;/code&gt;&lt;br/&gt;&lt;em&gt;bool&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;When true, the configured integration should be run on every Node in the cluster. This is required for Integrations that generate Node-specific metrics like node_exporter, otherwise it must be false to avoid generating duplicate metrics.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;unique&lt;/code&gt;&lt;br/&gt;&lt;em&gt;bool&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Whether this integration can only be defined once for a Grafana Agent process, such as statsd_exporter. It is invalid for a GrafanaAgent to discover multiple unique Integrations with the same Integration name (i.e., a single GrafanaAgent cannot deploy two statsd_exporters).&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;integrationssubsystemspec&#34;&gt;IntegrationsSubsystemSpec &lt;a name=&#34;monitoring.grafana.com/v1alpha1.IntegrationsSubsystemSpec&#34;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;(Appears on:&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.GrafanaAgentSpec&#34;&gt;GrafanaAgentSpec&lt;/a&gt;)
IntegrationsSubsystemSpec defines global settings to apply across the integrations subsystem.&lt;/p&gt;
&lt;h4 id=&#34;fields-10&#34;&gt;Fields&lt;/h4&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Field&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;selector&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#labelselector-v1-meta&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Kubernetes meta/v1.LabelSelector&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Label selector to find Integration resources to run. When nil, no integration resources will be defined.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;namespaceSelector&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#labelselector-v1-meta&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Kubernetes meta/v1.LabelSelector&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Label selector for namespaces to search when discovering integration resources. If nil, integration resources are only discovered in the namespace of the GrafanaAgent resource.  Set to &lt;code&gt;{}&lt;/code&gt; to search all namespaces.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;jsonstagespec&#34;&gt;JSONStageSpec &lt;a name=&#34;monitoring.grafana.com/v1alpha1.JSONStageSpec&#34;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;(Appears on:&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.PipelineStageSpec&#34;&gt;PipelineStageSpec&lt;/a&gt;)
JSONStageSpec is a parsing stage that reads the log line as JSON and accepts JMESPath expressions to extract data.&lt;/p&gt;
&lt;h4 id=&#34;fields-11&#34;&gt;Fields&lt;/h4&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Field&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;source&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Name from the extracted data to parse as JSON. If empty, uses entire log message.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;expressions&lt;/code&gt;&lt;br/&gt;&lt;em&gt;map[string]string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Set of the key/value pairs of JMESPath expressions. The key will be the key in the extracted data while the expression will be the value, evaluated as a JMESPath from the source data.  Literal JMESPath expressions can be used by wrapping a key in double quotes, which then must be wrapped again in single quotes in YAML so they get passed to the JMESPath parser.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;limitstagespec&#34;&gt;LimitStageSpec &lt;a name=&#34;monitoring.grafana.com/v1alpha1.LimitStageSpec&#34;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;(Appears on:&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.PipelineStageSpec&#34;&gt;PipelineStageSpec&lt;/a&gt;)
The limit stage is a rate-limiting stage that throttles logs based on several options.&lt;/p&gt;
&lt;h4 id=&#34;fields-12&#34;&gt;Fields&lt;/h4&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Field&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;rate&lt;/code&gt;&lt;br/&gt;&lt;em&gt;int&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;The rate limit in lines per second that Promtail will push to Loki.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;burst&lt;/code&gt;&lt;br/&gt;&lt;em&gt;int&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;The cap in the quantity of burst lines that Promtail will push to Loki.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;drop&lt;/code&gt;&lt;br/&gt;&lt;em&gt;bool&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;When drop is true, log lines that exceed the current rate limit are discarded. When drop is false, log lines that exceed the current rate limit wait to enter the back pressure mode.  Defaults to false.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;logsbackoffconfigspec&#34;&gt;LogsBackoffConfigSpec &lt;a name=&#34;monitoring.grafana.com/v1alpha1.LogsBackoffConfigSpec&#34;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;(Appears on:&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.LogsClientSpec&#34;&gt;LogsClientSpec&lt;/a&gt;)
LogsBackoffConfigSpec configures timing for retrying failed requests.&lt;/p&gt;
&lt;h4 id=&#34;fields-13&#34;&gt;Fields&lt;/h4&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Field&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;minPeriod&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Initial backoff time between retries. Time between retries is increased exponentially.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;maxPeriod&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Maximum backoff time between retries.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;maxRetries&lt;/code&gt;&lt;br/&gt;&lt;em&gt;int&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Maximum number of retries to perform before giving up a request.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;logsclientspec&#34;&gt;LogsClientSpec &lt;a name=&#34;monitoring.grafana.com/v1alpha1.LogsClientSpec&#34;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;(Appears on:&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.LogsInstanceSpec&#34;&gt;LogsInstanceSpec&lt;/a&gt;, &lt;a href=&#34;#monitoring.grafana.com/v1alpha1.LogsSubsystemSpec&#34;&gt;LogsSubsystemSpec&lt;/a&gt;)
LogsClientSpec defines the client integration for logs, indicating which Loki server to send logs to.&lt;/p&gt;
&lt;h4 id=&#34;fields-14&#34;&gt;Fields&lt;/h4&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Field&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;url&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;URL is the URL where Loki is listening. Must be a full HTTP URL, including protocol. Required. Example: &lt;a href=&#34;https://logs-prod-us-central1.grafana.net/loki/api/v1/push&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;https://logs-prod-us-central1.grafana.net/loki/api/v1/push&lt;/a&gt;.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;tenantId&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Tenant ID used by default to push logs to Loki. If omitted assumes remote Loki is running in single-tenant mode or an authentication layer is used to inject an X-Scope-OrgID header.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;batchWait&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Maximum amount of time to wait before sending a batch, even if that batch isn&#39;t full.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;batchSize&lt;/code&gt;&lt;br/&gt;&lt;em&gt;int&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Maximum batch size (in bytes) of logs to accumulate before sending the batch to Loki.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;basicAuth&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://prometheus-operator.dev/docs/operator/api/#monitoring.coreos.com/v1.BasicAuth&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1.BasicAuth&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;BasicAuth for the Loki server.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;oauth2&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://prometheus-operator.dev/docs/operator/api/#monitoring.coreos.com/v1.OAuth2&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1.OAuth2&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Oauth2 for URL&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;bearerToken&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;BearerToken used for remote_write.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;bearerTokenFile&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;BearerTokenFile used to read bearer token.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;proxyUrl&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;ProxyURL to proxy requests through. Optional.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;tlsConfig&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://prometheus-operator.dev/docs/operator/api/#monitoring.coreos.com/v1.TLSConfig&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1.TLSConfig&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;TLSConfig to use for the client. Only used when the protocol of the URL is https.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;backoffConfig&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.LogsBackoffConfigSpec&#34;&gt;LogsBackoffConfigSpec&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Configures how to retry requests to Loki when a request fails. Defaults to a minPeriod of 500ms, maxPeriod of 5m, and maxRetries of 10.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;externalLabels&lt;/code&gt;&lt;br/&gt;&lt;em&gt;map[string]string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;ExternalLabels are labels to add to any time series when sending data to Loki.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;timeout&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Maximum time to wait for a server to respond to a request.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;logsinstance&#34;&gt;LogsInstance &lt;a name=&#34;monitoring.grafana.com/v1alpha1.LogsInstance&#34;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;(Appears on:&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.LogsDeployment&#34;&gt;LogsDeployment&lt;/a&gt;)
LogsInstance controls an individual logs instance within a Grafana Agent deployment.&lt;/p&gt;
&lt;h4 id=&#34;fields-15&#34;&gt;Fields&lt;/h4&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Field&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;metadata&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#objectmeta-v1-meta&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Kubernetes meta/v1.ObjectMeta&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Refer to the Kubernetes API documentation for the fields of the &lt;code&gt;metadata&lt;/code&gt; field.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;spec&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.LogsInstanceSpec&#34;&gt;LogsInstanceSpec&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Spec holds the specification of the desired behavior for the logs instance.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;clients&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.LogsClientSpec&#34;&gt;[]LogsClientSpec&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Clients controls where logs are written to for this instance.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;podLogsSelector&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#labelselector-v1-meta&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Kubernetes meta/v1.LabelSelector&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Determines which PodLogs should be selected for including in this instance.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;podLogsNamespaceSelector&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#labelselector-v1-meta&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Kubernetes meta/v1.LabelSelector&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Set of labels to determine which namespaces should be watched for PodLogs. If not provided, checks only namespace of the instance.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;additionalScrapeConfigs&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#secretkeyselector-v1-core&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Kubernetes core/v1.SecretKeySelector&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;AdditionalScrapeConfigs allows specifying a key of a Secret containing additional Grafana Agent logging scrape configurations. Scrape configurations specified are appended to the configurations generated by the Grafana Agent Operator.  Job configurations specified must have the form as specified in the official Promtail documentation:  &lt;a href=&#34;/docs/loki/latest/clients/promtail/configuration/#scrape_configs&#34;&gt;https://grafana.com/docs/loki/latest/clients/promtail/configuration/#scrape_configs&lt;/a&gt;  As scrape configs are appended, the user is responsible to make sure it is valid. Note that using this feature may expose the possibility to break upgrades of Grafana Agent. It is advised to review both Grafana Agent and Promtail release notes to ensure that no incompatible scrape configs are going to break Grafana Agent after the upgrade.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;targetConfig&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.LogsTargetConfigSpec&#34;&gt;LogsTargetConfigSpec&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Configures how tailed targets are watched.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;logsinstancespec&#34;&gt;LogsInstanceSpec &lt;a name=&#34;monitoring.grafana.com/v1alpha1.LogsInstanceSpec&#34;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;(Appears on:&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.LogsInstance&#34;&gt;LogsInstance&lt;/a&gt;)
LogsInstanceSpec controls how an individual instance will be used to discover LogMonitors.&lt;/p&gt;
&lt;h4 id=&#34;fields-16&#34;&gt;Fields&lt;/h4&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Field&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;clients&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.LogsClientSpec&#34;&gt;[]LogsClientSpec&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Clients controls where logs are written to for this instance.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;podLogsSelector&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#labelselector-v1-meta&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Kubernetes meta/v1.LabelSelector&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Determines which PodLogs should be selected for including in this instance.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;podLogsNamespaceSelector&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#labelselector-v1-meta&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Kubernetes meta/v1.LabelSelector&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Set of labels to determine which namespaces should be watched for PodLogs. If not provided, checks only namespace of the instance.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;additionalScrapeConfigs&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#secretkeyselector-v1-core&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Kubernetes core/v1.SecretKeySelector&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;AdditionalScrapeConfigs allows specifying a key of a Secret containing additional Grafana Agent logging scrape configurations. Scrape configurations specified are appended to the configurations generated by the Grafana Agent Operator.  Job configurations specified must have the form as specified in the official Promtail documentation:  &lt;a href=&#34;/docs/loki/latest/clients/promtail/configuration/#scrape_configs&#34;&gt;https://grafana.com/docs/loki/latest/clients/promtail/configuration/#scrape_configs&lt;/a&gt;  As scrape configs are appended, the user is responsible to make sure it is valid. Note that using this feature may expose the possibility to break upgrades of Grafana Agent. It is advised to review both Grafana Agent and Promtail release notes to ensure that no incompatible scrape configs are going to break Grafana Agent after the upgrade.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;targetConfig&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.LogsTargetConfigSpec&#34;&gt;LogsTargetConfigSpec&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Configures how tailed targets are watched.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;logssubsystemspec&#34;&gt;LogsSubsystemSpec &lt;a name=&#34;monitoring.grafana.com/v1alpha1.LogsSubsystemSpec&#34;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;(Appears on:&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.GrafanaAgentSpec&#34;&gt;GrafanaAgentSpec&lt;/a&gt;)
LogsSubsystemSpec defines global settings to apply across the logging subsystem.&lt;/p&gt;
&lt;h4 id=&#34;fields-17&#34;&gt;Fields&lt;/h4&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Field&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;clients&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.LogsClientSpec&#34;&gt;[]LogsClientSpec&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;A global set of clients to use when a discovered LogsInstance does not have any clients defined.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;logsExternalLabelName&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;LogsExternalLabelName is the name of the external label used to denote Grafana Agent cluster. Defaults to &amp;quot;cluster.&amp;quot; External label will &lt;em&gt;not&lt;/em&gt; be added when value is set to the empty string.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;instanceSelector&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#labelselector-v1-meta&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Kubernetes meta/v1.LabelSelector&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;InstanceSelector determines which LogInstances should be selected for running. Each instance runs its own set of Prometheus components, including service discovery, scraping, and remote_write.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;instanceNamespaceSelector&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#labelselector-v1-meta&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Kubernetes meta/v1.LabelSelector&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;InstanceNamespaceSelector are the set of labels to determine which namespaces to watch for LogInstances. If not provided, only checks own namespace.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;ignoreNamespaceSelectors&lt;/code&gt;&lt;br/&gt;&lt;em&gt;bool&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;IgnoreNamespaceSelectors, if true, will ignore NamespaceSelector settings from the PodLogs configs, and they will only discover endpoints within their current namespace.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enforcedNamespaceLabel&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;EnforcedNamespaceLabel enforces adding a namespace label of origin for each metric that is user-created. The label value will always be the namespace of the object that is being created.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;logstargetconfigspec&#34;&gt;LogsTargetConfigSpec &lt;a name=&#34;monitoring.grafana.com/v1alpha1.LogsTargetConfigSpec&#34;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;(Appears on:&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.LogsInstanceSpec&#34;&gt;LogsInstanceSpec&lt;/a&gt;)
LogsTargetConfigSpec configures how tailed targets are watched.&lt;/p&gt;
&lt;h4 id=&#34;fields-18&#34;&gt;Fields&lt;/h4&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Field&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;syncPeriod&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Period to resync directories being watched and files being tailed to discover new ones or stop watching removed ones.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;matchstagespec&#34;&gt;MatchStageSpec &lt;a name=&#34;monitoring.grafana.com/v1alpha1.MatchStageSpec&#34;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;(Appears on:&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.PipelineStageSpec&#34;&gt;PipelineStageSpec&lt;/a&gt;)
MatchStageSpec is a filtering stage that conditionally applies a set of stages or drop entries when a log entry matches a configurable LogQL stream selector and filter expressions.&lt;/p&gt;
&lt;h4 id=&#34;fields-19&#34;&gt;Fields&lt;/h4&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Field&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;selector&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;LogQL stream selector and filter expressions. Required.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;pipelineName&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Names the pipeline. When defined, creates an additional label in the pipeline_duration_seconds histogram, where the value is concatenated with job_name using an underscore.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;action&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Determines what action is taken when the selector matches the log line. Can be keep or drop. Defaults to keep. When set to drop, entries are dropped and no later metrics are recorded. Stages must be empty when dropping metrics.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;dropCounterReason&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Every time a log line is dropped, the metric logentry_dropped_lines_total is incremented. A &amp;quot;reason&amp;quot; label is added, and can be customized by providing a custom value here. Defaults to &amp;quot;match_stage.&amp;quot;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;stages&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Nested set of pipeline stages to execute when action is keep and the log line matches selector.  An example value for stages may be:    stages:&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;metadataconfig&#34;&gt;MetadataConfig &lt;a name=&#34;monitoring.grafana.com/v1alpha1.MetadataConfig&#34;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;(Appears on:&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.RemoteWriteSpec&#34;&gt;RemoteWriteSpec&lt;/a&gt;)
MetadataConfig configures the sending of series metadata to remote storage.&lt;/p&gt;
&lt;h4 id=&#34;fields-20&#34;&gt;Fields&lt;/h4&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Field&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;send&lt;/code&gt;&lt;br/&gt;&lt;em&gt;bool&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Send enables metric metadata to be sent to remote storage.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;sendInterval&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;SendInterval controls how frequently metric metadata is sent to remote storage.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;metricsinstance&#34;&gt;MetricsInstance &lt;a name=&#34;monitoring.grafana.com/v1alpha1.MetricsInstance&#34;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;(Appears on:&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.MetricsDeployment&#34;&gt;MetricsDeployment&lt;/a&gt;)
MetricsInstance controls an individual Metrics instance within a Grafana Agent deployment.&lt;/p&gt;
&lt;h4 id=&#34;fields-21&#34;&gt;Fields&lt;/h4&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Field&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;metadata&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#objectmeta-v1-meta&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Kubernetes meta/v1.ObjectMeta&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Refer to the Kubernetes API documentation for the fields of the &lt;code&gt;metadata&lt;/code&gt; field.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;spec&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.MetricsInstanceSpec&#34;&gt;MetricsInstanceSpec&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Spec holds the specification of the desired behavior for the Metrics instance.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;walTruncateFrequency&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;WALTruncateFrequency specifies how frequently to run the WAL truncation process. Higher values cause the WAL to increase and for old series to stay in the WAL longer, but reduces the chance of data loss when remote_write fails for longer than the given frequency.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;minWALTime&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;MinWALTime is the minimum amount of time that series and samples can exist in the WAL before being considered for deletion.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;maxWALTime&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;MaxWALTime is the maximum amount of time that series and samples can exist in the WAL before being forcibly deleted.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;remoteFlushDeadline&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;RemoteFlushDeadline is the deadline for flushing data when an instance shuts down.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;writeStaleOnShutdown&lt;/code&gt;&lt;br/&gt;&lt;em&gt;bool&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;WriteStaleOnShutdown writes staleness markers on shutdown for all series.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;serviceMonitorSelector&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#labelselector-v1-meta&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Kubernetes meta/v1.LabelSelector&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;ServiceMonitorSelector determines which ServiceMonitors to select for target discovery.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;serviceMonitorNamespaceSelector&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#labelselector-v1-meta&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Kubernetes meta/v1.LabelSelector&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;ServiceMonitorNamespaceSelector is the set of labels that determine which namespaces to watch for ServiceMonitor discovery. If nil, it only checks its own namespace.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;podMonitorSelector&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#labelselector-v1-meta&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Kubernetes meta/v1.LabelSelector&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;PodMonitorSelector determines which PodMonitors to selected for target discovery. Experimental.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;podMonitorNamespaceSelector&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#labelselector-v1-meta&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Kubernetes meta/v1.LabelSelector&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;PodMonitorNamespaceSelector are the set of labels to determine which namespaces to watch for PodMonitor discovery. If nil, it only checks its own namespace.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;probeSelector&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#labelselector-v1-meta&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Kubernetes meta/v1.LabelSelector&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;ProbeSelector determines which Probes to select for target discovery.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;probeNamespaceSelector&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#labelselector-v1-meta&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Kubernetes meta/v1.LabelSelector&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;ProbeNamespaceSelector is the set of labels that determines which namespaces to watch for Probe discovery. If nil, it only checks own namespace.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;remoteWrite&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.RemoteWriteSpec&#34;&gt;[]RemoteWriteSpec&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;RemoteWrite controls remote_write settings for this instance.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;additionalScrapeConfigs&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#secretkeyselector-v1-core&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Kubernetes core/v1.SecretKeySelector&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;AdditionalScrapeConfigs lets you specify a key of a Secret containing additional Grafana Agent Prometheus scrape configurations. The specified scrape configurations are appended to the configurations generated by Grafana Agent Operator. Specified job configurations must have the form specified in the official Prometheus documentation: &lt;a href=&#34;https://prometheus.io/docs/prometheus/latest/configuration/configuration/#scrape_config&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;https://prometheus.io/docs/prometheus/latest/configuration/configuration/#scrape_config&lt;/a&gt;. As scrape configs are appended, you must make sure the configuration is still valid. Note that it&#39;s possible that this feature will break future upgrades of Grafana Agent. Review both Grafana Agent and Prometheus release notes to ensure that no incompatible scrape configs will break Grafana Agent after the upgrade.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;metricsinstancespec&#34;&gt;MetricsInstanceSpec &lt;a name=&#34;monitoring.grafana.com/v1alpha1.MetricsInstanceSpec&#34;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;(Appears on:&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.MetricsInstance&#34;&gt;MetricsInstance&lt;/a&gt;)
MetricsInstanceSpec controls how an individual instance is used to discover PodMonitors.&lt;/p&gt;
&lt;h4 id=&#34;fields-22&#34;&gt;Fields&lt;/h4&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Field&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;walTruncateFrequency&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;WALTruncateFrequency specifies how frequently to run the WAL truncation process. Higher values cause the WAL to increase and for old series to stay in the WAL longer, but reduces the chance of data loss when remote_write fails for longer than the given frequency.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;minWALTime&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;MinWALTime is the minimum amount of time that series and samples can exist in the WAL before being considered for deletion.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;maxWALTime&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;MaxWALTime is the maximum amount of time that series and samples can exist in the WAL before being forcibly deleted.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;remoteFlushDeadline&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;RemoteFlushDeadline is the deadline for flushing data when an instance shuts down.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;writeStaleOnShutdown&lt;/code&gt;&lt;br/&gt;&lt;em&gt;bool&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;WriteStaleOnShutdown writes staleness markers on shutdown for all series.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;serviceMonitorSelector&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#labelselector-v1-meta&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Kubernetes meta/v1.LabelSelector&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;ServiceMonitorSelector determines which ServiceMonitors to select for target discovery.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;serviceMonitorNamespaceSelector&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#labelselector-v1-meta&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Kubernetes meta/v1.LabelSelector&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;ServiceMonitorNamespaceSelector is the set of labels that determine which namespaces to watch for ServiceMonitor discovery. If nil, it only checks its own namespace.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;podMonitorSelector&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#labelselector-v1-meta&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Kubernetes meta/v1.LabelSelector&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;PodMonitorSelector determines which PodMonitors to selected for target discovery. Experimental.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;podMonitorNamespaceSelector&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#labelselector-v1-meta&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Kubernetes meta/v1.LabelSelector&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;PodMonitorNamespaceSelector are the set of labels to determine which namespaces to watch for PodMonitor discovery. If nil, it only checks its own namespace.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;probeSelector&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#labelselector-v1-meta&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Kubernetes meta/v1.LabelSelector&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;ProbeSelector determines which Probes to select for target discovery.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;probeNamespaceSelector&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#labelselector-v1-meta&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Kubernetes meta/v1.LabelSelector&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;ProbeNamespaceSelector is the set of labels that determines which namespaces to watch for Probe discovery. If nil, it only checks own namespace.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;remoteWrite&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.RemoteWriteSpec&#34;&gt;[]RemoteWriteSpec&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;RemoteWrite controls remote_write settings for this instance.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;additionalScrapeConfigs&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#secretkeyselector-v1-core&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Kubernetes core/v1.SecretKeySelector&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;AdditionalScrapeConfigs lets you specify a key of a Secret containing additional Grafana Agent Prometheus scrape configurations. The specified scrape configurations are appended to the configurations generated by Grafana Agent Operator. Specified job configurations must have the form specified in the official Prometheus documentation: &lt;a href=&#34;https://prometheus.io/docs/prometheus/latest/configuration/configuration/#scrape_config&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;https://prometheus.io/docs/prometheus/latest/configuration/configuration/#scrape_config&lt;/a&gt;. As scrape configs are appended, you must make sure the configuration is still valid. Note that it&#39;s possible that this feature will break future upgrades of Grafana Agent. Review both Grafana Agent and Prometheus release notes to ensure that no incompatible scrape configs will break Grafana Agent after the upgrade.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;metricsstagespec&#34;&gt;MetricsStageSpec &lt;a name=&#34;monitoring.grafana.com/v1alpha1.MetricsStageSpec&#34;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;(Appears on:&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.PipelineStageSpec&#34;&gt;PipelineStageSpec&lt;/a&gt;)
MetricsStageSpec is an action stage that allows for defining and updating metrics based on data from the extracted map. Created metrics are not pushed to Loki or Prometheus and are instead exposed via the /metrics endpoint of the Grafana Agent pod. The Grafana Agent Operator should be configured with a MetricsInstance that discovers the logging DaemonSet to collect metrics created by this stage.&lt;/p&gt;
&lt;h4 id=&#34;fields-23&#34;&gt;Fields&lt;/h4&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Field&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;type&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;The metric type to create. Must be one of counter, gauge, histogram. Required.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;description&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Sets the description for the created metric.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;prefix&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Sets the custom prefix name for the metric. Defaults to &amp;quot;promtail_custom_&amp;quot;.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;source&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Key from the extracted data map to use for the metric. Defaults to the metrics name if not present.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;maxIdleDuration&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Label values on metrics are dynamic which can cause exported metrics to go stale. To prevent unbounded cardinality, any metrics not updated within MaxIdleDuration are removed.  Must be greater or equal to 1s. Defaults to 5m.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;matchAll&lt;/code&gt;&lt;br/&gt;&lt;em&gt;bool&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;If true, all log lines are counted without attempting to match the source to the extracted map. Mutually exclusive with value.  Only valid for type: counter.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;countEntryBytes&lt;/code&gt;&lt;br/&gt;&lt;em&gt;bool&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;If true all log line bytes are counted. Can only be set with matchAll: true and action: add.  Only valid for type: counter.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;value&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Filters down source data and only changes the metric if the targeted value matches the provided string exactly. If not present, all data matches.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;action&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;The action to take against the metric. Required.  Must be either &amp;quot;inc&amp;quot; or &amp;quot;add&amp;quot; for type: counter or type: histogram. When type: gauge, must be one of &amp;quot;set&amp;quot;, &amp;quot;inc&amp;quot;, &amp;quot;dec&amp;quot;, &amp;quot;add&amp;quot;, or &amp;quot;sub&amp;quot;.  &amp;quot;add&amp;quot;, &amp;quot;set&amp;quot;, or &amp;quot;sub&amp;quot; requires the extracted value to be convertible to a positive float.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;buckets&lt;/code&gt;&lt;br/&gt;&lt;em&gt;[]string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Buckets to create. Bucket values must be convertible to float64s. Extremely large or small numbers are subject to some loss of precision. Only valid for type: histogram.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;metricssubsystemspec&#34;&gt;MetricsSubsystemSpec &lt;a name=&#34;monitoring.grafana.com/v1alpha1.MetricsSubsystemSpec&#34;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;(Appears on:&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.GrafanaAgentSpec&#34;&gt;GrafanaAgentSpec&lt;/a&gt;)
MetricsSubsystemSpec defines global settings to apply across the Metrics subsystem.&lt;/p&gt;
&lt;h4 id=&#34;fields-24&#34;&gt;Fields&lt;/h4&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Field&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;remoteWrite&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.RemoteWriteSpec&#34;&gt;[]RemoteWriteSpec&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;RemoteWrite controls default remote_write settings for all instances. If an instance does not provide its own RemoteWrite settings, these will be used instead.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;replicas&lt;/code&gt;&lt;br/&gt;&lt;em&gt;int32&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Replicas of each shard to deploy for metrics pods. Number of replicas multiplied by the number of shards is the total number of pods created.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;shards&lt;/code&gt;&lt;br/&gt;&lt;em&gt;int32&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Shards to distribute targets onto. Number of replicas multiplied by the number of shards is the total number of pods created. Note that scaling down shards does not reshard data onto remaining instances; it must be manually moved. Increasing shards does not reshard data either, but it will continue to be available from the same instances. Sharding is performed on the content of the &lt;strong&gt;address&lt;/strong&gt; target meta-label.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;replicaExternalLabelName&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;ReplicaExternalLabelName is the name of the metrics external label used to denote the replica name. Defaults to &lt;strong&gt;replica&lt;/strong&gt;. The external label is &lt;em&gt;not&lt;/em&gt; added when the value is set to the empty string.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;metricsExternalLabelName&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;MetricsExternalLabelName is the name of the external label used to denote Grafana Agent cluster. Defaults to &amp;quot;cluster.&amp;quot; The external label is &lt;em&gt;not&lt;/em&gt; added when the value is set to the empty string.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;scrapeInterval&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;ScrapeInterval is the time between consecutive scrapes.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;scrapeTimeout&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;ScrapeTimeout is the time to wait for a target to respond before marking a scrape as failed.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;externalLabels&lt;/code&gt;&lt;br/&gt;&lt;em&gt;map[string]string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;ExternalLabels are labels to add to any time series when sending data over remote_write.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;arbitraryFSAccessThroughSMs&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://prometheus-operator.dev/docs/operator/api/#monitoring.coreos.com/v1.ArbitraryFSAccessThroughSMsConfig&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1.ArbitraryFSAccessThroughSMsConfig&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;ArbitraryFSAccessThroughSMs configures whether configuration based on a ServiceMonitor can access arbitrary files on the file system of the Grafana Agent container, e.g., bearer token files.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;overrideHonorLabels&lt;/code&gt;&lt;br/&gt;&lt;em&gt;bool&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;OverrideHonorLabels, if true, overrides all configured honor_labels read from ServiceMonitor or PodMonitor and sets them to false.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;overrideHonorTimestamps&lt;/code&gt;&lt;br/&gt;&lt;em&gt;bool&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;OverrideHonorTimestamps allows global enforcement for honoring timestamps in all scrape configs.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;ignoreNamespaceSelectors&lt;/code&gt;&lt;br/&gt;&lt;em&gt;bool&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;IgnoreNamespaceSelectors, if true, ignores NamespaceSelector settings from the PodMonitor and ServiceMonitor configs, so that they only discover endpoints within their current namespace.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enforcedNamespaceLabel&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;EnforcedNamespaceLabel enforces adding a namespace label of origin for each metric that is user-created. The label value is always the namespace of the object that is being created.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enforcedSampleLimit&lt;/code&gt;&lt;br/&gt;&lt;em&gt;uint64&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;EnforcedSampleLimit defines a global limit on the number of scraped samples that are accepted. This overrides any SampleLimit set per ServiceMonitor and/or PodMonitor. It is meant to be used by admins to enforce the SampleLimit to keep the overall number of samples and series under the desired limit. Note that if a SampleLimit from a ServiceMonitor or PodMonitor is lower, that value is used instead.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enforcedTargetLimit&lt;/code&gt;&lt;br/&gt;&lt;em&gt;uint64&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;EnforcedTargetLimit defines a global limit on the number of scraped targets. This overrides any TargetLimit set per ServiceMonitor and/or PodMonitor. It is meant to be used by admins to enforce the TargetLimit to keep the overall number of targets under the desired limit. Note that if a TargetLimit from a ServiceMonitor or PodMonitor is higher, that value is used instead.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;instanceSelector&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#labelselector-v1-meta&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Kubernetes meta/v1.LabelSelector&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;InstanceSelector determines which MetricsInstances should be selected for running. Each instance runs its own set of Metrics components, including service discovery, scraping, and remote_write.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;instanceNamespaceSelector&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#labelselector-v1-meta&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Kubernetes meta/v1.LabelSelector&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;InstanceNamespaceSelector is the set of labels that determines which namespaces to watch for MetricsInstances. If not provided, it only checks its own namespace.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;multilinestagespec&#34;&gt;MultilineStageSpec &lt;a name=&#34;monitoring.grafana.com/v1alpha1.MultilineStageSpec&#34;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;(Appears on:&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.PipelineStageSpec&#34;&gt;PipelineStageSpec&lt;/a&gt;)
MultilineStageSpec merges multiple lines into a multiline block before passing it on to the next stage in the pipeline.&lt;/p&gt;
&lt;h4 id=&#34;fields-25&#34;&gt;Fields&lt;/h4&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Field&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;firstLine&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;RE2 regular expression. Creates a new multiline block when matched. Required.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;maxWaitTime&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Maximum time to wait before passing on the multiline block to the next stage if no new lines are received. Defaults to 3s.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;maxLines&lt;/code&gt;&lt;br/&gt;&lt;em&gt;int&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Maximum number of lines a block can have. A new block is started if the number of lines surpasses this value. Defaults to 128.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;objectselector&#34;&gt;ObjectSelector &lt;a name=&#34;monitoring.grafana.com/v1alpha1.ObjectSelector&#34;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;ObjectSelector is a set of selectors to use for finding an object in the resource hierarchy. When NamespaceSelector is nil, search for objects directly in the ParentNamespace.&lt;/p&gt;
&lt;h4 id=&#34;fields-26&#34;&gt;Fields&lt;/h4&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Field&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;ObjectType&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://pkg.go.dev/sigs.k8s.io/controller-runtime/pkg/client#Object&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;sigs.k8s.io/controller-runtime/pkg/client.Object&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;ParentNamespace&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;NamespaceSelector&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#labelselector-v1-meta&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Kubernetes meta/v1.LabelSelector&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;Labels&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#labelselector-v1-meta&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Kubernetes meta/v1.LabelSelector&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;outputstagespec&#34;&gt;OutputStageSpec &lt;a name=&#34;monitoring.grafana.com/v1alpha1.OutputStageSpec&#34;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;(Appears on:&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.PipelineStageSpec&#34;&gt;PipelineStageSpec&lt;/a&gt;)
OutputStageSpec is an action stage that takes data from the extracted map and changes the log line that will be sent to Loki.&lt;/p&gt;
&lt;h4 id=&#34;fields-27&#34;&gt;Fields&lt;/h4&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Field&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;source&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Name from extract data to use for the log entry. Required.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;packstagespec&#34;&gt;PackStageSpec &lt;a name=&#34;monitoring.grafana.com/v1alpha1.PackStageSpec&#34;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;(Appears on:&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.PipelineStageSpec&#34;&gt;PipelineStageSpec&lt;/a&gt;)
PackStageSpec is a transform stage that lets you embed extracted values and labels into the log line by packing the log line and labels inside of a JSON object.&lt;/p&gt;
&lt;h4 id=&#34;fields-28&#34;&gt;Fields&lt;/h4&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Field&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;labels&lt;/code&gt;&lt;br/&gt;&lt;em&gt;[]string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Name from extracted data or line labels. Required. Labels provided here are automatically removed from output labels.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;ingestTimestamp&lt;/code&gt;&lt;br/&gt;&lt;em&gt;bool&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;If the resulting log line should use any existing timestamp or use time.Now() when the line was created. Set to true when combining several log streams from different containers to avoid out of order errors.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;pipelinestagespec&#34;&gt;PipelineStageSpec &lt;a name=&#34;monitoring.grafana.com/v1alpha1.PipelineStageSpec&#34;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;(Appears on:&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.PodLogsSpec&#34;&gt;PodLogsSpec&lt;/a&gt;)
PipelineStageSpec defines an individual pipeline stage. Each stage type is mutually exclusive and no more than one may be set per stage.  More information on pipelines can be found in the Promtail documentation: &lt;a href=&#34;/docs/loki/latest/clients/promtail/pipelines/&#34;&gt;https://grafana.com/docs/loki/latest/clients/promtail/pipelines/&lt;/a&gt;&lt;/p&gt;
&lt;h4 id=&#34;fields-29&#34;&gt;Fields&lt;/h4&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Field&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;cri&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.CRIStageSpec&#34;&gt;CRIStageSpec&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;CRI is a parsing stage that reads log lines using the standard CRI logging format. Supply cri: {} to enable.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;docker&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.DockerStageSpec&#34;&gt;DockerStageSpec&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Docker is a parsing stage that reads log lines using the standard Docker logging format. Supply docker: {} to enable.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;drop&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.DropStageSpec&#34;&gt;DropStageSpec&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Drop is a filtering stage that lets you drop certain logs.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;json&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.JSONStageSpec&#34;&gt;JSONStageSpec&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;JSON is a parsing stage that reads the log line as JSON and accepts JMESPath expressions to extract data.  Information on JMESPath: &lt;a href=&#34;http://jmespath.org/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;http://jmespath.org/&lt;/a&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;labelAllow&lt;/code&gt;&lt;br/&gt;&lt;em&gt;[]string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;LabelAllow is an action stage that only allows the provided labels to be included in the label set that is sent to Loki with the log entry.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;labelDrop&lt;/code&gt;&lt;br/&gt;&lt;em&gt;[]string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;LabelDrop is an action stage that drops labels from the label set that is sent to Loki with the log entry.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;labels&lt;/code&gt;&lt;br/&gt;&lt;em&gt;map[string]string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Labels is an action stage that takes data from the extracted map and modifies the label set that is sent to Loki with the log entry.  The key is REQUIRED and represents the name for the label that will be created. Value is optional and will be the name from extracted data to use for the value of the label. If the value is not provided, it defaults to match the key.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;limit&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.LimitStageSpec&#34;&gt;LimitStageSpec&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Limit is a rate-limiting stage that throttles logs based on several options.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;match&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.MatchStageSpec&#34;&gt;MatchStageSpec&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Match is a filtering stage that conditionally applies a set of stages or drop entries when a log entry matches a configurable LogQL stream selector and filter expressions.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;metrics&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.MetricsStageSpec&#34;&gt;map[string]github.com/grafana/agent/static/operator/apis/monitoring/v1alpha1.MetricsStageSpec&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Metrics is an action stage that supports defining and updating metrics based on data from the extracted map. Created metrics are not pushed to Loki or Prometheus and are instead exposed via the /metrics endpoint of the Grafana Agent pod. The Grafana Agent Operator should be configured with a MetricsInstance that discovers the logging DaemonSet to collect metrics created by this stage.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;multiline&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.MultilineStageSpec&#34;&gt;MultilineStageSpec&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Multiline stage merges multiple lines into a multiline block before passing it on to the next stage in the pipeline.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;output&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.OutputStageSpec&#34;&gt;OutputStageSpec&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Output stage is an action stage that takes data from the extracted map and changes the log line that will be sent to Loki.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;pack&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.PackStageSpec&#34;&gt;PackStageSpec&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Pack is a transform stage that lets you embed extracted values and labels into the log line by packing the log line and labels inside of a JSON object.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;regex&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.RegexStageSpec&#34;&gt;RegexStageSpec&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Regex is a parsing stage that parses a log line using a regular expression.  Named capture groups in the regex allows for adding data into the extracted map.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;replace&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.ReplaceStageSpec&#34;&gt;ReplaceStageSpec&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Replace is a parsing stage that parses a log line using a regular expression and replaces the log line. Named capture groups in the regex allows for adding data into the extracted map.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;template&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.TemplateStageSpec&#34;&gt;TemplateStageSpec&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Template is a transform stage that manipulates the values in the extracted map using Go&#39;s template syntax.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;tenant&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.TenantStageSpec&#34;&gt;TenantStageSpec&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Tenant is an action stage that sets the tenant ID for the log entry picking it from a field in the extracted data map. If the field is missing, the default LogsClientSpec.tenantId will be used.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;timestamp&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.TimestampStageSpec&#34;&gt;TimestampStageSpec&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Timestamp is an action stage that can change the timestamp of a log line before it is sent to Loki. If not present, the timestamp of a log line defaults to the time when the log line was read.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;podlogs&#34;&gt;PodLogs &lt;a name=&#34;monitoring.grafana.com/v1alpha1.PodLogs&#34;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;(Appears on:&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.LogsDeployment&#34;&gt;LogsDeployment&lt;/a&gt;)
PodLogs defines how to collect logs for a pod.&lt;/p&gt;
&lt;h4 id=&#34;fields-30&#34;&gt;Fields&lt;/h4&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Field&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;metadata&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#objectmeta-v1-meta&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Kubernetes meta/v1.ObjectMeta&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Refer to the Kubernetes API documentation for the fields of the &lt;code&gt;metadata&lt;/code&gt; field.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;spec&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.PodLogsSpec&#34;&gt;PodLogsSpec&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Spec holds the specification of the desired behavior for the PodLogs.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;jobLabel&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;The label to use to retrieve the job name from.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;podTargetLabels&lt;/code&gt;&lt;br/&gt;&lt;em&gt;[]string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;PodTargetLabels transfers labels on the Kubernetes Pod onto the target.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;selector&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#labelselector-v1-meta&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Kubernetes meta/v1.LabelSelector&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Selector to select Pod objects. Required.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;namespaceSelector&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://prometheus-operator.dev/docs/operator/api/#monitoring.coreos.com/v1.NamespaceSelector&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1.NamespaceSelector&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Selector to select which namespaces the Pod objects are discovered from.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;pipelineStages&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.PipelineStageSpec&#34;&gt;[]PipelineStageSpec&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Pipeline stages for this pod. Pipeline stages support transforming and filtering log lines.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;relabelings&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://prometheus-operator.dev/docs/operator/api/#monitoring.coreos.com/v1.RelabelConfig&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;[]github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1.RelabelConfig&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;RelabelConfigs to apply to logs before delivering. Grafana Agent Operator automatically adds relabelings for a few standard Kubernetes fields and replaces original scrape job name with __tmp_logs_job_name.  More info: &lt;a href=&#34;/docs/loki/latest/clients/promtail/configuration/#relabel_configs&#34;&gt;https://grafana.com/docs/loki/latest/clients/promtail/configuration/#relabel_configs&lt;/a&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;podlogsspec&#34;&gt;PodLogsSpec &lt;a name=&#34;monitoring.grafana.com/v1alpha1.PodLogsSpec&#34;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;(Appears on:&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.PodLogs&#34;&gt;PodLogs&lt;/a&gt;)
PodLogsSpec defines how to collect logs for a pod.&lt;/p&gt;
&lt;h4 id=&#34;fields-31&#34;&gt;Fields&lt;/h4&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Field&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;jobLabel&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;The label to use to retrieve the job name from.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;podTargetLabels&lt;/code&gt;&lt;br/&gt;&lt;em&gt;[]string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;PodTargetLabels transfers labels on the Kubernetes Pod onto the target.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;selector&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#labelselector-v1-meta&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Kubernetes meta/v1.LabelSelector&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Selector to select Pod objects. Required.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;namespaceSelector&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://prometheus-operator.dev/docs/operator/api/#monitoring.coreos.com/v1.NamespaceSelector&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1.NamespaceSelector&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Selector to select which namespaces the Pod objects are discovered from.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;pipelineStages&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.PipelineStageSpec&#34;&gt;[]PipelineStageSpec&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Pipeline stages for this pod. Pipeline stages support transforming and filtering log lines.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;relabelings&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://prometheus-operator.dev/docs/operator/api/#monitoring.coreos.com/v1.RelabelConfig&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;[]github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1.RelabelConfig&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;RelabelConfigs to apply to logs before delivering. Grafana Agent Operator automatically adds relabelings for a few standard Kubernetes fields and replaces original scrape job name with __tmp_logs_job_name.  More info: &lt;a href=&#34;/docs/loki/latest/clients/promtail/configuration/#relabel_configs&#34;&gt;https://grafana.com/docs/loki/latest/clients/promtail/configuration/#relabel_configs&lt;/a&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;queueconfig&#34;&gt;QueueConfig &lt;a name=&#34;monitoring.grafana.com/v1alpha1.QueueConfig&#34;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;(Appears on:&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.RemoteWriteSpec&#34;&gt;RemoteWriteSpec&lt;/a&gt;)
QueueConfig allows the tuning of remote_write queue_config parameters.&lt;/p&gt;
&lt;h4 id=&#34;fields-32&#34;&gt;Fields&lt;/h4&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Field&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;capacity&lt;/code&gt;&lt;br/&gt;&lt;em&gt;int&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Capacity is the number of samples to buffer per shard before samples start being dropped.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;minShards&lt;/code&gt;&lt;br/&gt;&lt;em&gt;int&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;MinShards is the minimum number of shards, i.e., the amount of concurrency.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;maxShards&lt;/code&gt;&lt;br/&gt;&lt;em&gt;int&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;MaxShards is the maximum number of shards, i.e., the amount of concurrency.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;maxSamplesPerSend&lt;/code&gt;&lt;br/&gt;&lt;em&gt;int&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;MaxSamplesPerSend is the maximum number of samples per send.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;batchSendDeadline&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;BatchSendDeadline is the maximum time a sample will wait in the buffer.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;maxRetries&lt;/code&gt;&lt;br/&gt;&lt;em&gt;int&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;MaxRetries is the maximum number of times to retry a batch on recoverable errors.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;minBackoff&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;MinBackoff is the initial retry delay. MinBackoff is doubled for every retry.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;maxBackoff&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;MaxBackoff is the maximum retry delay.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;retryOnRateLimit&lt;/code&gt;&lt;br/&gt;&lt;em&gt;bool&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;RetryOnRateLimit retries requests when encountering rate limits.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;regexstagespec&#34;&gt;RegexStageSpec &lt;a name=&#34;monitoring.grafana.com/v1alpha1.RegexStageSpec&#34;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;(Appears on:&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.PipelineStageSpec&#34;&gt;PipelineStageSpec&lt;/a&gt;)
RegexStageSpec is a parsing stage that parses a log line using a regular expression. Named capture groups in the regex allows for adding data into the extracted map.&lt;/p&gt;
&lt;h4 id=&#34;fields-33&#34;&gt;Fields&lt;/h4&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Field&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;source&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Name from extracted data to parse. If empty, defaults to using the log message.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;expression&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;RE2 regular expression. Each capture group MUST be named. Required.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;remotewritespec&#34;&gt;RemoteWriteSpec &lt;a name=&#34;monitoring.grafana.com/v1alpha1.RemoteWriteSpec&#34;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;(Appears on:&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.MetricsInstanceSpec&#34;&gt;MetricsInstanceSpec&lt;/a&gt;, &lt;a href=&#34;#monitoring.grafana.com/v1alpha1.MetricsSubsystemSpec&#34;&gt;MetricsSubsystemSpec&lt;/a&gt;)
RemoteWriteSpec defines the remote_write configuration for Prometheus.&lt;/p&gt;
&lt;h4 id=&#34;fields-34&#34;&gt;Fields&lt;/h4&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Field&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;name&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Name of the remote_write queue. Must be unique if specified. The name is used in metrics and logging in order to differentiate queues.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;url&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;URL of the endpoint to send samples to.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;remoteTimeout&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;RemoteTimeout is the timeout for requests to the remote_write endpoint.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;headers&lt;/code&gt;&lt;br/&gt;&lt;em&gt;map[string]string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Headers is a set of custom HTTP headers to be sent along with each remote_write request. Be aware that any headers set by Grafana Agent itself can&#39;t be overwritten.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;writeRelabelConfigs&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://prometheus-operator.dev/docs/operator/api/#monitoring.coreos.com/v1.RelabelConfig&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;[]github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1.RelabelConfig&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;WriteRelabelConfigs holds relabel_configs to relabel samples before they are sent to the remote_write endpoint.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;basicAuth&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://prometheus-operator.dev/docs/operator/api/#monitoring.coreos.com/v1.BasicAuth&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1.BasicAuth&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;BasicAuth for the URL.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;oauth2&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://prometheus-operator.dev/docs/operator/api/#monitoring.coreos.com/v1.OAuth2&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1.OAuth2&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Oauth2 for URL&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;bearerToken&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;BearerToken used for remote_write.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;bearerTokenFile&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;BearerTokenFile used to read bearer token.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;sigv4&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.SigV4Config&#34;&gt;SigV4Config&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;SigV4 configures SigV4-based authentication to the remote_write endpoint. SigV4-based authentication is used if SigV4 is defined, even with an empty object.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;tlsConfig&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://prometheus-operator.dev/docs/operator/api/#monitoring.coreos.com/v1.TLSConfig&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1.TLSConfig&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;TLSConfig to use for remote_write.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;proxyUrl&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;ProxyURL to proxy requests through. Optional.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;queueConfig&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.QueueConfig&#34;&gt;QueueConfig&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;QueueConfig allows tuning of the remote_write queue parameters.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;metadataConfig&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.MetadataConfig&#34;&gt;MetadataConfig&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;MetadataConfig configures the sending of series metadata to remote storage.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;replacestagespec&#34;&gt;ReplaceStageSpec &lt;a name=&#34;monitoring.grafana.com/v1alpha1.ReplaceStageSpec&#34;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;(Appears on:&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.PipelineStageSpec&#34;&gt;PipelineStageSpec&lt;/a&gt;)
ReplaceStageSpec is a parsing stage that parses a log line using a regular expression and replaces the log line. Named capture groups in the regex allows for adding data into the extracted map.&lt;/p&gt;
&lt;h4 id=&#34;fields-35&#34;&gt;Fields&lt;/h4&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Field&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;source&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Name from extracted data to parse. If empty, defaults to using the log message.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;expression&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;RE2 regular expression. Each capture group MUST be named. Required.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;replace&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Value to replace the captured group with.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;sigv4config&#34;&gt;SigV4Config &lt;a name=&#34;monitoring.grafana.com/v1alpha1.SigV4Config&#34;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;(Appears on:&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.RemoteWriteSpec&#34;&gt;RemoteWriteSpec&lt;/a&gt;)
SigV4Config specifies configuration to perform SigV4 authentication.&lt;/p&gt;
&lt;h4 id=&#34;fields-36&#34;&gt;Fields&lt;/h4&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Field&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;region&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Region of the AWS endpoint. If blank, the region from the default credentials chain is used.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;accessKey&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#secretkeyselector-v1-core&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Kubernetes core/v1.SecretKeySelector&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;AccessKey holds the secret of the AWS API access key to use for signing. If not provided, the environment variable AWS_ACCESS_KEY_ID is used.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;secretKey&lt;/code&gt;&lt;br/&gt;&lt;em&gt;&lt;a href=&#34;https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#secretkeyselector-v1-core&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Kubernetes core/v1.SecretKeySelector&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;SecretKey of the AWS API to use for signing. If blank, the environment variable AWS_SECRET_ACCESS_KEY is used.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;profile&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Profile is the named AWS profile to use for authentication.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;roleARN&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;RoleARN is the AWS Role ARN to use for authentication, as an alternative for using the AWS API keys.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;templatestagespec&#34;&gt;TemplateStageSpec &lt;a name=&#34;monitoring.grafana.com/v1alpha1.TemplateStageSpec&#34;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;(Appears on:&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.PipelineStageSpec&#34;&gt;PipelineStageSpec&lt;/a&gt;)
TemplateStageSpec is a transform stage that manipulates the values in the extracted map using Go&#39;s template syntax.&lt;/p&gt;
&lt;h4 id=&#34;fields-37&#34;&gt;Fields&lt;/h4&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Field&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;source&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Name from extracted data to parse. Required. If empty, defaults to using the log message.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;template&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Go template string to use. Required. In addition to normal template functions, ToLower, ToUpper, Replace, Trim, TrimLeft, TrimRight, TrimPrefix, and TrimSpace are also available.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;tenantstagespec&#34;&gt;TenantStageSpec &lt;a name=&#34;monitoring.grafana.com/v1alpha1.TenantStageSpec&#34;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;(Appears on:&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.PipelineStageSpec&#34;&gt;PipelineStageSpec&lt;/a&gt;)
TenantStageSpec is an action stage that sets the tenant ID for the log entry picking it from a field in the extracted data map.&lt;/p&gt;
&lt;h4 id=&#34;fields-38&#34;&gt;Fields&lt;/h4&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Field&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;label&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Name from labels whose value should be set as tenant ID. Mutually exclusive with source and value.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;source&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Name from extracted data to use as the tenant ID. Mutually exclusive with label and value.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;value&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Value to use for the template ID. Useful when this stage is used within a conditional pipeline such as match. Mutually exclusive with label and source.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;timestampstagespec&#34;&gt;TimestampStageSpec &lt;a name=&#34;monitoring.grafana.com/v1alpha1.TimestampStageSpec&#34;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;(Appears on:&lt;a href=&#34;#monitoring.grafana.com/v1alpha1.PipelineStageSpec&#34;&gt;PipelineStageSpec&lt;/a&gt;)
TimestampStageSpec is an action stage that can change the timestamp of a log line before it is sent to Loki.&lt;/p&gt;
&lt;h4 id=&#34;fields-39&#34;&gt;Fields&lt;/h4&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Field&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;source&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Name from extracted data to use as the timestamp. Required.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;format&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Determines format of the time string. Required. Can be one of: ANSIC, UnixDate, RubyDate, RFC822, RFC822Z, RFC850, RFC1123, RFC1123Z, RFC3339, RFC3339Nano, Unix, UnixMs, UnixUs, UnixNs.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;fallbackFormats&lt;/code&gt;&lt;br/&gt;&lt;em&gt;[]string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Fallback formats to try if format fails.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;location&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;IANA Timezone Database string.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;actionOnFailure&lt;/code&gt;&lt;br/&gt;&lt;em&gt;string&lt;/em&gt;&lt;/td&gt;
              &lt;td&gt;Action to take when the timestamp can&#39;t be extracted or parsed. Can be skip or fudge. Defaults to fudge.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;]]></content><description>&lt;h1 id="custom-resource-definition-reference">Custom Resource Definition Reference&lt;/h1>
&lt;h2 id="resource-types">Resource Types:&lt;/h2>
&lt;ul>
&lt;li>&lt;a href="#monitoring.grafana.com/v1alpha1.Deployment">Deployment&lt;/a>&lt;/li>
&lt;li>&lt;a href="#monitoring.grafana.com/v1alpha1.GrafanaAgent">GrafanaAgent&lt;/a>&lt;/li>
&lt;li>&lt;a href="#monitoring.grafana.com/v1alpha1.IntegrationsDeployment">IntegrationsDeployment&lt;/a>&lt;/li>
&lt;li>&lt;a href="#monitoring.grafana.com/v1alpha1.LogsDeployment">LogsDeployment&lt;/a>&lt;/li>
&lt;li>&lt;a href="#monitoring.grafana.com/v1alpha1.MetricsDeployment">MetricsDeployment&lt;/a>&lt;/li>
&lt;/ul>
&lt;h3 id="deployment">Deployment &lt;a name="monitoring.grafana.com/v1alpha1.Deployment">&lt;/a>&lt;/h3>
&lt;p>Deployment is a set of discovered resources relative to a GrafanaAgent. The tree of resources contained in a Deployment form the resource hierarchy used for reconciling a GrafanaAgent.&lt;/p></description></item><item><title>Release notes for Grafana Agent Operator</title><link>https://grafana.com/docs/agent/v0.43/operator/release-notes/</link><pubDate>Wed, 11 Sep 2024 17:43:35 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.43/operator/release-notes/</guid><content><![CDATA[&lt;h1 id=&#34;release-notes-for-grafana-agent-operator&#34;&gt;Release notes for Grafana Agent Operator&lt;/h1&gt;
&lt;p&gt;The release notes provide information about deprecations and breaking changes in Grafana Agent static mode Kubernetes operator.&lt;/p&gt;
&lt;p&gt;For a complete list of changes to Grafana Agent, with links to pull requests and related issues when available, refer to the &lt;a href=&#34;https://github.com/grafana/agent/blob/main/CHANGELOG.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Changelog&lt;/a&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; These release notes are specific to the Static mode Kubernetes Operator.
Other release notes for the different Grafana Agent variants are contained on separate pages:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
    &lt;a href=&#34;/docs/agent/v0.43/static/release-notes/&#34;&gt;Static mode release notes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
    &lt;a href=&#34;/docs/agent/v0.43/flow/release-notes/&#34;&gt;Flow mode release notes&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/blockquote&gt;
&lt;h2 id=&#34;v033&#34;&gt;v0.33&lt;/h2&gt;
&lt;h3 id=&#34;symbolic-links-in-docker-containers-removed&#34;&gt;Symbolic links in Docker containers removed&lt;/h3&gt;
&lt;p&gt;We&amp;rsquo;ve removed the deprecated symbolic links to &lt;code&gt;/bin/agent*&lt;/code&gt; in Docker
containers, as planned in v0.31. In case you&amp;rsquo;re setting a custom entrypoint,
use the new binaries that are prefixed with &lt;code&gt;/bin/grafana*&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&#34;v031&#34;&gt;v0.31&lt;/h2&gt;
&lt;h3 id=&#34;breaking-change-binary-names-are-now-prefixed-with-grafana-&#34;&gt;Breaking change: binary names are now prefixed with &lt;code&gt;grafana-&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;As first announced in v0.29, the &lt;code&gt;grafana-operator&lt;/code&gt; release binary names is now
prefixed with &lt;code&gt;grafana-&lt;/code&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;agent-operator&lt;/code&gt; is now &lt;code&gt;grafana-agent-operator&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For the &lt;code&gt;grafana/agent-operator&lt;/code&gt; Docker container, the entrypoint is now
&lt;code&gt;/bin/grafana-agent-operator&lt;/code&gt;. A symbolic link from &lt;code&gt;/bin/agent-operator&lt;/code&gt; to
the new binary has been added.&lt;/p&gt;
&lt;p&gt;Symbolic links will be removed in v0.33. Custom entrypoints must be
updated prior to v0.33 to use the new binaries before the symbolic links get
removed.&lt;/p&gt;
&lt;h2 id=&#34;v029&#34;&gt;v0.29&lt;/h2&gt;
&lt;h3 id=&#34;deprecation-binary-names-will-be-prefixed-with-grafana--in-v0310&#34;&gt;Deprecation: binary names will be prefixed with &lt;code&gt;grafana-&lt;/code&gt; in v0.31.0&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;agent-operator&lt;/code&gt; binary name has been deprecated and will be renamed to
&lt;code&gt;grafana-agent-operator&lt;/code&gt; in the v0.31.0 release.&lt;/p&gt;
&lt;p&gt;As part of this change, the Docker container for the v0.31.0 release will
include symbolic links from the old binary names to the new binary names.&lt;/p&gt;
&lt;p&gt;There is no action to take at this time.&lt;/p&gt;
&lt;h2 id=&#34;v024&#34;&gt;v0.24&lt;/h2&gt;
&lt;h3 id=&#34;breaking-change-grafana-agent-operator-supported-agent-versions&#34;&gt;Breaking change: Grafana Agent Operator supported Agent versions&lt;/h3&gt;
&lt;p&gt;The v0.24.0 release of Grafana Agent Operator can no longer deploy versions of
Grafana Agent prior to v0.24.0.&lt;/p&gt;
&lt;h2 id=&#34;v019&#34;&gt;v0.19&lt;/h2&gt;
&lt;h3 id=&#34;rename-of-prometheus-to-metrics-breaking-change&#34;&gt;Rename of Prometheus to Metrics (Breaking change)&lt;/h3&gt;
&lt;p&gt;As a part of the deprecation of &amp;ldquo;Prometheus,&amp;rdquo; all Operator CRDs and fields with
&amp;ldquo;Prometheus&amp;rdquo; in the name have changed to &amp;ldquo;Metrics.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;This includes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;code&gt;PrometheusInstance&lt;/code&gt; CRD is now &lt;code&gt;MetricsInstance&lt;/code&gt; (referenced by
&lt;code&gt;metricsinstances&lt;/code&gt; and not &lt;code&gt;metrics-instances&lt;/code&gt; within ClusterRoles).&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;Prometheus&lt;/code&gt; field of the &lt;code&gt;GrafanaAgent&lt;/code&gt; resource is now &lt;code&gt;Metrics&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PrometheusExternalLabelName&lt;/code&gt; is now &lt;code&gt;MetricsExternalLabelName&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This is a hard breaking change, and all fields must change accordingly for the
operator to continue working.&lt;/p&gt;
&lt;p&gt;Note that old CRDs with the old hyphenated names must be deleted (&lt;code&gt;kubectl delete crds/{grafana-agents,prometheus-instances}&lt;/code&gt;) for ClusterRoles to work
correctly.&lt;/p&gt;
&lt;p&gt;To do a zero-downtime upgrade of the Operator when there is a breaking change,
refer to the new &lt;code&gt;agentctl operator-detatch&lt;/code&gt; command: this will iterate through
all of your objects and remove any OwnerReferences to a CRD, allowing you to
delete your Operator CRDs or CRs.&lt;/p&gt;
&lt;h3 id=&#34;rename-of-crd-paths-breaking-change&#34;&gt;Rename of CRD paths (Breaking change)&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;prometheus-instances&lt;/code&gt; and &lt;code&gt;grafana-agents&lt;/code&gt; have been renamed to
&lt;code&gt;metricsinstances&lt;/code&gt; and &lt;code&gt;grafanaagents&lt;/code&gt; respectively. This is to remain
consistent with how Kubernetes names multi-word objects.&lt;/p&gt;
&lt;p&gt;As a result, you will need to update your ClusterRoles to change the path of
resources.&lt;/p&gt;
&lt;p&gt;To do a zero-downtime upgrade of the Operator when there is a breaking change,
refer to the new &lt;code&gt;agentctl operator-detatch&lt;/code&gt; command: this will iterate through
all of your objects and remove any OwnerReferences to a CRD, allowing you to
delete your Operator CRDs or CRs.&lt;/p&gt;
&lt;p&gt;Example old ClusterRole:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;YAML&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-yaml&#34;&gt;apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: grafana-agent-operator
rules:
- apiGroups: [monitoring.grafana.com]
  resources:
  - grafana-agents
  - prometheus-instances
  verbs: [get, list, watch]&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Example new ClusterRole:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;YAML&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-yaml&#34;&gt;apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: grafana-agent-operator
rules:
- apiGroups: [monitoring.grafana.com]
  resources:
  - grafanaagents
  - metricsinstances
  verbs: [get, list, watch]&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="release-notes-for-grafana-agent-operator">Release notes for Grafana Agent Operator&lt;/h1>
&lt;p>The release notes provide information about deprecations and breaking changes in Grafana Agent static mode Kubernetes operator.&lt;/p>
&lt;p>For a complete list of changes to Grafana Agent, with links to pull requests and related issues when available, refer to the &lt;a href="https://github.com/grafana/agent/blob/main/CHANGELOG.md" target="_blank" rel="noopener noreferrer">Changelog&lt;/a>.&lt;/p></description></item></channel></rss>