diff --git a/.github/workflows/helm-release.yml.disabled b/.github/workflows/helm-release.yml.disabled index 94caa2fd3f..18e3744506 100644 --- a/.github/workflows/helm-release.yml.disabled +++ b/.github/workflows/helm-release.yml.disabled @@ -130,7 +130,7 @@ jobs: # Note that this creates a release in grafana/helm-charts with a new tag. # The tag name in grafana/helm-charts is -, while the - # tag name for grafana/agent is helm-chart/. + # tag name for grafana/alloy is helm-chart/. - name: Make github release uses: softprops/action-gh-release@v1 with: diff --git a/.github/workflows/helm-test.yml b/.github/workflows/helm-test.yml index 378623eebb..a705d78f23 100644 --- a/.github/workflows/helm-test.yml +++ b/.github/workflows/helm-test.yml @@ -10,7 +10,7 @@ jobs: - name: Regenerate docs run: | docker run --rm \ - -v "$(pwd)/operations/helm/charts/grafana-agent:/helm-docs" \ + -v "$(pwd)/operations/helm/charts/alloy:/helm-docs" \ -u "$(id -u)" \ jnorwood/helm-docs if ! git diff --exit-code; then diff --git a/Makefile b/Makefile index e6d823b3eb..47ce69da76 100644 --- a/Makefile +++ b/Makefile @@ -229,7 +229,7 @@ generate-helm-docs: ifeq ($(USE_CONTAINER),1) $(RERUN_IN_CONTAINER) else - cd operations/helm/charts/grafana-agent && helm-docs + cd operations/helm/charts/alloy && helm-docs endif generate-helm-tests: diff --git a/docs/sources/tasks/configure/configure-kubernetes.md b/docs/sources/tasks/configure/configure-kubernetes.md index 822102f80f..e8709d4056 100644 --- a/docs/sources/tasks/configure/configure-kubernetes.md +++ b/docs/sources/tasks/configure/configure-kubernetes.md @@ -19,7 +19,7 @@ To configure {{< param "PRODUCT_NAME" >}} on Kubernetes, perform the following s 1. Run the following command in a terminal to upgrade your {{< param "PRODUCT_NAME" >}} installation: ```shell - helm upgrade RELEASE_NAME grafana/grafana-agent -f VALUES_PATH + helm upgrade RELEASE_NAME grafana/alloy -f VALUES_PATH ``` 1. Replace `RELEASE_NAME` with the name you used for your {{< param "PRODUCT_NAME" >}} installation. @@ -38,12 +38,12 @@ The following is an example snippet of a `kustomization` that disables this beha ```yaml configMapGenerator: - - name: grafana-agent + - name: alloy files: - config.river options: disableNameSuffixHash: true ``` -[values.yaml]: https://raw.githubusercontent.com/grafana/agent/main/operations/helm/charts/grafana-agent/values.yaml -[Helm chart]: https://github.com/grafana/agent/tree/main/operations/helm/charts/grafana-agent +[values.yaml]: https://raw.githubusercontent.com/grafana/alloy/main/operations/helm/charts/alloy/values.yaml +[Helm chart]: https://github.com/grafana/alloy/tree/main/operations/helm/charts/alloy [Kustomize]: https://kubernetes.io/docs/tasks/manage-kubernetes-objects/kustomization/ diff --git a/docs/sources/tasks/migrate/from-operator.md b/docs/sources/tasks/migrate/from-operator.md index 48b0af6cca..c01edd7c03 100644 --- a/docs/sources/tasks/migrate/from-operator.md +++ b/docs/sources/tasks/migrate/from-operator.md @@ -279,7 +279,7 @@ However, all static mode integrations have an equivalent component in the [`prom The [reference documentation][component documentation] should help convert those integrations to their {{< param "PRODUCT_NAME" >}} equivalent. -[default values]: https://github.com/grafana/alloy/blob/main/operations/helm/charts/grafana-agent/values.yaml +[default values]: https://github.com/grafana/alloy/blob/main/operations/helm/charts/alloy/values.yaml [clustering]: ../../../concepts/clustering/ [deployment guide]: ../../../get-started/deploy-alloy diff --git a/internal/component/loki/source/podlogs/internal/apis/monitoring/v1alpha2/doc.go b/internal/component/loki/source/podlogs/internal/apis/monitoring/v1alpha2/doc.go index ec4a8f557d..fbd99f5d4d 100644 --- a/internal/component/loki/source/podlogs/internal/apis/monitoring/v1alpha2/doc.go +++ b/internal/component/loki/source/podlogs/internal/apis/monitoring/v1alpha2/doc.go @@ -2,6 +2,6 @@ // +groupName=monitoring.grafana.com //go:generate controller-gen object paths=. -//go:generate controller-gen crd:crdVersions=v1 paths=. output:crd:dir=../../../../../../../../operations/helm/charts/grafana-agent/crds +//go:generate controller-gen crd:crdVersions=v1 paths=. output:crd:dir=../../../../../../../../operations/helm/charts/alloy/crds package v1alpha2 diff --git a/internal/component/loki/source/podlogs/internal/apis/monitoring/v1alpha2/types.go b/internal/component/loki/source/podlogs/internal/apis/monitoring/v1alpha2/types.go index f5c1f74a0c..16163ee04c 100644 --- a/internal/component/loki/source/podlogs/internal/apis/monitoring/v1alpha2/types.go +++ b/internal/component/loki/source/podlogs/internal/apis/monitoring/v1alpha2/types.go @@ -8,8 +8,8 @@ import ( // +genclient // +kubebuilder:object:root=true // +kubebuilder:resource:path="podlogs" -// +kubebuilder:resource:path="podlogs" -// +kubebuilder:resource:categories="grafana-agent" +// +kubebuilder:resource:categories="grafana-alloy" +// +kubebuilder:resource:categories="alloy" // PodLogs defines how to collect logs for a Pod. type PodLogs struct { diff --git a/operations/helm/Makefile b/operations/helm/Makefile index 5cf89398a5..de7f25a59e 100644 --- a/operations/helm/Makefile +++ b/operations/helm/Makefile @@ -1,6 +1,6 @@ # Docs generated by https://github.com/norwoodj/helm-docs docs: - cd charts/grafana-agent && helm-docs + cd charts/alloy && helm-docs rebuild-tests: bash ./scripts/rebuild-tests.sh diff --git a/operations/helm/README.md b/operations/helm/README.md index eeead5738d..fb74f072c1 100644 --- a/operations/helm/README.md +++ b/operations/helm/README.md @@ -1,6 +1,6 @@ # Helm charts -This directory contains Helm charts for Grafana Agent. +This directory contains Helm charts for Grafana Alloy. ## Testing @@ -11,7 +11,7 @@ correctness of the templates emitted by the Helm chart. To regenerate this folder, call `make rebuild-tests` from the root of the repository. `make generate-helm-tests` will iterate through the value.yaml files in -`charts/grafana-agent/ci` and generate each one as a separate directory under `charts/grafana-agent/tests`. +`charts/alloy/ci` and generate each one as a separate directory under `charts/alloy/tests`. When modifying the Helm charts, `make rebuild-tests` must be run before submitting a PR, as a linter check will ensure that this directory is diff --git a/operations/helm/charts/grafana-agent/.helmignore b/operations/helm/charts/alloy/.helmignore similarity index 100% rename from operations/helm/charts/grafana-agent/.helmignore rename to operations/helm/charts/alloy/.helmignore diff --git a/operations/helm/charts/alloy/CHANGELOG.md b/operations/helm/charts/alloy/CHANGELOG.md new file mode 100644 index 0000000000..41dff46d15 --- /dev/null +++ b/operations/helm/charts/alloy/CHANGELOG.md @@ -0,0 +1,17 @@ +# Changelog + +> _Contributors should read our [contributors guide][] for instructions on how +> to update the changelog._ + +This document contains a historical list of changes between releases. Only +changes that impact end-user behavior are listed; changes to documentation or +internal API changes are not present. + +0.1.0 (2024-04-09) +------------------ + +### Features + +- Introduce a Grafana Alloy Helm chart. The Grafana Alloy Helm chart is + backwards compatibile with the values.yaml from the `grafana-agent` Helm + chart. (@rfratto) diff --git a/operations/helm/charts/grafana-agent/Chart.yaml b/operations/helm/charts/alloy/Chart.yaml similarity index 56% rename from operations/helm/charts/grafana-agent/Chart.yaml rename to operations/helm/charts/alloy/Chart.yaml index 9bb6a1de2c..d24a9248c1 100644 --- a/operations/helm/charts/grafana-agent/Chart.yaml +++ b/operations/helm/charts/alloy/Chart.yaml @@ -1,9 +1,9 @@ apiVersion: v2 -name: grafana-agent -description: 'Grafana Agent' +name: alloy +description: 'Grafana Alloy' type: application -version: 0.36.0 -appVersion: 'v0.40.2' +version: 0.1.0 +appVersion: 'v1.0.0' dependencies: - name: crds diff --git a/operations/helm/charts/grafana-agent/README.md b/operations/helm/charts/alloy/README.md similarity index 66% rename from operations/helm/charts/grafana-agent/README.md rename to operations/helm/charts/alloy/README.md index 51ea7498b6..640219358d 100644 --- a/operations/helm/charts/grafana-agent/README.md +++ b/operations/helm/charts/alloy/README.md @@ -1,10 +1,10 @@ -# Grafana Agent Helm chart +# Grafana Alloy Helm chart -![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![Version: 0.36.0](https://img.shields.io/badge/Version-0.36.0-informational?style=flat-square) ![AppVersion: v0.40.2](https://img.shields.io/badge/AppVersion-v0.40.2-informational?style=flat-square) +![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![AppVersion: v1.0.0](https://img.shields.io/badge/AppVersion-v1.0.0-informational?style=flat-square) -Helm chart for deploying [Grafana Agent][] to Kubernetes. +Helm chart for deploying [Grafana Alloy][] to Kubernetes. -[Grafana Agent]: https://grafana.com/docs/agent/latest/ +[Grafana Alloy]: https://grafana.com/docs/alloy/latest/ ## Usage @@ -19,9 +19,9 @@ helm repo update To install the chart with the release name my-release: -`helm install my-release grafana/grafana-agent` +`helm install my-release grafana/alloy` -This chart installs one instance of Grafana Agent into your Kubernetes cluster +This chart installs one instance of Grafana Alloy into your Kubernetes cluster using a specific Kubernetes controller. By default, DaemonSet is used. The `controller.type` value can be used to change the controller to either a StatefulSet or Deployment. @@ -29,41 +29,32 @@ StatefulSet or Deployment. Creating multiple installations of the Helm chart with different controllers is useful if just using the default DaemonSet isn't sufficient. -## Flow mode is the default - -By default, [Grafana Agent Flow][Flow] is deployed. To opt out of Flow mode and -use the older mode (called "static mode"), set the `agent.mode` value to -`static`. - -[Flow]: https://grafana.com/docs/agent/latest/flow/ - ## Values | Key | Type | Default | Description | |-----|------|---------|-------------| -| agent.clustering.enabled | bool | `false` | Deploy agents in a cluster to allow for load distribution. Only applies when agent.mode=flow. | -| agent.configMap.content | string | `""` | Content to assign to the new ConfigMap. This is passed into `tpl` allowing for templating from values. | -| agent.configMap.create | bool | `true` | Create a new ConfigMap for the config file. | -| agent.configMap.key | string | `nil` | Key in ConfigMap to get config from. | -| agent.configMap.name | string | `nil` | Name of existing ConfigMap to use. Used when create is false. | -| agent.enableReporting | bool | `true` | Enables sending Grafana Labs anonymous usage stats to help improve Grafana Agent. | -| agent.envFrom | list | `[]` | Maps all the keys on a ConfigMap or Secret as environment variables. https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#envfromsource-v1-core | -| agent.extraArgs | list | `[]` | Extra args to pass to `agent run`: https://grafana.com/docs/agent/latest/flow/reference/cli/run/ | -| agent.extraEnv | list | `[]` | Extra environment variables to pass to the agent container. | -| agent.extraPorts | list | `[]` | Extra ports to expose on the Agent | -| agent.listenAddr | string | `"0.0.0.0"` | Address to listen for traffic on. 0.0.0.0 exposes the UI to other containers. | -| agent.listenPort | int | `80` | Port to listen for traffic on. | -| agent.listenScheme | string | `"HTTP"` | Scheme is needed for readiness probes. If enabling tls in your configs, set to "HTTPS" | -| agent.mode | string | `"flow"` | Mode to run Grafana Agent in. Can be "flow" or "static". | -| agent.mounts.dockercontainers | bool | `false` | Mount /var/lib/docker/containers from the host into the container for log collection. | -| agent.mounts.extra | list | `[]` | Extra volume mounts to add into the Grafana Agent container. Does not affect the watch container. | -| agent.mounts.varlog | bool | `false` | Mount /var/log from the host into the container for log collection. | -| agent.resources | object | `{}` | Resource requests and limits to apply to the Grafana Agent container. | -| agent.securityContext | object | `{}` | Security context to apply to the Grafana Agent container. | -| agent.storagePath | string | `"/tmp/agent"` | Path to where Grafana Agent stores data (for example, the Write-Ahead Log). By default, data is lost between reboots. | -| agent.uiPathPrefix | string | `"/"` | Base path where the UI is exposed. | +| alloy.clustering.enabled | bool | `false` | Deploy Alloy in a cluster to allow for load distribution. | +| alloy.configMap.content | string | `""` | Content to assign to the new ConfigMap. This is passed into `tpl` allowing for templating from values. | +| alloy.configMap.create | bool | `true` | Create a new ConfigMap for the config file. | +| alloy.configMap.key | string | `nil` | Key in ConfigMap to get config from. | +| alloy.configMap.name | string | `nil` | Name of existing ConfigMap to use. Used when create is false. | +| alloy.enableReporting | bool | `true` | Enables sending Grafana Labs anonymous usage stats to help improve Grafana Alloy. | +| alloy.envFrom | list | `[]` | Maps all the keys on a ConfigMap or Secret as environment variables. https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#envfromsource-v1-core | +| alloy.extraArgs | list | `[]` | Extra args to pass to `alloy run`: https://grafana.com/docs/alloy/latest/reference/cli/run/ | +| alloy.extraEnv | list | `[]` | Extra environment variables to pass to the Alloy container. | +| alloy.extraPorts | list | `[]` | Extra ports to expose on the Alloy container. | +| alloy.listenAddr | string | `"0.0.0.0"` | Address to listen for traffic on. 0.0.0.0 exposes the UI to other containers. | +| alloy.listenPort | int | `80` | Port to listen for traffic on. | +| alloy.listenScheme | string | `"HTTP"` | Scheme is needed for readiness probes. If enabling tls in your configs, set to "HTTPS" | +| alloy.mounts.dockercontainers | bool | `false` | Mount /var/lib/docker/containers from the host into the container for log collection. | +| alloy.mounts.extra | list | `[]` | Extra volume mounts to add into the Grafana Alloy container. Does not affect the watch container. | +| alloy.mounts.varlog | bool | `false` | Mount /var/log from the host into the container for log collection. | +| alloy.resources | object | `{}` | Resource requests and limits to apply to the Grafana Alloy container. | +| alloy.securityContext | object | `{}` | Security context to apply to the Grafana Alloy container. | +| alloy.storagePath | string | `"/tmp/alloy"` | Path to where Grafana Alloy stores data (for example, the Write-Ahead Log). By default, data is lost between reboots. | +| alloy.uiPathPrefix | string | `"/"` | Base path where the UI is exposed. | | configReloader.customArgs | list | `[]` | Override the args passed to the container. | -| configReloader.enabled | bool | `true` | Enables automatically reloading when the agent config changes. | +| configReloader.enabled | bool | `true` | Enables automatically reloading when the Alloy config changes. | | configReloader.image.digest | string | `""` | SHA256 digest of image to use for config reloading (either in format "sha256:XYZ" or "XYZ"). When set, will override `configReloader.image.tag` | | configReloader.image.registry | string | `"ghcr.io"` | Config reloader image registry (defaults to docker.io) | | configReloader.image.repository | string | `"jimmidyson/configmap-reload"` | Repository to get config reloader image from. | @@ -85,35 +76,35 @@ use the older mode (called "static mode"), set the `agent.mode` value to | controller.dnsPolicy | string | `"ClusterFirst"` | Configures the DNS policy for the pod. https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy | | controller.enableStatefulSetAutoDeletePVC | bool | `false` | Whether to enable automatic deletion of stale PVCs due to a scale down operation, when controller.type is 'statefulset'. | | controller.extraAnnotations | object | `{}` | Annotations to add to controller. | -| controller.extraContainers | list | `[]` | Additional containers to run alongside the agent container and initContainers. | +| controller.extraContainers | list | `[]` | Additional containers to run alongside the Alloy container and initContainers. | | controller.hostNetwork | bool | `false` | Configures Pods to use the host network. When set to true, the ports that will be used must be specified. | | controller.hostPID | bool | `false` | Configures Pods to use the host PID namespace. | | controller.initContainers | list | `[]` | | -| controller.nodeSelector | object | `{}` | nodeSelector to apply to Grafana Agent pods. | +| controller.nodeSelector | object | `{}` | nodeSelector to apply to Grafana Alloy pods. | | controller.parallelRollout | bool | `true` | Whether to deploy pods in parallel. Only used when controller.type is 'statefulset'. | | controller.podAnnotations | object | `{}` | Extra pod annotations to add. | | controller.podLabels | object | `{}` | Extra pod labels to add. | -| controller.priorityClassName | string | `""` | priorityClassName to apply to Grafana Agent pods. | +| controller.priorityClassName | string | `""` | priorityClassName to apply to Grafana Alloy pods. | | controller.replicas | int | `1` | Number of pods to deploy. Ignored when controller.type is 'daemonset'. | -| controller.tolerations | list | `[]` | Tolerations to apply to Grafana Agent pods. | -| controller.topologySpreadConstraints | list | `[]` | Topology Spread Constraints to apply to Grafana Agent pods. | -| controller.type | string | `"daemonset"` | Type of controller to use for deploying Grafana Agent in the cluster. Must be one of 'daemonset', 'deployment', or 'statefulset'. | +| controller.tolerations | list | `[]` | Tolerations to apply to Grafana Alloy pods. | +| controller.topologySpreadConstraints | list | `[]` | Topology Spread Constraints to apply to Grafana Alloy pods. | +| controller.type | string | `"daemonset"` | Type of controller to use for deploying Grafana Alloy in the cluster. Must be one of 'daemonset', 'deployment', or 'statefulset'. | | controller.updateStrategy | object | `{}` | Update strategy for updating deployed Pods. | | controller.volumeClaimTemplates | list | `[]` | volumeClaimTemplates to add when controller.type is 'statefulset'. | -| controller.volumes.extra | list | `[]` | Extra volumes to add to the Grafana Agent pod. | +| controller.volumes.extra | list | `[]` | Extra volumes to add to the Grafana Alloy pod. | | crds.create | bool | `true` | Whether to install CRDs for monitoring. | | fullnameOverride | string | `nil` | Overrides the chart's computed fullname. Used to change the full prefix of resource names. | | global.image.pullSecrets | list | `[]` | Optional set of global image pull secrets. | | global.image.registry | string | `""` | Global image registry to use if it needs to be overriden for some specific use cases (e.g local registries, custom images, ...) | -| global.podSecurityContext | object | `{}` | Security context to apply to the Grafana Agent pod. | -| image.digest | string | `nil` | Grafana Agent image's SHA256 digest (either in format "sha256:XYZ" or "XYZ"). When set, will override `image.tag`. | -| image.pullPolicy | string | `"IfNotPresent"` | Grafana Agent image pull policy. | +| global.podSecurityContext | object | `{}` | Security context to apply to the Grafana Alloy pod. | +| image.digest | string | `nil` | Grafana Alloy image's SHA256 digest (either in format "sha256:XYZ" or "XYZ"). When set, will override `image.tag`. | +| image.pullPolicy | string | `"IfNotPresent"` | Grafana Alloy image pull policy. | | image.pullSecrets | list | `[]` | Optional set of image pull secrets. | -| image.registry | string | `"docker.io"` | Grafana Agent image registry (defaults to docker.io) | -| image.repository | string | `"grafana/agent"` | Grafana Agent image repository. | -| image.tag | string | `nil` | Grafana Agent image tag. When empty, the Chart's appVersion is used. | +| image.registry | string | `"docker.io"` | Grafana Alloy image registry (defaults to docker.io) | +| image.repository | string | `"grafana/alloy"` | Grafana Alloy image repository. | +| image.tag | string | `nil` | Grafana Alloy image tag. When empty, the Chart's appVersion is used. | | ingress.annotations | object | `{}` | | -| ingress.enabled | bool | `false` | Enables ingress for the agent (faro port) | +| ingress.enabled | bool | `false` | Enables ingress for Alloy (Faro port) | | ingress.extraPaths | list | `[]` | | | ingress.faroPort | int | `12347` | | | ingress.hosts[0] | string | `"chart-example.local"` | | @@ -122,7 +113,7 @@ use the older mode (called "static mode"), set the `agent.mode` value to | ingress.pathType | string | `"Prefix"` | | | ingress.tls | list | `[]` | | | nameOverride | string | `nil` | Overrides the chart's name. Used to change the infix in the resource names. | -| rbac.create | bool | `true` | Whether to create RBAC resources for the agent. | +| rbac.create | bool | `true` | Whether to create RBAC resources for Alloy. | | service.annotations | object | `{}` | | | service.clusterIP | string | `""` | Cluster IP, can be set to None, empty "" or an IP address | | service.enabled | bool | `true` | Creates a Service for the controller's pods. | @@ -131,7 +122,7 @@ use the older mode (called "static mode"), set the `agent.mode` value to | service.type | string | `"ClusterIP"` | Service type | | serviceAccount.additionalLabels | object | `{}` | Additional labels to add to the created service account. | | serviceAccount.annotations | object | `{}` | Annotations to add to the created service account. | -| serviceAccount.create | bool | `true` | Whether to create a service account for the Grafana Agent deployment. | +| serviceAccount.create | bool | `true` | Whether to create a service account for the Grafana Alloy deployment. | | serviceAccount.name | string | `nil` | The name of the existing service account to use when serviceAccount.create is false. | | serviceMonitor.additionalLabels | object | `{}` | Additional labels for the service monitor. | | serviceMonitor.enabled | bool | `false` | | @@ -140,19 +131,19 @@ use the older mode (called "static mode"), set the `agent.mode` value to | serviceMonitor.relabelings | list | `[]` | RelabelConfigs to apply to samples before scraping ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#relabelconfig | | serviceMonitor.tlsConfig | object | `{}` | Customize tls parameters for the service monitor | -### agent.extraArgs +### alloy.extraArgs -`agent.extraArgs` allows for passing extra arguments to the Grafana Agent -container. The list of available arguments is documented on [agent run][]. +`alloy.extraArgs` allows for passing extra arguments to the Grafana Alloy +container. The list of available arguments is documented on [alloy run][]. -> **WARNING**: Using `agent.extraArgs` does not have a stable API. Things may +> **WARNING**: Using `alloy.extraArgs` does not have a stable API. Things may > break between Chart upgrade if an argument gets added to the template. -[agent run]: https://grafana.com/docs/agent/latest/flow/reference/cli/run/ +[alloy run]: https://grafana.com/docs/alloy/latest/reference/cli/run/ -### agent.extraPorts +### alloy.extraPorts -`agent.extraPorts` allows for configuring specific open ports. +`alloy.extraPorts` allows for configuring specific open ports. The detained specification of ports can be found at the [Kubernetes Pod documents](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#ports). @@ -165,28 +156,28 @@ Port numbers specified must be 0 < x < 65535. | name | name | If specified, this must be an `IANA_SVC_NAME` and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services. | protocol | protocol | Must be UDP, TCP, or SCTP. Defaults to "TCP". | -### agent.listenAddr +### alloy.listenAddr -`agent.listenAddr` allows for restricting which address the agent listens on +`alloy.listenAddr` allows for restricting which address Alloy listens on for network traffic on its HTTP server. By default, this is `0.0.0.0` to allow its UI to be exposed when port-forwarding and to expose its metrics to other -agents in the cluster. +Alloy instances in the cluster. -### agent.configMap.config +### alloy.configMap.config -`agent.configMap.content` holds the Grafana Agent configuration to use. +`alloy.configMap.content` holds the Grafana Alloy configuration to use. -If `agent.configMap.content` is not provided, a [default configuration file][default-config] is -used. When provided, `agent.configMap.content` must hold a valid River configuration file. +If `alloy.configMap.content` is not provided, a [default configuration file][default-config] is +used. When provided, `alloy.configMap.content` must hold a valid River configuration file. [default-config]: ./config/example.river -### agent.securityContext +### alloy.securityContext -`agent.securityContext` sets the securityContext passed to the Grafana -Agent container. +`alloy.securityContext` sets the securityContext passed to the Grafana +Alloy container. -By default, Grafana Agent containers are not able to collect telemetry from the +By default, Grafana Alloy containers are not able to collect telemetry from the host node or other specific types of privileged telemetry data. See [Collecting logs from other containers][#collecting-logs-from-other-containers] and [Collecting host node telemetry][#collecting-host-node-telemetry] below for @@ -195,24 +186,21 @@ more information on how to enable these capabilities. ### rbac.create `rbac.create` enables the creation of ClusterRole and ClusterRoleBindings for -the Grafana Agent containers to use. The default permission set allows Flow +the Grafana Alloy containers to use. The default permission set allows Flow components like [discovery.kubernetes][] to work properly. -[discovery.kubernetes]: https://grafana.com/docs/agent/latest/flow/reference/components/discovery.kubernetes/ +[discovery.kubernetes]: https://grafana.com/docs/alloy/latest/reference/components/discovery.kubernetes/ ### controller.autoscaling `controller.autoscaling.enabled` enables the creation of a HorizontalPodAutoscaler. It is only used when `controller.type` is set to `deployment` or `statefulset`. -`controller.autoscaling` is intended to be used with an -[app_agent_receiver-configured][app_agent_receiver] Grafana Agent or for -[clustered][] mode. +`controller.autoscaling` is intended to be used with [clustered][] mode. -> **WARNING**: Using `controller.autoscaling` for any other Grafana Agent +> **WARNING**: Using `controller.autoscaling` for any other Grafana Alloy > configuration could lead to redundant or double telemetry collection. -[app_agent_receiver]: https://grafana.com/docs/agent/latest/configuration/integrations/integrations-next/app-agent-receiver-config/ -[clustered]: https://grafana.com/docs/agent/latest/flow/reference/cli/run/#clustered-mode-experimental +[clustered]: https://grafana.com/docs/alloy/latest/reference/cli/run/#clustered-mode When using autoscaling with a StatefulSet controller and have enabled volumeClaimTemplates to be created alongside the StatefulSet, it is possible to @@ -222,39 +210,33 @@ Kubernetes version `>=1.23-0` and your cluster has the `enableStatefulSetAutoDeletePVC` to true to automatically delete stale PVCs. Using `controller.autoscaling` requires the target metric (cpu/memory) to have -its resource requests set up for both the agent and config-reloader containers +its resource requests set up for both the Alloy and config-reloader containers so that the HPA can use them to calculate the replica count from the actual resource utilization. ## Collecting logs from other containers There are two ways to collect logs from other containers within the cluster -the agent is deployed in. +Alloy is deployed in. -### Versions >= 0.31.x +### loki.source.kubernetes -The [loki.source.kubernetes][] component introduced in 0.31.0 may be used to -collect logs as an alternative to tailing files from the host. This component -does not require mounting the hosts filesystem into the Agent, nor requires -additional security contexts to work correctly. - -However, `loki.source.kubernetes` is experimental and may have issues not -present in the file-based approach. +The [loki.source.kubernetes][] component may be used to collect logs from +containers using the Kubernetes API. This component does not require mounting +the hosts filesystem into the Agent, nor requires additional security contexts +to work correctly. [loki.source.kubernetes]: https://grafana.com/docs/agent/latest/flow/reference/components/loki.source.kubernetes/ -### Versions < 0.31.x - -For those running the Agent on versions prior to 0.31.0, the only way to collect logs -from other containers is to mount `/var/lib/docker/containers` from the host and read -the log files directly. +### File-based collection -This capability is disabled by default. +Logs may also be collected by mounting the host's filesystem into the Alloy +container, bypassing the need to communicate with the Kubrnetes API. -To expose logs from other containers to Grafana Agent: +To mount logs from other containers to Grafana Alloy directly: -* Set `agent.mounts.dockercontainers` to `true`. -* Set `agent.securityContext` to: +* Set `alloy.mounts.dockercontainers` to `true`. +* Set `alloy.securityContext` to: ```yaml privileged: true runAsUser: 0 @@ -263,13 +245,13 @@ To expose logs from other containers to Grafana Agent: ## Collecting host node telemetry Telemetry from the host, such as host-specific log files (from `/var/logs`) or -metrics from `/proc` and `/sys` are not accessible to Grafana Agent containers. +metrics from `/proc` and `/sys` are not accessible to Grafana Alloy containers. -To expose this information to Grafana Agent for telemetry collection: +To expose this information to Grafana Alloy for telemetry collection: -* Set `agent.mounts.dockercontainers` to `true`. +* Set `alloy.mounts.dockercontainers` to `true`. * Mount `/proc` and `/sys` from the host into the container. -* Set `agent.securityContext` to: +* Set `alloy.securityContext` to: ```yaml privileged: true runAsUser: 0 diff --git a/operations/helm/charts/grafana-agent/README.md.gotmpl b/operations/helm/charts/alloy/README.md.gotmpl similarity index 54% rename from operations/helm/charts/grafana-agent/README.md.gotmpl rename to operations/helm/charts/alloy/README.md.gotmpl index e9bbe8ece5..981dd11296 100644 --- a/operations/helm/charts/grafana-agent/README.md.gotmpl +++ b/operations/helm/charts/alloy/README.md.gotmpl @@ -1,10 +1,10 @@ -# Grafana Agent Helm chart +# Grafana Alloy Helm chart {{ template "chart.typeBadge" . }}{{ template "chart.versionBadge" . }}{{ template "chart.appVersionBadge" . }} -Helm chart for deploying [Grafana Agent][] to Kubernetes. +Helm chart for deploying [Grafana Alloy][] to Kubernetes. -[Grafana Agent]: https://grafana.com/docs/agent/latest/ +[Grafana Alloy]: https://grafana.com/docs/alloy/latest/ ## Usage @@ -19,9 +19,9 @@ helm repo update To install the chart with the release name my-release: -`helm install my-release grafana/grafana-agent` +`helm install my-release grafana/alloy` -This chart installs one instance of Grafana Agent into your Kubernetes cluster +This chart installs one instance of Grafana Alloy into your Kubernetes cluster using a specific Kubernetes controller. By default, DaemonSet is used. The `controller.type` value can be used to change the controller to either a StatefulSet or Deployment. @@ -29,29 +29,21 @@ StatefulSet or Deployment. Creating multiple installations of the Helm chart with different controllers is useful if just using the default DaemonSet isn't sufficient. -## Flow mode is the default - -By default, [Grafana Agent Flow][Flow] is deployed. To opt out of Flow mode and -use the older mode (called "static mode"), set the `agent.mode` value to -`static`. - -[Flow]: https://grafana.com/docs/agent/latest/flow/ - {{ template "chart.valuesSection" . }} -### agent.extraArgs +### alloy.extraArgs -`agent.extraArgs` allows for passing extra arguments to the Grafana Agent -container. The list of available arguments is documented on [agent run][]. +`alloy.extraArgs` allows for passing extra arguments to the Grafana Alloy +container. The list of available arguments is documented on [alloy run][]. -> **WARNING**: Using `agent.extraArgs` does not have a stable API. Things may +> **WARNING**: Using `alloy.extraArgs` does not have a stable API. Things may > break between Chart upgrade if an argument gets added to the template. -[agent run]: https://grafana.com/docs/agent/latest/flow/reference/cli/run/ +[alloy run]: https://grafana.com/docs/alloy/latest/reference/cli/run/ -### agent.extraPorts +### alloy.extraPorts -`agent.extraPorts` allows for configuring specific open ports. +`alloy.extraPorts` allows for configuring specific open ports. The detained specification of ports can be found at the [Kubernetes Pod documents](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#ports). @@ -64,28 +56,28 @@ Port numbers specified must be 0 < x < 65535. | name | name | If specified, this must be an `IANA_SVC_NAME` and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services. | protocol | protocol | Must be UDP, TCP, or SCTP. Defaults to "TCP". | -### agent.listenAddr +### alloy.listenAddr -`agent.listenAddr` allows for restricting which address the agent listens on +`alloy.listenAddr` allows for restricting which address Alloy listens on for network traffic on its HTTP server. By default, this is `0.0.0.0` to allow its UI to be exposed when port-forwarding and to expose its metrics to other -agents in the cluster. +Alloy instances in the cluster. -### agent.configMap.config +### alloy.configMap.config -`agent.configMap.content` holds the Grafana Agent configuration to use. +`alloy.configMap.content` holds the Grafana Alloy configuration to use. -If `agent.configMap.content` is not provided, a [default configuration file][default-config] is -used. When provided, `agent.configMap.content` must hold a valid River configuration file. +If `alloy.configMap.content` is not provided, a [default configuration file][default-config] is +used. When provided, `alloy.configMap.content` must hold a valid River configuration file. [default-config]: ./config/example.river -### agent.securityContext +### alloy.securityContext -`agent.securityContext` sets the securityContext passed to the Grafana -Agent container. +`alloy.securityContext` sets the securityContext passed to the Grafana +Alloy container. -By default, Grafana Agent containers are not able to collect telemetry from the +By default, Grafana Alloy containers are not able to collect telemetry from the host node or other specific types of privileged telemetry data. See [Collecting logs from other containers][#collecting-logs-from-other-containers] and [Collecting host node telemetry][#collecting-host-node-telemetry] below for @@ -94,24 +86,21 @@ more information on how to enable these capabilities. ### rbac.create `rbac.create` enables the creation of ClusterRole and ClusterRoleBindings for -the Grafana Agent containers to use. The default permission set allows Flow +the Grafana Alloy containers to use. The default permission set allows Flow components like [discovery.kubernetes][] to work properly. -[discovery.kubernetes]: https://grafana.com/docs/agent/latest/flow/reference/components/discovery.kubernetes/ +[discovery.kubernetes]: https://grafana.com/docs/alloy/latest/reference/components/discovery.kubernetes/ ### controller.autoscaling `controller.autoscaling.enabled` enables the creation of a HorizontalPodAutoscaler. It is only used when `controller.type` is set to `deployment` or `statefulset`. -`controller.autoscaling` is intended to be used with an -[app_agent_receiver-configured][app_agent_receiver] Grafana Agent or for -[clustered][] mode. +`controller.autoscaling` is intended to be used with [clustered][] mode. -> **WARNING**: Using `controller.autoscaling` for any other Grafana Agent +> **WARNING**: Using `controller.autoscaling` for any other Grafana Alloy > configuration could lead to redundant or double telemetry collection. -[app_agent_receiver]: https://grafana.com/docs/agent/latest/configuration/integrations/integrations-next/app-agent-receiver-config/ -[clustered]: https://grafana.com/docs/agent/latest/flow/reference/cli/run/#clustered-mode-experimental +[clustered]: https://grafana.com/docs/alloy/latest/reference/cli/run/#clustered-mode When using autoscaling with a StatefulSet controller and have enabled volumeClaimTemplates to be created alongside the StatefulSet, it is possible to @@ -121,39 +110,33 @@ Kubernetes version `>=1.23-0` and your cluster has the `enableStatefulSetAutoDeletePVC` to true to automatically delete stale PVCs. Using `controller.autoscaling` requires the target metric (cpu/memory) to have -its resource requests set up for both the agent and config-reloader containers +its resource requests set up for both the Alloy and config-reloader containers so that the HPA can use them to calculate the replica count from the actual resource utilization. ## Collecting logs from other containers There are two ways to collect logs from other containers within the cluster -the agent is deployed in. +Alloy is deployed in. -### Versions >= 0.31.x +### loki.source.kubernetes -The [loki.source.kubernetes][] component introduced in 0.31.0 may be used to -collect logs as an alternative to tailing files from the host. This component -does not require mounting the hosts filesystem into the Agent, nor requires -additional security contexts to work correctly. - -However, `loki.source.kubernetes` is experimental and may have issues not -present in the file-based approach. +The [loki.source.kubernetes][] component may be used to collect logs from +containers using the Kubernetes API. This component does not require mounting +the hosts filesystem into the Agent, nor requires additional security contexts +to work correctly. [loki.source.kubernetes]: https://grafana.com/docs/agent/latest/flow/reference/components/loki.source.kubernetes/ -### Versions < 0.31.x - -For those running the Agent on versions prior to 0.31.0, the only way to collect logs -from other containers is to mount `/var/lib/docker/containers` from the host and read -the log files directly. +### File-based collection -This capability is disabled by default. +Logs may also be collected by mounting the host's filesystem into the Alloy +container, bypassing the need to communicate with the Kubrnetes API. -To expose logs from other containers to Grafana Agent: +To mount logs from other containers to Grafana Alloy directly: -* Set `agent.mounts.dockercontainers` to `true`. -* Set `agent.securityContext` to: +* Set `alloy.mounts.dockercontainers` to `true`. +* Set `alloy.securityContext` to: ```yaml privileged: true runAsUser: 0 @@ -162,13 +145,13 @@ To expose logs from other containers to Grafana Agent: ## Collecting host node telemetry Telemetry from the host, such as host-specific log files (from `/var/logs`) or -metrics from `/proc` and `/sys` are not accessible to Grafana Agent containers. +metrics from `/proc` and `/sys` are not accessible to Grafana Alloy containers. -To expose this information to Grafana Agent for telemetry collection: +To expose this information to Grafana Alloy for telemetry collection: -* Set `agent.mounts.dockercontainers` to `true`. +* Set `alloy.mounts.dockercontainers` to `true`. * Mount `/proc` and `/sys` from the host into the container. -* Set `agent.securityContext` to: +* Set `alloy.securityContext` to: ```yaml privileged: true runAsUser: 0 diff --git a/operations/helm/charts/grafana-agent/charts/crds/Chart.yaml b/operations/helm/charts/alloy/charts/crds/Chart.yaml similarity index 100% rename from operations/helm/charts/grafana-agent/charts/crds/Chart.yaml rename to operations/helm/charts/alloy/charts/crds/Chart.yaml diff --git a/operations/helm/charts/grafana-agent/charts/crds/crds/monitoring.grafana.com_podlogs.yaml b/operations/helm/charts/alloy/charts/crds/crds/monitoring.grafana.com_podlogs.yaml similarity index 99% rename from operations/helm/charts/grafana-agent/charts/crds/crds/monitoring.grafana.com_podlogs.yaml rename to operations/helm/charts/alloy/charts/crds/crds/monitoring.grafana.com_podlogs.yaml index 514732e68e..78678324c2 100644 --- a/operations/helm/charts/grafana-agent/charts/crds/crds/monitoring.grafana.com_podlogs.yaml +++ b/operations/helm/charts/alloy/charts/crds/crds/monitoring.grafana.com_podlogs.yaml @@ -10,7 +10,8 @@ spec: group: monitoring.grafana.com names: categories: - - grafana-agent + - grafana-alloy + - alloy kind: PodLogs listKind: PodLogsList plural: podlogs diff --git a/operations/helm/charts/grafana-agent/ci/additional-serviceaccount-label-values.yaml b/operations/helm/charts/alloy/ci/additional-serviceaccount-label-values.yaml similarity index 100% rename from operations/helm/charts/grafana-agent/ci/additional-serviceaccount-label-values.yaml rename to operations/helm/charts/alloy/ci/additional-serviceaccount-label-values.yaml diff --git a/operations/helm/charts/grafana-agent/ci/clustering-values.yaml b/operations/helm/charts/alloy/ci/clustering-values.yaml similarity index 85% rename from operations/helm/charts/grafana-agent/ci/clustering-values.yaml rename to operations/helm/charts/alloy/ci/clustering-values.yaml index 26ab267c5d..d6a74017b4 100644 --- a/operations/helm/charts/grafana-agent/ci/clustering-values.yaml +++ b/operations/helm/charts/alloy/ci/clustering-values.yaml @@ -1,5 +1,4 @@ agent: - mode: 'flow' clustering: enabled: true diff --git a/operations/helm/charts/grafana-agent/ci/controller-volumes-extra-values.yaml b/operations/helm/charts/alloy/ci/controller-volumes-extra-values.yaml similarity index 100% rename from operations/helm/charts/grafana-agent/ci/controller-volumes-extra-values.yaml rename to operations/helm/charts/alloy/ci/controller-volumes-extra-values.yaml diff --git a/operations/helm/charts/grafana-agent/ci/create-daemonset-hostnetwork-values.yaml b/operations/helm/charts/alloy/ci/create-daemonset-hostnetwork-values.yaml similarity index 100% rename from operations/helm/charts/grafana-agent/ci/create-daemonset-hostnetwork-values.yaml rename to operations/helm/charts/alloy/ci/create-daemonset-hostnetwork-values.yaml diff --git a/operations/helm/charts/grafana-agent/ci/create-daemonset-values.yaml b/operations/helm/charts/alloy/ci/create-daemonset-values.yaml similarity index 100% rename from operations/helm/charts/grafana-agent/ci/create-daemonset-values.yaml rename to operations/helm/charts/alloy/ci/create-daemonset-values.yaml diff --git a/operations/helm/charts/grafana-agent/ci/create-deployment-autoscaling-values.yaml b/operations/helm/charts/alloy/ci/create-deployment-autoscaling-values.yaml similarity index 100% rename from operations/helm/charts/grafana-agent/ci/create-deployment-autoscaling-values.yaml rename to operations/helm/charts/alloy/ci/create-deployment-autoscaling-values.yaml diff --git a/operations/helm/charts/grafana-agent/ci/create-deployment-values.yaml b/operations/helm/charts/alloy/ci/create-deployment-values.yaml similarity index 100% rename from operations/helm/charts/grafana-agent/ci/create-deployment-values.yaml rename to operations/helm/charts/alloy/ci/create-deployment-values.yaml diff --git a/operations/helm/charts/grafana-agent/ci/create-statefulset-autoscaling-values.yaml b/operations/helm/charts/alloy/ci/create-statefulset-autoscaling-values.yaml similarity index 100% rename from operations/helm/charts/grafana-agent/ci/create-statefulset-autoscaling-values.yaml rename to operations/helm/charts/alloy/ci/create-statefulset-autoscaling-values.yaml diff --git a/operations/helm/charts/grafana-agent/ci/create-statefulset-values.yaml b/operations/helm/charts/alloy/ci/create-statefulset-values.yaml similarity index 100% rename from operations/helm/charts/grafana-agent/ci/create-statefulset-values.yaml rename to operations/helm/charts/alloy/ci/create-statefulset-values.yaml diff --git a/operations/helm/charts/grafana-agent/ci/custom-config-values.yaml b/operations/helm/charts/alloy/ci/custom-config-values.yaml similarity index 100% rename from operations/helm/charts/grafana-agent/ci/custom-config-values.yaml rename to operations/helm/charts/alloy/ci/custom-config-values.yaml diff --git a/operations/helm/charts/grafana-agent/ci/default-values-values.yaml b/operations/helm/charts/alloy/ci/default-values-values.yaml similarity index 100% rename from operations/helm/charts/grafana-agent/ci/default-values-values.yaml rename to operations/helm/charts/alloy/ci/default-values-values.yaml diff --git a/operations/helm/charts/grafana-agent/ci/enable-servicemonitor-tls-values.yaml b/operations/helm/charts/alloy/ci/enable-servicemonitor-tls-values.yaml similarity index 100% rename from operations/helm/charts/grafana-agent/ci/enable-servicemonitor-tls-values.yaml rename to operations/helm/charts/alloy/ci/enable-servicemonitor-tls-values.yaml diff --git a/operations/helm/charts/grafana-agent/ci/enable-servicemonitor-values.yaml b/operations/helm/charts/alloy/ci/enable-servicemonitor-values.yaml similarity index 100% rename from operations/helm/charts/grafana-agent/ci/enable-servicemonitor-values.yaml rename to operations/helm/charts/alloy/ci/enable-servicemonitor-values.yaml diff --git a/operations/helm/charts/grafana-agent/ci/envFrom-values.yaml b/operations/helm/charts/alloy/ci/envFrom-values.yaml similarity index 100% rename from operations/helm/charts/grafana-agent/ci/envFrom-values.yaml rename to operations/helm/charts/alloy/ci/envFrom-values.yaml diff --git a/operations/helm/charts/grafana-agent/ci/existing-config-values.yaml b/operations/helm/charts/alloy/ci/existing-config-values.yaml similarity index 100% rename from operations/helm/charts/grafana-agent/ci/existing-config-values.yaml rename to operations/helm/charts/alloy/ci/existing-config-values.yaml diff --git a/operations/helm/charts/grafana-agent/ci/extra-env-values.yaml b/operations/helm/charts/alloy/ci/extra-env-values.yaml similarity index 100% rename from operations/helm/charts/grafana-agent/ci/extra-env-values.yaml rename to operations/helm/charts/alloy/ci/extra-env-values.yaml diff --git a/operations/helm/charts/grafana-agent/ci/extra-ports-values.yaml b/operations/helm/charts/alloy/ci/extra-ports-values.yaml similarity index 100% rename from operations/helm/charts/grafana-agent/ci/extra-ports-values.yaml rename to operations/helm/charts/alloy/ci/extra-ports-values.yaml diff --git a/operations/helm/charts/grafana-agent/ci/faro-ingress-values.yaml b/operations/helm/charts/alloy/ci/faro-ingress-values.yaml similarity index 100% rename from operations/helm/charts/grafana-agent/ci/faro-ingress-values.yaml rename to operations/helm/charts/alloy/ci/faro-ingress-values.yaml diff --git a/operations/helm/charts/grafana-agent/ci/global-image-pullsecrets-values.yaml b/operations/helm/charts/alloy/ci/global-image-pullsecrets-values.yaml similarity index 100% rename from operations/helm/charts/grafana-agent/ci/global-image-pullsecrets-values.yaml rename to operations/helm/charts/alloy/ci/global-image-pullsecrets-values.yaml diff --git a/operations/helm/charts/grafana-agent/ci/global-image-registry-values.yaml b/operations/helm/charts/alloy/ci/global-image-registry-values.yaml similarity index 100% rename from operations/helm/charts/grafana-agent/ci/global-image-registry-values.yaml rename to operations/helm/charts/alloy/ci/global-image-registry-values.yaml diff --git a/operations/helm/charts/grafana-agent/ci/initcontainers-values.yaml b/operations/helm/charts/alloy/ci/initcontainers-values.yaml similarity index 100% rename from operations/helm/charts/grafana-agent/ci/initcontainers-values.yaml rename to operations/helm/charts/alloy/ci/initcontainers-values.yaml diff --git a/operations/helm/charts/grafana-agent/ci/local-image-pullsecrets-values.yaml b/operations/helm/charts/alloy/ci/local-image-pullsecrets-values.yaml similarity index 100% rename from operations/helm/charts/grafana-agent/ci/local-image-pullsecrets-values.yaml rename to operations/helm/charts/alloy/ci/local-image-pullsecrets-values.yaml diff --git a/operations/helm/charts/grafana-agent/ci/local-image-registry-values.yaml b/operations/helm/charts/alloy/ci/local-image-registry-values.yaml similarity index 100% rename from operations/helm/charts/grafana-agent/ci/local-image-registry-values.yaml rename to operations/helm/charts/alloy/ci/local-image-registry-values.yaml diff --git a/operations/helm/charts/grafana-agent/ci/nodeselectors-and-tolerations-values.yaml b/operations/helm/charts/alloy/ci/nodeselectors-and-tolerations-values.yaml similarity index 100% rename from operations/helm/charts/grafana-agent/ci/nodeselectors-and-tolerations-values.yaml rename to operations/helm/charts/alloy/ci/nodeselectors-and-tolerations-values.yaml diff --git a/operations/helm/charts/grafana-agent/ci/pod_annotations-values.yaml b/operations/helm/charts/alloy/ci/pod_annotations-values.yaml similarity index 100% rename from operations/helm/charts/grafana-agent/ci/pod_annotations-values.yaml rename to operations/helm/charts/alloy/ci/pod_annotations-values.yaml diff --git a/operations/helm/charts/grafana-agent/ci/sidecars-values.yaml b/operations/helm/charts/alloy/ci/sidecars-values.yaml similarity index 100% rename from operations/helm/charts/grafana-agent/ci/sidecars-values.yaml rename to operations/helm/charts/alloy/ci/sidecars-values.yaml diff --git a/operations/helm/charts/grafana-agent/ci/topologyspreadconstraints-values.yaml b/operations/helm/charts/alloy/ci/topologyspreadconstraints-values.yaml similarity index 100% rename from operations/helm/charts/grafana-agent/ci/topologyspreadconstraints-values.yaml rename to operations/helm/charts/alloy/ci/topologyspreadconstraints-values.yaml diff --git a/operations/helm/charts/grafana-agent/ci/with-digests-values.yaml b/operations/helm/charts/alloy/ci/with-digests-values.yaml similarity index 100% rename from operations/helm/charts/grafana-agent/ci/with-digests-values.yaml rename to operations/helm/charts/alloy/ci/with-digests-values.yaml diff --git a/operations/helm/charts/grafana-agent/config/example.river b/operations/helm/charts/alloy/config/example.river similarity index 100% rename from operations/helm/charts/grafana-agent/config/example.river rename to operations/helm/charts/alloy/config/example.river diff --git a/operations/helm/charts/alloy/templates/NOTES.txt b/operations/helm/charts/alloy/templates/NOTES.txt new file mode 100644 index 0000000000..2c3176b687 --- /dev/null +++ b/operations/helm/charts/alloy/templates/NOTES.txt @@ -0,0 +1 @@ +Welcome to Grafana Alloy! diff --git a/operations/helm/charts/alloy/templates/_config.tpl b/operations/helm/charts/alloy/templates/_config.tpl new file mode 100644 index 0000000000..722b955caa --- /dev/null +++ b/operations/helm/charts/alloy/templates/_config.tpl @@ -0,0 +1,25 @@ +{{/* +Retrieve configMap name from the name of the chart or the ConfigMap the user +specified. +*/}} +{{- define "alloy.config-map.name" -}} +{{- $values := (mustMergeOverwrite .Values.alloy (or .Values.agent dict)) -}} +{{- if $values.configMap.name -}} +{{- $values.configMap.name }} +{{- else -}} +{{- include "alloy.fullname" . }} +{{- end }} +{{- end }} + +{{/* +The name of the config file is the default or the key the user specified in the +ConfigMap. +*/}} +{{- define "alloy.config-map.key" -}} +{{- $values := (mustMergeOverwrite .Values.alloy (or .Values.agent dict)) -}} +{{- if $values.configMap.key -}} +{{- $values.configMap.key }} +{{- else -}} +config.river +{{- end }} +{{- end }} diff --git a/operations/helm/charts/grafana-agent/templates/_helpers.tpl b/operations/helm/charts/alloy/templates/_helpers.tpl similarity index 68% rename from operations/helm/charts/grafana-agent/templates/_helpers.tpl rename to operations/helm/charts/alloy/templates/_helpers.tpl index 7b2e825e88..864c77856b 100644 --- a/operations/helm/charts/grafana-agent/templates/_helpers.tpl +++ b/operations/helm/charts/alloy/templates/_helpers.tpl @@ -1,7 +1,7 @@ {{/* Expand the name of the chart. */}} -{{- define "grafana-agent.name" -}} +{{- define "alloy.name" -}} {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} {{- end }} @@ -10,7 +10,7 @@ Create a default fully qualified app name. We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). If release name contains chart name it will be used as a full name. */}} -{{- define "grafana-agent.fullname" -}} +{{- define "alloy.fullname" -}} {{- if .Values.fullnameOverride }} {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} {{- else }} @@ -26,7 +26,7 @@ If release name contains chart name it will be used as a full name. {{/* Create chart name and version as used by the chart label. */}} -{{- define "grafana-agent.chart" -}} +{{- define "alloy.chart" -}} {{- if index .Values "$chart_tests" }} {{- printf "%s" .Chart.Name | replace "+" "_" | trunc 63 | trimSuffix "-" }} {{- else }} @@ -37,7 +37,7 @@ Create chart name and version as used by the chart label. {{/* Allow the release namespace to be overridden for multi-namespace deployments in combined charts */}} -{{- define "grafana-agent.namespace" -}} +{{- define "alloy.namespace" -}} {{- if .Values.namespaceOverride }} {{- .Values.namespaceOverride }} {{- else }} @@ -48,17 +48,17 @@ Allow the release namespace to be overridden for multi-namespace deployments in {{/* Common labels */}} -{{- define "grafana-agent.labels" -}} -helm.sh/chart: {{ include "grafana-agent.chart" . }} -{{ include "grafana-agent.selectorLabels" . }} +{{- define "alloy.labels" -}} +helm.sh/chart: {{ include "alloy.chart" . }} +{{ include "alloy.selectorLabels" . }} {{- if index .Values "$chart_tests" }} app.kubernetes.io/version: "vX.Y.Z" app.kubernetes.io/managed-by: {{ .Release.Service }} {{- else }} -{{/* substr trims delimeter prefix char from grafana-agent.imageId output +{{/* substr trims delimeter prefix char from alloy.imageId output e.g. ':' for tags and '@' for digests. For digests, we crop the string to a 7-char (short) sha. */}} -app.kubernetes.io/version: {{ (include "grafana-agent.imageId" .) | trunc 15 | trimPrefix "@sha256" | trimPrefix ":" | quote }} +app.kubernetes.io/version: {{ (include "alloy.imageId" .) | trunc 15 | trimPrefix "@sha256" | trimPrefix ":" | quote }} app.kubernetes.io/managed-by: {{ .Release.Service }} {{- end }} {{- end }} @@ -66,26 +66,26 @@ app.kubernetes.io/managed-by: {{ .Release.Service }} {{/* Selector labels */}} -{{- define "grafana-agent.selectorLabels" -}} -app.kubernetes.io/name: {{ include "grafana-agent.name" . }} +{{- define "alloy.selectorLabels" -}} +app.kubernetes.io/name: {{ include "alloy.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- end }} {{/* Create the name of the service account to use */}} -{{- define "grafana-agent.serviceAccountName" -}} +{{- define "alloy.serviceAccountName" -}} {{- if .Values.serviceAccount.create }} -{{- default (include "grafana-agent.fullname" .) .Values.serviceAccount.name }} +{{- default (include "alloy.fullname" .) .Values.serviceAccount.name }} {{- else }} {{- default "default" .Values.serviceAccount.name }} {{- end }} {{- end }} {{/* -Calculate name of image ID to use for "grafana-agent". +Calculate name of image ID to use for "alloy. */}} -{{- define "grafana-agent.imageId" -}} +{{- define "alloy.imageId" -}} {{- if .Values.image.digest }} {{- $digest := .Values.image.digest }} {{- if not (hasPrefix "sha256:" $digest) }} @@ -119,7 +119,7 @@ Calculate name of image ID to use for "config-reloader". {{/* Return the appropriate apiVersion for ingress. */}} -{{- define "grafana-agent.ingress.apiVersion" -}} +{{- define "alloy.ingress.apiVersion" -}} {{- if and ($.Capabilities.APIVersions.Has "networking.k8s.io/v1") (semverCompare ">= 1.19-0" .Capabilities.KubeVersion.Version) }} {{- print "networking.k8s.io/v1" }} {{- else if $.Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" }} @@ -132,21 +132,19 @@ Return the appropriate apiVersion for ingress. {{/* Return if ingress is stable. */}} -{{- define "grafana-agent.ingress.isStable" -}} -{{- eq (include "grafana-agent.ingress.apiVersion" .) "networking.k8s.io/v1" }} +{{- define "alloy.ingress.isStable" -}} +{{- eq (include "alloy.ingress.apiVersion" .) "networking.k8s.io/v1" }} {{- end }} {{/* Return if ingress supports ingressClassName. */}} -{{- define "grafana-agent.ingress.supportsIngressClassName" -}} -{{- or (eq (include "grafana-agent.ingress.isStable" .) "true") (and (eq (include "grafana-agent.ingress.apiVersion" .) "networking.k8s.io/v1beta1") (semverCompare ">= 1.18-0" .Capabilities.KubeVersion.Version)) }} +{{- define "alloy.ingress.supportsIngressClassName" -}} +{{- or (eq (include "alloy.ingress.isStable" .) "true") (and (eq (include "alloy.ingress.apiVersion" .) "networking.k8s.io/v1beta1") (semverCompare ">= 1.18-0" .Capabilities.KubeVersion.Version)) }} {{- end }} {{/* Return if ingress supports pathType. */}} -{{- define "grafana-agent.ingress.supportsPathType" -}} -{{- or (eq (include "grafana-agent.ingress.isStable" .) "true") (and (eq (include "grafana-agent.ingress.apiVersion" .) "networking.k8s.io/v1beta1") (semverCompare ">= 1.18-0" .Capabilities.KubeVersion.Version)) }} +{{- define "alloy.ingress.supportsPathType" -}} +{{- or (eq (include "alloy.ingress.isStable" .) "true") (and (eq (include "alloy.ingress.apiVersion" .) "networking.k8s.io/v1beta1") (semverCompare ">= 1.18-0" .Capabilities.KubeVersion.Version)) }} {{- end }} - - diff --git a/operations/helm/charts/grafana-agent/templates/cluster_service.yaml b/operations/helm/charts/alloy/templates/cluster_service.yaml similarity index 59% rename from operations/helm/charts/grafana-agent/templates/cluster_service.yaml rename to operations/helm/charts/alloy/templates/cluster_service.yaml index 7d271bce1e..1bc940b780 100644 --- a/operations/helm/charts/grafana-agent/templates/cluster_service.yaml +++ b/operations/helm/charts/alloy/templates/cluster_service.yaml @@ -1,15 +1,16 @@ -{{- if and (eq .Values.agent.mode "flow") (.Values.agent.clustering.enabled) -}} +{{- $values := (mustMergeOverwrite .Values.alloy (or .Values.agent dict)) -}} +{{- if $values.clustering.enabled -}} apiVersion: v1 kind: Service metadata: - name: {{ include "grafana-agent.fullname" . }}-cluster + name: {{ include "alloy.fullname" . }}-cluster labels: - {{- include "grafana-agent.labels" . | nindent 4 }} + {{- include "alloy.labels" . | nindent 4 }} spec: type: ClusterIP clusterIP: 'None' selector: - {{- include "grafana-agent.selectorLabels" . | nindent 4 }} + {{- include "alloy.selectorLabels" . | nindent 4 }} ports: # Do not include the -metrics suffix in the port name, otherwise metrics # can be double-collected with the non-headless Service if it's also @@ -18,10 +19,10 @@ spec: # This service should only be used for clustering, and not metric # collection. - name: http - port: {{ .Values.agent.listenPort }} - targetPort: {{ .Values.agent.listenPort }} + port: {{ $values.listenPort }} + targetPort: {{ $values.listenPort }} protocol: "TCP" - {{- range $portMap := .Values.agent.extraPorts }} + {{- range $portMap := $values.extraPorts }} - name: {{ $portMap.name }} port: {{ $portMap.port }} targetPort: {{ $portMap.targetPort }} diff --git a/operations/helm/charts/alloy/templates/configmap.yaml b/operations/helm/charts/alloy/templates/configmap.yaml new file mode 100644 index 0000000000..26f798d49d --- /dev/null +++ b/operations/helm/charts/alloy/templates/configmap.yaml @@ -0,0 +1,15 @@ +{{- $values := (mustMergeOverwrite .Values.alloy (or .Values.agent dict)) -}} +{{- if $values.configMap.create }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "alloy.fullname" . }} + labels: + {{- include "alloy.labels" . | nindent 4 }} +data: + {{- if $values.configMap.content }} + config.river: |- {{- (tpl $values.configMap.content .) | nindent 4 }} + {{- else }} + config.river: |- {{- .Files.Get "config/example.river" | trim | nindent 4 }} + {{- end }} +{{- end }} diff --git a/operations/helm/charts/alloy/templates/containers/_agent.yaml b/operations/helm/charts/alloy/templates/containers/_agent.yaml new file mode 100644 index 0000000000..496a167ee0 --- /dev/null +++ b/operations/helm/charts/alloy/templates/containers/_agent.yaml @@ -0,0 +1,78 @@ +{{- define "alloy.container" -}} +{{- $values := (mustMergeOverwrite .Values.alloy (or .Values.agent dict)) -}} +- name: alloy + image: {{ .Values.global.image.registry | default .Values.image.registry }}/{{ .Values.image.repository }}{{ include "alloy.imageId" . }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + args: + - run + - /etc/alloy/{{ include "alloy.config-map.key" . }} + - --storage.path={{ $values.storagePath }} + - --server.http.listen-addr={{ $values.listenAddr }}:{{ $values.listenPort }} + - --server.http.ui-path-prefix={{ $values.uiPathPrefix }} + {{- if not $values.enableReporting }} + - --disable-reporting + {{- end}} + {{- if $values.clustering.enabled }} + - --cluster.enabled=true + - --cluster.join-addresses={{ include "alloy.fullname" . }}-cluster + {{- end}} + {{- range $values.extraArgs }} + - {{ . }} + {{- end}} + env: + - name: AGENT_DEPLOY_MODE + value: "helm" + - name: HOSTNAME + valueFrom: + fieldRef: + fieldPath: spec.nodeName + {{- range $values.extraEnv }} + - {{- toYaml . | nindent 6 }} + {{- end }} + {{- if $values.envFrom }} + envFrom: + {{- toYaml $values.envFrom | nindent 4 }} + {{- end }} + ports: + - containerPort: {{ $values.listenPort }} + name: http-metrics + {{- range $portMap := $values.extraPorts }} + - containerPort: {{ $portMap.targetPort }} + {{- if $portMap.hostPort }} + hostPort: {{ $portMap.hostPort }} + {{- end}} + name: {{ $portMap.name }} + protocol: {{ coalesce $portMap.protocol "TCP" }} + {{- end }} + readinessProbe: + httpGet: + path: /-/ready + port: {{ $values.listenPort }} + scheme: {{ $values.listenScheme }} + initialDelaySeconds: 10 + timeoutSeconds: 1 + {{- with $values.resources }} + resources: + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with $values.securityContext }} + securityContext: + {{- toYaml . | nindent 4 }} + {{- end }} + volumeMounts: + - name: config + mountPath: /etc/alloy + {{- if $values.mounts.varlog }} + - name: varlog + mountPath: /var/log + readOnly: true + {{- end }} + {{- if $values.mounts.dockercontainers }} + - name: dockercontainers + mountPath: /var/lib/docker/containers + readOnly: true + {{- end }} + {{- range $values.mounts.extra }} + - {{- toYaml . | nindent 6 }} + {{- end }} +{{- end }} diff --git a/operations/helm/charts/grafana-agent/templates/containers/_watch.yaml b/operations/helm/charts/alloy/templates/containers/_watch.yaml similarity index 73% rename from operations/helm/charts/grafana-agent/templates/containers/_watch.yaml rename to operations/helm/charts/alloy/templates/containers/_watch.yaml index 250e4b4f0d..4a0a9008f5 100644 --- a/operations/helm/charts/grafana-agent/templates/containers/_watch.yaml +++ b/operations/helm/charts/alloy/templates/containers/_watch.yaml @@ -1,4 +1,5 @@ -{{- define "grafana-agent.watch-container" -}} +{{- define "alloy.watch-container" -}} +{{- $values := (mustMergeOverwrite .Values.alloy (or .Values.agent dict)) -}} {{- if .Values.configReloader.enabled -}} - name: config-reloader image: {{ .Values.global.image.registry | default .Values.configReloader.image.registry }}/{{ .Values.configReloader.image.repository }}{{ include "config-reloader.imageId" . }} @@ -7,12 +8,12 @@ {{- toYaml .Values.configReloader.customArgs | nindent 4 }} {{- else }} args: - - --volume-dir=/etc/agent - - --webhook-url=http://localhost:{{ .Values.agent.listenPort }}/-/reload + - --volume-dir=/etc/alloy + - --webhook-url=http://localhost:{{ $values.listenPort }}/-/reload {{- end }} volumeMounts: - name: config - mountPath: /etc/agent + mountPath: /etc/alloy {{- with .Values.configReloader.resources }} resources: {{- toYaml . | nindent 4 }} diff --git a/operations/helm/charts/grafana-agent/templates/controllers/_pod.yaml b/operations/helm/charts/alloy/templates/controllers/_pod.yaml similarity index 79% rename from operations/helm/charts/grafana-agent/templates/controllers/_pod.yaml rename to operations/helm/charts/alloy/templates/controllers/_pod.yaml index 235bc279ec..94625fca2b 100644 --- a/operations/helm/charts/grafana-agent/templates/controllers/_pod.yaml +++ b/operations/helm/charts/alloy/templates/controllers/_pod.yaml @@ -1,12 +1,13 @@ -{{- define "grafana-agent.pod-template" -}} +{{- define "alloy.pod-template" -}} +{{- $values := (mustMergeOverwrite .Values.alloy (or .Values.agent dict)) -}} metadata: annotations: - kubectl.kubernetes.io/default-container: grafana-agent + kubectl.kubernetes.io/default-container: alloy {{- with .Values.controller.podAnnotations }} {{- toYaml . | nindent 4 }} {{- end }} labels: - {{- include "grafana-agent.selectorLabels" . | nindent 4 }} + {{- include "alloy.selectorLabels" . | nindent 4 }} {{- with .Values.controller.podLabels }} {{- toYaml . | nindent 4 }} {{- end }} @@ -15,7 +16,7 @@ spec: securityContext: {{- toYaml . | nindent 4 }} {{- end }} - serviceAccountName: {{ include "grafana-agent.serviceAccountName" . }} + serviceAccountName: {{ include "alloy.serviceAccountName" . }} {{- if or .Values.global.image.pullSecrets .Values.image.pullSecrets }} imagePullSecrets: {{- if .Values.global.image.pullSecrets }} @@ -31,8 +32,8 @@ spec: {{- end }} {{- end }} containers: - {{- include "grafana-agent.container" . | nindent 4 }} - {{- include "grafana-agent.watch-container" . | nindent 4 }} + {{- include "alloy.container" . | nindent 4 }} + {{- include "alloy.watch-container" . | nindent 4 }} {{- with .Values.controller.extraContainers }} {{- toYaml . | nindent 4 }} {{- end}} @@ -65,13 +66,13 @@ spec: volumes: - name: config configMap: - name: {{ include "grafana-agent.config-map.name" . }} - {{- if .Values.agent.mounts.varlog }} + name: {{ include "alloy.config-map.name" . }} + {{- if $values.mounts.varlog }} - name: varlog hostPath: path: /var/log {{- end }} - {{- if .Values.agent.mounts.dockercontainers }} + {{- if $values.mounts.dockercontainers }} - name: dockercontainers hostPath: path: /var/lib/docker/containers diff --git a/operations/helm/charts/grafana-agent/templates/controllers/daemonset.yaml b/operations/helm/charts/alloy/templates/controllers/daemonset.yaml similarity index 67% rename from operations/helm/charts/grafana-agent/templates/controllers/daemonset.yaml rename to operations/helm/charts/alloy/templates/controllers/daemonset.yaml index 4eb29780a2..2f80948c21 100644 --- a/operations/helm/charts/grafana-agent/templates/controllers/daemonset.yaml +++ b/operations/helm/charts/alloy/templates/controllers/daemonset.yaml @@ -2,9 +2,9 @@ apiVersion: apps/v1 kind: DaemonSet metadata: - name: {{ include "grafana-agent.fullname" . }} + name: {{ include "alloy.fullname" . }} labels: - {{- include "grafana-agent.labels" . | nindent 4 }} + {{- include "alloy.labels" . | nindent 4 }} {{- with .Values.controller.extraAnnotations }} annotations: {{- toYaml . | nindent 4 }} @@ -15,9 +15,9 @@ spec: {{- end }} selector: matchLabels: - {{- include "grafana-agent.selectorLabels" . | nindent 6 }} + {{- include "alloy.selectorLabels" . | nindent 6 }} template: - {{- include "grafana-agent.pod-template" . | nindent 4 }} + {{- include "alloy.pod-template" . | nindent 4 }} {{- with .Values.controller.updateStrategy }} updateStrategy: {{- toYaml . | nindent 4 }} diff --git a/operations/helm/charts/grafana-agent/templates/controllers/deployment.yaml b/operations/helm/charts/alloy/templates/controllers/deployment.yaml similarity index 71% rename from operations/helm/charts/grafana-agent/templates/controllers/deployment.yaml rename to operations/helm/charts/alloy/templates/controllers/deployment.yaml index 7cc900bc1c..8e748cac59 100644 --- a/operations/helm/charts/grafana-agent/templates/controllers/deployment.yaml +++ b/operations/helm/charts/alloy/templates/controllers/deployment.yaml @@ -2,9 +2,9 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: {{ include "grafana-agent.fullname" . }} + name: {{ include "alloy.fullname" . }} labels: - {{- include "grafana-agent.labels" . | nindent 4 }} + {{- include "alloy.labels" . | nindent 4 }} {{- with .Values.controller.extraAnnotations }} annotations: {{- toYaml . | nindent 4 }} @@ -18,9 +18,9 @@ spec: {{- end }} selector: matchLabels: - {{- include "grafana-agent.selectorLabels" . | nindent 6 }} + {{- include "alloy.selectorLabels" . | nindent 6 }} template: - {{- include "grafana-agent.pod-template" . | nindent 4 }} + {{- include "alloy.pod-template" . | nindent 4 }} {{- with .Values.controller.updateStrategy }} strategy: {{- toYaml . | nindent 4 }} diff --git a/operations/helm/charts/grafana-agent/templates/controllers/statefulset.yaml b/operations/helm/charts/alloy/templates/controllers/statefulset.yaml similarity index 82% rename from operations/helm/charts/grafana-agent/templates/controllers/statefulset.yaml rename to operations/helm/charts/alloy/templates/controllers/statefulset.yaml index a4965d1420..2c4b1b6f01 100644 --- a/operations/helm/charts/grafana-agent/templates/controllers/statefulset.yaml +++ b/operations/helm/charts/alloy/templates/controllers/statefulset.yaml @@ -5,9 +5,9 @@ apiVersion: apps/v1 kind: StatefulSet metadata: - name: {{ include "grafana-agent.fullname" . }} + name: {{ include "alloy.fullname" . }} labels: - {{- include "grafana-agent.labels" . | nindent 4 }} + {{- include "alloy.labels" . | nindent 4 }} {{- with .Values.controller.extraAnnotations }} annotations: {{- toYaml . | nindent 4 }} @@ -22,12 +22,12 @@ spec: {{- if ge (int .Capabilities.KubeVersion.Minor) 22 }} minReadySeconds: 10 {{- end }} - serviceName: {{ include "grafana-agent.fullname" . }} + serviceName: {{ include "alloy.fullname" . }} selector: matchLabels: - {{- include "grafana-agent.selectorLabels" . | nindent 6 }} + {{- include "alloy.selectorLabels" . | nindent 6 }} template: - {{- include "grafana-agent.pod-template" . | nindent 4 }} + {{- include "alloy.pod-template" . | nindent 4 }} {{- with .Values.controller.updateStrategy }} updateStrategy: {{- toYaml . | nindent 4 }} diff --git a/operations/helm/charts/grafana-agent/templates/hpa.yaml b/operations/helm/charts/alloy/templates/hpa.yaml similarity index 76% rename from operations/helm/charts/grafana-agent/templates/hpa.yaml rename to operations/helm/charts/alloy/templates/hpa.yaml index 829fbcc9b2..c3a532f327 100644 --- a/operations/helm/charts/grafana-agent/templates/hpa.yaml +++ b/operations/helm/charts/alloy/templates/hpa.yaml @@ -1,27 +1,28 @@ +{{- $values := (mustMergeOverwrite .Values.alloy (or .Values.agent dict)) -}} {{- if and (or (eq .Values.controller.type "deployment") (eq .Values.controller.type "statefulset" )) .Values.controller.autoscaling.enabled }} -{{- if not (empty .Values.controller.autoscaling.targetMemoryUtilizationPercentage)}} - {{- $_ := .Values.agent.resources.requests | required ".Values.agent.resources.requests is required when using autoscaling." -}} - {{- $_ := .Values.agent.resources.requests.memory | required ".Values.agent.resources.requests.memory is required when using autoscaling based on memory utilization." -}} +{{- if not (empty .Values.controller.autoscaling.targetMemoryUtilizationPercentage)}} + {{- $_ := $values.resources.requests | required ".Values.alloy.resources.requests is required when using autoscaling." -}} + {{- $_ := $values.resources.requests.memory | required ".Values.alloy.resources.requests.memory is required when using autoscaling based on memory utilization." -}} {{- $_ := .Values.configReloader.resources.requests | required ".Values.configReloader.resources.requests is required when using autoscaling." -}} {{- $_ := .Values.configReloader.resources.requests.memory | required ".Values.configReloader.resources.requests.memory is required when using autoscaling based on memory utilization." -}} {{- end}} -{{- if not (empty .Values.controller.autoscaling.targetCPUUtilizationPercentage)}} - {{- $_ := .Values.agent.resources.requests | required ".Values.agent.resources.requests is required when using autoscaling." -}} - {{- $_ := .Values.agent.resources.requests.cpu | required ".Values.agent.resources.requests.cpu is required when using autoscaling based on cpu utilization." -}} +{{- if not (empty .Values.controller.autoscaling.targetCPUUtilizationPercentage)}} + {{- $_ := $values.resources.requests | required ".Values.alloy.resources.requests is required when using autoscaling." -}} + {{- $_ := $values.resources.requests.cpu | required ".Values.alloy.resources.requests.cpu is required when using autoscaling based on cpu utilization." -}} {{- $_ := .Values.configReloader.resources.requests | required ".Values.configReloader.resources.requests is required when using autoscaling." -}} {{- $_ := .Values.configReloader.resources.requests.cpu | required ".Values.configReloader.resources.requests.cpu is required when using autoscaling based on cpu utilization." -}} {{- end}} apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: - name: {{ include "grafana-agent.fullname" . }} + name: {{ include "alloy.fullname" . }} labels: - {{- include "grafana-agent.labels" . | nindent 4 }} + {{- include "alloy.labels" . | nindent 4 }} spec: scaleTargetRef: apiVersion: apps/v1 kind: {{ .Values.controller.type }} - name: {{ include "grafana-agent.fullname" . }} + name: {{ include "alloy.fullname" . }} {{- with .Values.controller.autoscaling }} minReplicas: {{ .minReplicas }} maxReplicas: {{ .maxReplicas }} diff --git a/operations/helm/charts/grafana-agent/templates/ingress.yaml b/operations/helm/charts/alloy/templates/ingress.yaml similarity index 80% rename from operations/helm/charts/grafana-agent/templates/ingress.yaml rename to operations/helm/charts/alloy/templates/ingress.yaml index 1d2dcae4e5..f8ee0da81b 100644 --- a/operations/helm/charts/grafana-agent/templates/ingress.yaml +++ b/operations/helm/charts/alloy/templates/ingress.yaml @@ -1,19 +1,19 @@ {{- if .Values.ingress.enabled -}} -{{- $ingressApiIsStable := eq (include "grafana-agent.ingress.isStable" .) "true" -}} -{{- $ingressSupportsIngressClassName := eq (include "grafana-agent.ingress.supportsIngressClassName" .) "true" -}} -{{- $ingressSupportsPathType := eq (include "grafana-agent.ingress.supportsPathType" .) "true" -}} -{{- $fullName := include "grafana-agent.fullname" . -}} +{{- $ingressApiIsStable := eq (include "alloy.ingress.isStable" .) "true" -}} +{{- $ingressSupportsIngressClassName := eq (include "alloy.ingress.supportsIngressClassName" .) "true" -}} +{{- $ingressSupportsPathType := eq (include "alloy.ingress.supportsPathType" .) "true" -}} +{{- $fullName := include "alloy.fullname" . -}} {{- $servicePort := .Values.ingress.faroPort -}} {{- $ingressPath := .Values.ingress.path -}} {{- $ingressPathType := .Values.ingress.pathType -}} {{- $extraPaths := .Values.ingress.extraPaths -}} -apiVersion: {{ include "grafana-agent.ingress.apiVersion" . }} +apiVersion: {{ include "alloy.ingress.apiVersion" . }} kind: Ingress metadata: name: {{ $fullName }} - namespace: {{ include "grafana-agent.namespace" . }} + namespace: {{ include "alloy.namespace" . }} labels: - {{- include "grafana-agent.labels" . | nindent 4 }} + {{- include "alloy.labels" . | nindent 4 }} {{- with .Values.ingress.labels }} {{- toYaml . | nindent 4 }} {{- end }} diff --git a/operations/helm/charts/grafana-agent/templates/rbac.yaml b/operations/helm/charts/alloy/templates/rbac.yaml similarity index 86% rename from operations/helm/charts/grafana-agent/templates/rbac.yaml rename to operations/helm/charts/alloy/templates/rbac.yaml index af0d30665a..d75a568012 100644 --- a/operations/helm/charts/grafana-agent/templates/rbac.yaml +++ b/operations/helm/charts/alloy/templates/rbac.yaml @@ -2,9 +2,9 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: - name: {{ include "grafana-agent.fullname" . }} + name: {{ include "alloy.fullname" . }} labels: - {{- include "grafana-agent.labels" . | nindent 4 }} + {{- include "alloy.labels" . | nindent 4 }} rules: # Rules which allow discovery.kubernetes to function. - apiGroups: @@ -96,15 +96,15 @@ rules: apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: - name: {{ include "grafana-agent.fullname" . }} + name: {{ include "alloy.fullname" . }} labels: - {{- include "grafana-agent.labels" . | nindent 4 }} + {{- include "alloy.labels" . | nindent 4 }} roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole - name: {{ include "grafana-agent.fullname" . }} + name: {{ include "alloy.fullname" . }} subjects: - kind: ServiceAccount - name: {{ include "grafana-agent.serviceAccountName" . }} + name: {{ include "alloy.serviceAccountName" . }} namespace: {{ .Release.Namespace }} {{- end }} diff --git a/operations/helm/charts/grafana-agent/templates/service.yaml b/operations/helm/charts/alloy/templates/service.yaml similarity index 68% rename from operations/helm/charts/grafana-agent/templates/service.yaml rename to operations/helm/charts/alloy/templates/service.yaml index 34427f822a..12f1b98889 100644 --- a/operations/helm/charts/grafana-agent/templates/service.yaml +++ b/operations/helm/charts/alloy/templates/service.yaml @@ -1,10 +1,11 @@ +{{- $values := (mustMergeOverwrite .Values.alloy (or .Values.agent dict)) -}} {{- if .Values.service.enabled -}} apiVersion: v1 kind: Service metadata: - name: {{ include "grafana-agent.fullname" . }} + name: {{ include "alloy.fullname" . }} labels: - {{- include "grafana-agent.labels" . | nindent 4 }} + {{- include "alloy.labels" . | nindent 4 }} {{- with .Values.service.annotations }} annotations: {{- toYaml . | nindent 4 }} @@ -15,17 +16,17 @@ spec: clusterIP: {{ .Values.service.clusterIP }} {{- end }} selector: - {{- include "grafana-agent.selectorLabels" . | nindent 4 }} + {{- include "alloy.selectorLabels" . | nindent 4 }} internalTrafficPolicy: {{.Values.service.internalTrafficPolicy}} ports: - name: http-metrics {{- if eq .Values.service.type "NodePort" }} nodePort: {{ .Values.service.nodePort }} {{- end }} - port: {{ .Values.agent.listenPort }} - targetPort: {{ .Values.agent.listenPort }} + port: {{ $values.listenPort }} + targetPort: {{ $values.listenPort }} protocol: "TCP" -{{- range $portMap := .Values.agent.extraPorts }} +{{- range $portMap := $values.extraPorts }} - name: {{ $portMap.name }} port: {{ $portMap.port }} targetPort: {{ $portMap.targetPort }} diff --git a/operations/helm/charts/grafana-agent/templates/serviceaccount.yaml b/operations/helm/charts/alloy/templates/serviceaccount.yaml similarity index 75% rename from operations/helm/charts/grafana-agent/templates/serviceaccount.yaml rename to operations/helm/charts/alloy/templates/serviceaccount.yaml index f2d2c90c6e..fc02f365bb 100644 --- a/operations/helm/charts/grafana-agent/templates/serviceaccount.yaml +++ b/operations/helm/charts/alloy/templates/serviceaccount.yaml @@ -2,10 +2,10 @@ apiVersion: v1 kind: ServiceAccount metadata: - name: {{ include "grafana-agent.serviceAccountName" . }} + name: {{ include "alloy.serviceAccountName" . }} namespace: {{ .Release.Namespace }} labels: - {{- include "grafana-agent.labels" . | nindent 4 }} + {{- include "alloy.labels" . | nindent 4 }} {{- with .Values.serviceAccount.additionalLabels }} {{- toYaml . | nindent 4 }} {{- end }} diff --git a/operations/helm/charts/grafana-agent/templates/servicemonitor.yaml b/operations/helm/charts/alloy/templates/servicemonitor.yaml similarity index 76% rename from operations/helm/charts/grafana-agent/templates/servicemonitor.yaml rename to operations/helm/charts/alloy/templates/servicemonitor.yaml index fff347286c..15cbf7ff2e 100644 --- a/operations/helm/charts/grafana-agent/templates/servicemonitor.yaml +++ b/operations/helm/charts/alloy/templates/servicemonitor.yaml @@ -1,17 +1,18 @@ +{{- $values := (mustMergeOverwrite .Values.alloy (or .Values.agent dict)) -}} {{- if and .Values.service.enabled .Values.serviceMonitor.enabled -}} apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: - name: {{ include "grafana-agent.fullname" . }} + name: {{ include "alloy.fullname" . }} labels: - {{- include "grafana-agent.labels" . | nindent 4 }} + {{- include "alloy.labels" . | nindent 4 }} {{- with .Values.serviceMonitor.additionalLabels }} {{- toYaml . | nindent 4 }} {{- end }} spec: endpoints: - port: http-metrics - scheme: {{ .Values.agent.listenScheme | lower }} + scheme: {{ $values.listenScheme | lower }} honorLabels: true {{- if .Values.serviceMonitor.interval }} interval: {{ .Values.serviceMonitor.interval }} @@ -30,5 +31,5 @@ spec: {{- end }} selector: matchLabels: - {{- include "grafana-agent.selectorLabels" . | nindent 6 }} + {{- include "alloy.selectorLabels" . | nindent 6 }} {{- end }} diff --git a/operations/helm/charts/grafana-agent/values.yaml b/operations/helm/charts/alloy/values.yaml similarity index 84% rename from operations/helm/charts/grafana-agent/values.yaml rename to operations/helm/charts/alloy/values.yaml index 588274fa05..bb3c3529dd 100644 --- a/operations/helm/charts/grafana-agent/values.yaml +++ b/operations/helm/charts/alloy/values.yaml @@ -15,17 +15,16 @@ global: # -- Optional set of global image pull secrets. pullSecrets: [] - # -- Security context to apply to the Grafana Agent pod. + # -- Security context to apply to the Grafana Alloy pod. podSecurityContext: {} crds: # -- Whether to install CRDs for monitoring. create: true -# Various agent settings. -agent: - # -- Mode to run Grafana Agent in. Can be "flow" or "static". - mode: 'flow' +## Various Alloy settings. For backwards compatibility with the grafana-agent +## chart, this field may also be called "agent". +alloy: configMap: # -- Create a new ConfigMap for the config file. create: true @@ -38,13 +37,12 @@ agent: key: null clustering: - # -- Deploy agents in a cluster to allow for load distribution. Only - # applies when agent.mode=flow. + # -- Deploy Alloy in a cluster to allow for load distribution. enabled: false - # -- Path to where Grafana Agent stores data (for example, the Write-Ahead Log). + # -- Path to where Grafana Alloy stores data (for example, the Write-Ahead Log). # By default, data is lost between reboots. - storagePath: /tmp/agent + storagePath: /tmp/alloy # -- Address to listen for traffic on. 0.0.0.0 exposes the UI to other # containers. @@ -60,19 +58,19 @@ agent: uiPathPrefix: / # -- Enables sending Grafana Labs anonymous usage stats to help improve Grafana - # Agent. + # Alloy. enableReporting: true - # -- Extra environment variables to pass to the agent container. + # -- Extra environment variables to pass to the Alloy container. extraEnv: [] # -- Maps all the keys on a ConfigMap or Secret as environment variables. https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#envfromsource-v1-core envFrom: [] - # -- Extra args to pass to `agent run`: https://grafana.com/docs/agent/latest/flow/reference/cli/run/ + # -- Extra args to pass to `alloy run`: https://grafana.com/docs/alloy/latest/reference/cli/run/ extraArgs: [] - # -- Extra ports to expose on the Agent + # -- Extra ports to expose on the Alloy container. extraPorts: [] # - name: "faro" # port: 12347 @@ -86,37 +84,37 @@ agent: # collection. dockercontainers: false - # -- Extra volume mounts to add into the Grafana Agent container. Does not + # -- Extra volume mounts to add into the Grafana Alloy container. Does not # affect the watch container. extra: [] - # -- Security context to apply to the Grafana Agent container. + # -- Security context to apply to the Grafana Alloy container. securityContext: {} - # -- Resource requests and limits to apply to the Grafana Agent container. + # -- Resource requests and limits to apply to the Grafana Alloy container. resources: {} image: - # -- Grafana Agent image registry (defaults to docker.io) + # -- Grafana Alloy image registry (defaults to docker.io) registry: "docker.io" - # -- Grafana Agent image repository. - repository: grafana/agent - # -- (string) Grafana Agent image tag. When empty, the Chart's appVersion is + # -- Grafana Alloy image repository. + repository: grafana/alloy + # -- (string) Grafana Alloy image tag. When empty, the Chart's appVersion is # used. tag: null - # -- Grafana Agent image's SHA256 digest (either in format "sha256:XYZ" or "XYZ"). When set, will override `image.tag`. + # -- Grafana Alloy image's SHA256 digest (either in format "sha256:XYZ" or "XYZ"). When set, will override `image.tag`. digest: null - # -- Grafana Agent image pull policy. + # -- Grafana Alloy image pull policy. pullPolicy: IfNotPresent # -- Optional set of image pull secrets. pullSecrets: [] rbac: - # -- Whether to create RBAC resources for the agent. + # -- Whether to create RBAC resources for Alloy. create: true serviceAccount: - # -- Whether to create a service account for the Grafana Agent deployment. + # -- Whether to create a service account for the Grafana Alloy deployment. create: true # -- Additional labels to add to the created service account. additionalLabels: {} @@ -128,7 +126,7 @@ serviceAccount: # Options for the extra controller used for config reloading. configReloader: - # -- Enables automatically reloading when the agent config changes. + # -- Enables automatically reloading when the Alloy config changes. enabled: true image: # -- Config reloader image registry (defaults to docker.io) @@ -150,7 +148,7 @@ configReloader: securityContext: {} controller: - # -- Type of controller to use for deploying Grafana Agent in the cluster. + # -- Type of controller to use for deploying Grafana Alloy in the cluster. # Must be one of 'daemonset', 'deployment', or 'statefulset'. type: 'daemonset' @@ -176,16 +174,16 @@ controller: # -- Update strategy for updating deployed Pods. updateStrategy: {} - # -- nodeSelector to apply to Grafana Agent pods. + # -- nodeSelector to apply to Grafana Alloy pods. nodeSelector: {} - # -- Tolerations to apply to Grafana Agent pods. + # -- Tolerations to apply to Grafana Alloy pods. tolerations: [] - # -- Topology Spread Constraints to apply to Grafana Agent pods. + # -- Topology Spread Constraints to apply to Grafana Alloy pods. topologySpreadConstraints: [] - # -- priorityClassName to apply to Grafana Agent pods. + # -- priorityClassName to apply to Grafana Alloy pods. priorityClassName: '' # -- Extra pod annotations to add. @@ -235,7 +233,7 @@ controller: affinity: {} volumes: - # -- Extra volumes to add to the Grafana Agent pod. + # -- Extra volumes to add to the Grafana Alloy pod. extra: [] # -- volumeClaimTemplates to add when controller.type is 'statefulset'. @@ -246,7 +244,7 @@ controller: ## initContainers: [] - # -- Additional containers to run alongside the agent container and initContainers. + # -- Additional containers to run alongside the Alloy container and initContainers. extraContainers: [] service: @@ -289,7 +287,7 @@ serviceMonitor: # replacement: $1 # action: replace ingress: - # -- Enables ingress for the agent (faro port) + # -- Enables ingress for Alloy (Faro port) enabled: false # For Kubernetes >= 1.18 you should specify the ingress-controller via the field ingressClassName # See https://kubernetes.io/blog/2020/04/02/improvements-to-the-ingress-api-in-kubernetes-1.18/#specifying-the-class-of-an-ingress diff --git a/operations/helm/charts/grafana-agent/CHANGELOG.md b/operations/helm/charts/grafana-agent/CHANGELOG.md deleted file mode 100644 index a6a00a5f88..0000000000 --- a/operations/helm/charts/grafana-agent/CHANGELOG.md +++ /dev/null @@ -1,465 +0,0 @@ -# Changelog - -> _Contributors should read our [contributors guide][] for instructions on how -> to update the changelog._ - -This document contains a historical list of changes between releases. Only -changes that impact end-user behavior are listed; changes to documentation or -internal API changes are not present. - -Unreleased ----------- - -### Features - -- Allow setting nodePort for service. (@ryayon) - -0.36.0 (2024-02-27) -------------------- - -### Enhancements - -- Update Grafana Agent version to v0.40.2. (@rfratto) - -0.35.0 (2024-02-27) -------------------- - -### Enhancements - -- Update Grafana Agent version to v0.40.1. (@rfratto) - -0.34.0 (2024-02-27) -------------------- - -### Enhancements - -- Update Grafana Agent version to v0.40.0. (@jcreixell) - -0.33.0 (2024-02-20) -------------------- - -### Features - -- Add HPA behavior support for scaling up and down. (@wildum) - -### Enhancements - -- Allow setting tlsConfig for serviceMonitor (@captncraig) -- Allow setting internalTrafficPolicy for service (@captncraig) - -0.32.0 (2024-02-15) -------------------- - -### Enhancements - -- Allow setting scheme for readiness checks when using tls. (@captncraig) - -- Update Grafana Agent version to v0.39.2. (@captncraig) - -0.31.1 (2024-01-19) -------------------- - -### Enhancements - -- Add `kubectl.kubernetes.io/default-container: grafana-agent` annotation to allow various tools to choose `grafana-agent` container as default target (@aerfio) - -- Add support for topology spread constraints in helm chart. (@etiennep) - -- Update Grafana Agent version to v0.39.1. (@marctc) - -### Bugfixes - -- Fix a bug preventing the `.Values.configReloader.image.digest` Helm value to be correctly retrieved. (@claudioscalzo) - -- Fix a bug preventing digests to be used as labels because of their length. Labels values [must be 63 characters or less](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#syntax-and-character-set). (@claudioscalzo) - -0.31.0 (2024-01-10) -------------------- - -### Enhancements - -- Update Grafana Agent version to v0.39.0. (@marctc) - -### Bugfixes - -- Configure namespace for service account when RBAC resources is created. (@hainenber) - -### Other changes - -- Change config reloader image to `ghcr.io/jimmidyson/configmap-reload:v0.12.0` to reflect change in repository and version. (@berendiwema) - -0.30.0 (2024-01-05) -------------------- - -### Enhancements - -- Update `rbac` to include necessary rules for the `otelcol.processor.k8sattributes` component. (@rlankfo) - -- Add `serviceAccount.additionalLabels` to values.yaml to enable setting additional labels on the created service account. (@zopanix) - -### Bugfixes - -- Statefulset should use value `.controller.enableStatefulSetAutoDeletePVC` instead of just `.enableStatefulSetAutoDeletePVC`. (@captncraig) - -0.29.0 (2023-11-30) -------------------- - -### Enhancements - -- Update Grafana Agent version to v0.38.1. (@rfratto) - -### Other changes - -- Update `container.securityContext` Helm value reference to renamed `agent.securityContext`. (@hainenber) - -0.28.0 (2023-11-21) -------------------- - -### Enhancements - -- Ensure that `app.kubernetes.io/version` label accounts for any - image tag overrides supplied to the chart Values. (@tristanburgess) - -- Update Grafana Agent version to v0.38.0. (@rfratto) - -0.27.2 (2023-11-07) ----------- - -### Enhancements - -- Expose the `ui-path-prefix` flag on the Helm chart. (@mlcdf) - -- Expose controller `extraAnnotations` on the Helm chart. (@mcanevet) - -- Update Grafana Agent version to v0.37.4. (@tpaschalis) - -0.27.1 (2023-10-26) ----------- - -### Enhancements - -- Update Grafana Agent version to v0.37.3. (@tpaschalis) - -### Bugfixes - -- Fix issue where CRDs were created with annotations after the `crds.create` - setting was introduced (@rfratto). - -0.27.0 (2023-10-12) ----------- - -### Enhancements - -- Add `secrets` and `configmaps` to cluster role for `remote.kubernetes.*` components. (@captncraig) - -- Update Grafana Agent version to v0.37.2. (@tpaschalis) - -0.26.0 (2023-10-10) -------------------- - -### Breaking changes - -- The `initContainers` setting has been moved to `controller.initContainers` - for consistency with other Pod-level settings. (@rfratto) - -### Enhancements - -- Make CRDs optional through the `crds.create` setting. (@bentonam, @rfratto) - -- Update Grafana Agent version to v0.37.1. (@tpaschalis) - -0.25.0 (2023-09-22) -------------------- - -### Enhancements - -- An image's digest can now be used in place of a tag. (@hainenber) - -- Add ServiceMonitor support. (@QuentinBisson) - -- Update Grafana Agent version to v0.36.2. (@ptodev) - -0.24.0 (2023-09-08) -------------------- - -### Enhancements - -- StatefulSets will now use `podManagementPolicy: Parallel` by default. To - disable this behavior, set `controller.parallelRollout` to `false`. - (@rfratto) - -0.23.0 (2023-09-06) -------------------- - -### Enhancements - -- Update Grafana Agent version to v0.36.1. (@erikbaranowski) - -- Enable clustering for deployments and daemonsets. (@tpaschalis) - -0.22.0 (2023-08-30) -------------------- - -- Update Grafana Agent version to v0.36.0. (@thampiotr) - -0.21.1 (2023-08-30) -------------------- - -- Condition parameter minReadySeconds on StatefulSet, Deployment, and DaemonSet to Kubernetes v1.22 clusters. - -0.21.0 (2023-08-15) -------------------- - -- Update Grafana Agent version to v0.35.4. (@mattdurham) - -0.20.0 (2023-08-09) -------------------- - -- Update Grafana Agent version to v0.35.3. (@tpaschalis) - -### Enhancements - -- Add support for initcontainers in helm chart. (@dwalker-sabiogroup) - -0.19.0 (2023-07-27) -------------------- - -### Enhancements - -- Set hostPID from values. (@korniltsev) - -- Set nodeSelector at podlevel. (@Flasheh) - -- Update Grafana Agent version to v0.35.2. (@rfratto) - -0.18.0 (2023-07-26) -------------------- - -### Enhancements - -- Update Grafana Agent version to v0.35.1. (@ptodev) - -0.17.0 (2023-07-19) -------------------- - -### Features - -- Add native support for Flow mode clustering with the - `agent.clustering.enabled` flag. Clustering may only be enabled in Flow mode - when deploying a StatefulSet. (@rfratto) - -### Enhancements - -- Set securityContext for configReloader container. (@yanehi) - -- Set securityContext at podlevel. (@yanehi) - -- Update Grafana Agent version to v0.35.0. (@mattdurham) - -0.16.0 (2023-06-20) -------------------- - -### Enhancements - -- Allow requests to be set on the config reloader container. (@tpaschalis) - -- Allow users of the helm chart to configure the image registry either at the image level or globally. (@QuentinBisson) - -- Don't specify replica count for StatefulSets when autoscaling is enabled (@captncraig) - -- Update Grafana Agent version to v0.34.2. (@captncraig) - -### Other changes - -- Make the agent and config-reloader container resources required when using - autoscaling. (@tpaschalis) - -0.15.0 (2023-06-08) -------------------- - -### Enhancements - -- Update Grafana Agent version to v0.34.0. (@captncraig) - -- Add HPA support for Deployments and StatefulSets. (@tpaschalis) - -- Make the Faro port optional. (@tpaschalis) - -- Rename the deprecated `serviceAccount` alias to `serviceAccountName` in - pod template. This is a no-op change. (@tpaschalis) - -### Bugfixes - -- Only set the deployment replicas when autoscaling is disabled. (@tiithansen) - -- Reorder HPA `spec.metrics` to avoid endless sync loop in ArgoCD. (@tiithansen) - -0.14.0 (2023-05-11) -------------------- - -### Enhancements - -- Add a toggle for enabling/disabling the Service. (@tpaschalis) - -- Update Grafana Agent version to v0.33.2. (@rfratto) - -0.13.0 (2023-05-01) -------------------- - -### Enhancements - -- Update Grafana Agent version to v0.33.1. (@spartan0x117) - -- Update RBAC rules to permit `node/metrics`. (@yurii-kryvosheia) - -0.12.0 (2023-04-25) -------------------- - -### Enhancements - -- Update Grafana Agent version to v0.33.0. (@rfratto) - -0.11.0 (2023-04-24) -------------------- - -### Enhancements - -- Add support for adding Annotations to Service (@ofirshtrull) -- Add `agent.envFrom` value. (@carlosjgp) -- Add `controller.hostNetwork` value. (@carlosjgp) -- Add `controller.dnsPolicy` value. (@carlosjgp) - -### Bugfixes - -- Fix issue where `controller.tolerations` setting was ignored. (@carlosjgp) -- Fix YAML indentation of some resources. (@carlosjgp) - -0.10.0 (2023-03-09) -------------------- - -### Enhancements - -- Add Horizontal Pod Autoscaling for controller type deployment. (@therealmanny) -- Add affinity values. (@therealmanny) - -0.9.0 (2023-03-14) ------------------- - -### Enhancements - -- Add PodMonitors, ServiceMonitors, and Probes to the agent ClusterRole. (@captncraig) -- Add podLabels values. (@therealmanny) - - -0.8.1 (2023-03-06) ------------------- - -### Enhancements - -- Add hostPort specification to extraPorts and extraPort documentation. (@pnathan) -- Selectively template ClusterIP. (@aglees) -- Add priorityClassName value. (@aglees) -- Update Grafana Agent version to v0.32.1. (@erikbaranowski) - -0.8.0 (2023-02-28) ------------------- - -### Enhancements - -- Update Grafana Agent version to v0.32.0. (@rfratto) - -0.7.1 (2023-02-27) ------------------- - -### Bugfixes - -- Fix issue where `.image.pullPolicy` was not being respected. (@rfratto) - -0.7.0 (2023-02-24) ------------------- - -### Enhancements - -- Helm chart: Add support for templates inside of configMap.content (@ts-mini) -- Add the necessary rbac to support eventhandler integration (@nvanheuverzwijn) - - -0.6.0 (2023-02-13) ------------------- - -### Enhancements - -- Update Grafana Agent version to v0.31.3. (@rfratto) - -0.5.0 (2023-02-08) ------------------- - -### Enhancements - -- Helm Chart: Add ingress and support for agent-receiver. (@ts-mini) - -### Documentation - -- Update Helm Chart documentation to reference new `loki.source.kubernetes` component. - -0.4.0 (2023-01-31) ------------------- - -### Enhancements - -- Update Grafana Agent version to v0.31.0. (@rfratto) -- Install PodLogs CRD for the `loki.source.podlogs` Flow component. (@rfratto) -- Update RBAC rules to permit `loki.source.podlogs` and `mimir.rules.kubernetes` to work by default. (@rfratto) - -0.3.1 (2023-01-31) ------------------- - -### Bugfixes - -- Fix `podAnnotations` values reference in pod template (should be `controller.podAnnotations`). -- Ensure the service gets a clusterIP assigned by default. - -0.3.0 (2023-01-23) ------------------- - -### Security - -- Change config reloader image to `jimmidyson/configmap-reload:v0.8.0` to resolve security scanner report. (@rfratto) - -0.2.3 (2023-01-17) ------------------- - -### Bugfixes - -- Sets correct arguments for starting the agent when static mode is selected. - -0.2.2 (2023-01-17) ------------------- - -### Bugfixes - -- Updated configmap template to use correct variable for populating configmap content - -0.2.1 (2023-01-12) ------------------- - -### Other changes - -- Updated documentation to remove warning about the chart not being ready for - use. - -0.2.0 (2023-01-12) ------------------- - -### Features - -- Introduce supporting extra ports on the Grafana Agent created by Helm Chart. - -0.1.0 (2023-01-11) ------------------- - -### Features - -- Introduce a Grafana Agent Helm chart which supports Grafana Agent Flow. (@rfratto) - -[contributors guide]: ../../../../docs/developer/contributing.md diff --git a/operations/helm/charts/grafana-agent/ci/static-mode-values.yaml b/operations/helm/charts/grafana-agent/ci/static-mode-values.yaml deleted file mode 100644 index 9d4dc793ec..0000000000 --- a/operations/helm/charts/grafana-agent/ci/static-mode-values.yaml +++ /dev/null @@ -1,2 +0,0 @@ -agent: - mode: static diff --git a/operations/helm/charts/grafana-agent/config/example.yaml b/operations/helm/charts/grafana-agent/config/example.yaml deleted file mode 100644 index 209ab93d73..0000000000 --- a/operations/helm/charts/grafana-agent/config/example.yaml +++ /dev/null @@ -1,3 +0,0 @@ -server: - log_level: info - log_format: logfmt diff --git a/operations/helm/charts/grafana-agent/templates/NOTES.txt b/operations/helm/charts/grafana-agent/templates/NOTES.txt deleted file mode 100644 index 41bde70281..0000000000 --- a/operations/helm/charts/grafana-agent/templates/NOTES.txt +++ /dev/null @@ -1 +0,0 @@ -Welcome to Grafana Agent! diff --git a/operations/helm/charts/grafana-agent/templates/_config.tpl b/operations/helm/charts/grafana-agent/templates/_config.tpl deleted file mode 100644 index db2edaaf9a..0000000000 --- a/operations/helm/charts/grafana-agent/templates/_config.tpl +++ /dev/null @@ -1,25 +0,0 @@ -{{/* -Retrieve configMap name from the name of the chart or the ConfigMap the user -specified. -*/}} -{{- define "grafana-agent.config-map.name" -}} -{{- if .Values.agent.configMap.name -}} -{{- .Values.agent.configMap.name }} -{{- else -}} -{{- include "grafana-agent.fullname" . }} -{{- end }} -{{- end }} - -{{/* -The name of the config file is the default or the key the user specified in the -ConfigMap. -*/}} -{{- define "grafana-agent.config-map.key" -}} -{{- if .Values.agent.configMap.key -}} -{{- .Values.agent.configMap.key }} -{{- else if eq .Values.agent.mode "flow" -}} -config.river -{{- else if eq .Values.agent.mode "static" -}} -config.yaml -{{- end }} -{{- end }} diff --git a/operations/helm/charts/grafana-agent/templates/configmap.yaml b/operations/helm/charts/grafana-agent/templates/configmap.yaml deleted file mode 100644 index 299bd9a7d2..0000000000 --- a/operations/helm/charts/grafana-agent/templates/configmap.yaml +++ /dev/null @@ -1,22 +0,0 @@ -{{- if .Values.agent.configMap.create }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ include "grafana-agent.fullname" . }} - labels: - {{- include "grafana-agent.labels" . | nindent 4 }} -data: - {{- if eq .Values.agent.mode "flow" }} - {{- if .Values.agent.configMap.content }} - config.river: |- {{- (tpl .Values.agent.configMap.content .) | nindent 4 }} - {{- else }} - config.river: |- {{- .Files.Get "config/example.river" | trim | nindent 4 }} - {{- end }} - {{- else if eq .Values.agent.mode "static" }} - {{- if .Values.agent.configMap.content }} - config.yaml: |- {{- (tpl .Values.agent.configMap.content .) | nindent 4 }} - {{- else }} - config.yaml: |- {{- .Files.Get "config/example.yaml" | trim | nindent 4 }} - {{- end }} - {{- end }} -{{- end }} diff --git a/operations/helm/charts/grafana-agent/templates/containers/_agent.yaml b/operations/helm/charts/grafana-agent/templates/containers/_agent.yaml deleted file mode 100644 index 0066f198ca..0000000000 --- a/operations/helm/charts/grafana-agent/templates/containers/_agent.yaml +++ /dev/null @@ -1,85 +0,0 @@ -{{- define "grafana-agent.container" -}} -- name: grafana-agent - image: {{ .Values.global.image.registry | default .Values.image.registry }}/{{ .Values.image.repository }}{{ include "grafana-agent.imageId" . }} - imagePullPolicy: {{ .Values.image.pullPolicy }} - args: - {{- if eq .Values.agent.mode "flow"}} - - run - - /etc/agent/{{ include "grafana-agent.config-map.key" . }} - - --storage.path={{ .Values.agent.storagePath }} - - --server.http.listen-addr={{ .Values.agent.listenAddr }}:{{ .Values.agent.listenPort }} - - --server.http.ui-path-prefix={{ .Values.agent.uiPathPrefix }} - {{- if not .Values.agent.enableReporting }} - - --disable-reporting - {{- end}} - {{- if .Values.agent.clustering.enabled }} - - --cluster.enabled=true - - --cluster.join-addresses={{ include "grafana-agent.fullname" . }}-cluster - {{- end}} - {{- end}} - {{- if eq .Values.agent.mode "static"}} - - -config.file=/etc/agent/{{ include "grafana-agent.config-map.key" . }} - - -server.http.address={{ .Values.agent.listenAddr }}:{{ .Values.agent.listenPort }} - {{- end}} - {{- range .Values.agent.extraArgs }} - - {{ . }} - {{- end}} - env: - - name: AGENT_MODE - value: {{ .Values.agent.mode }} - - name: AGENT_DEPLOY_MODE - value: "helm" - - name: HOSTNAME - valueFrom: - fieldRef: - fieldPath: spec.nodeName - {{- range .Values.agent.extraEnv }} - - {{- toYaml . | nindent 6 }} - {{- end }} - {{- if .Values.agent.envFrom }} - envFrom: - {{- toYaml .Values.agent.envFrom | nindent 4 }} - {{- end }} - ports: - - containerPort: {{ .Values.agent.listenPort }} - name: http-metrics - {{- range $portMap := .Values.agent.extraPorts }} - - containerPort: {{ $portMap.targetPort }} - {{- if $portMap.hostPort }} - hostPort: {{ $portMap.hostPort }} - {{- end}} - name: {{ $portMap.name }} - protocol: {{ coalesce $portMap.protocol "TCP" }} - {{- end }} - readinessProbe: - httpGet: - path: /-/ready - port: {{ .Values.agent.listenPort }} - scheme: {{ .Values.agent.listenScheme }} - initialDelaySeconds: 10 - timeoutSeconds: 1 - {{- with .Values.agent.resources }} - resources: - {{- toYaml . | nindent 4 }} - {{- end }} - {{- with .Values.agent.securityContext }} - securityContext: - {{- toYaml . | nindent 4 }} - {{- end }} - volumeMounts: - - name: config - mountPath: /etc/agent - {{- if .Values.agent.mounts.varlog }} - - name: varlog - mountPath: /var/log - readOnly: true - {{- end }} - {{- if .Values.agent.mounts.dockercontainers }} - - name: dockercontainers - mountPath: /var/lib/docker/containers - readOnly: true - {{- end }} - {{- range .Values.agent.mounts.extra }} - - {{- toYaml . | nindent 6 }} - {{- end }} -{{- end }} diff --git a/operations/helm/tests/controller-volumes-extra/grafana-agent/templates/configmap.yaml b/operations/helm/tests/additional-serviceaccount-label/alloy/templates/configmap.yaml similarity index 77% rename from operations/helm/tests/controller-volumes-extra/grafana-agent/templates/configmap.yaml rename to operations/helm/tests/additional-serviceaccount-label/alloy/templates/configmap.yaml index 2fdc6f0117..c9ae77aa1e 100644 --- a/operations/helm/tests/controller-volumes-extra/grafana-agent/templates/configmap.yaml +++ b/operations/helm/tests/additional-serviceaccount-label/alloy/templates/configmap.yaml @@ -1,13 +1,13 @@ --- -# Source: grafana-agent/templates/configmap.yaml +# Source: alloy/templates/configmap.yaml apiVersion: v1 kind: ConfigMap metadata: - name: grafana-agent + name: alloy labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy app.kubernetes.io/version: "vX.Y.Z" app.kubernetes.io/managed-by: Helm data: diff --git a/operations/helm/tests/additional-serviceaccount-label/grafana-agent/templates/controllers/daemonset.yaml b/operations/helm/tests/additional-serviceaccount-label/alloy/templates/controllers/daemonset.yaml similarity index 61% rename from operations/helm/tests/additional-serviceaccount-label/grafana-agent/templates/controllers/daemonset.yaml rename to operations/helm/tests/additional-serviceaccount-label/alloy/templates/controllers/daemonset.yaml index 356c736349..ca587b7b9c 100644 --- a/operations/helm/tests/additional-serviceaccount-label/grafana-agent/templates/controllers/daemonset.yaml +++ b/operations/helm/tests/additional-serviceaccount-label/alloy/templates/controllers/daemonset.yaml @@ -1,43 +1,41 @@ --- -# Source: grafana-agent/templates/controllers/daemonset.yaml +# Source: alloy/templates/controllers/daemonset.yaml apiVersion: apps/v1 kind: DaemonSet metadata: - name: grafana-agent + name: alloy labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy app.kubernetes.io/version: "vX.Y.Z" app.kubernetes.io/managed-by: Helm spec: minReadySeconds: 10 selector: matchLabels: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy template: metadata: annotations: - kubectl.kubernetes.io/default-container: grafana-agent + kubectl.kubernetes.io/default-container: alloy labels: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy spec: - serviceAccountName: grafana-agent + serviceAccountName: alloy containers: - - name: grafana-agent - image: docker.io/grafana/agent:v0.40.2 + - name: alloy + image: docker.io/grafana/alloy:v1.0.0 imagePullPolicy: IfNotPresent args: - run - - /etc/agent/config.river - - --storage.path=/tmp/agent + - /etc/alloy/config.river + - --storage.path=/tmp/alloy - --server.http.listen-addr=0.0.0.0:80 - --server.http.ui-path-prefix=/ env: - - name: AGENT_MODE - value: flow - name: AGENT_DEPLOY_MODE value: "helm" - name: HOSTNAME @@ -56,15 +54,15 @@ spec: timeoutSeconds: 1 volumeMounts: - name: config - mountPath: /etc/agent + mountPath: /etc/alloy - name: config-reloader image: ghcr.io/jimmidyson/configmap-reload:v0.12.0 args: - - --volume-dir=/etc/agent + - --volume-dir=/etc/alloy - --webhook-url=http://localhost:80/-/reload volumeMounts: - name: config - mountPath: /etc/agent + mountPath: /etc/alloy resources: requests: cpu: 1m @@ -73,4 +71,4 @@ spec: volumes: - name: config configMap: - name: grafana-agent + name: alloy diff --git a/operations/helm/tests/clustering/grafana-agent/templates/rbac.yaml b/operations/helm/tests/additional-serviceaccount-label/alloy/templates/rbac.yaml similarity index 83% rename from operations/helm/tests/clustering/grafana-agent/templates/rbac.yaml rename to operations/helm/tests/additional-serviceaccount-label/alloy/templates/rbac.yaml index 3765583fb6..53ca27544f 100644 --- a/operations/helm/tests/clustering/grafana-agent/templates/rbac.yaml +++ b/operations/helm/tests/additional-serviceaccount-label/alloy/templates/rbac.yaml @@ -1,13 +1,13 @@ --- -# Source: grafana-agent/templates/rbac.yaml +# Source: alloy/templates/rbac.yaml apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: - name: grafana-agent + name: alloy labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy app.kubernetes.io/version: "vX.Y.Z" app.kubernetes.io/managed-by: Helm rules: @@ -96,22 +96,22 @@ rules: resources: ["replicasets"] verbs: ["get", "list", "watch"] --- -# Source: grafana-agent/templates/rbac.yaml +# Source: alloy/templates/rbac.yaml apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: - name: grafana-agent + name: alloy labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy app.kubernetes.io/version: "vX.Y.Z" app.kubernetes.io/managed-by: Helm roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole - name: grafana-agent + name: alloy subjects: - kind: ServiceAccount - name: grafana-agent + name: alloy namespace: default diff --git a/operations/helm/tests/create-daemonset-hostnetwork/grafana-agent/templates/service.yaml b/operations/helm/tests/additional-serviceaccount-label/alloy/templates/service.yaml similarity index 51% rename from operations/helm/tests/create-daemonset-hostnetwork/grafana-agent/templates/service.yaml rename to operations/helm/tests/additional-serviceaccount-label/alloy/templates/service.yaml index c98f79428b..34c0608fd3 100644 --- a/operations/helm/tests/create-daemonset-hostnetwork/grafana-agent/templates/service.yaml +++ b/operations/helm/tests/additional-serviceaccount-label/alloy/templates/service.yaml @@ -1,20 +1,20 @@ --- -# Source: grafana-agent/templates/service.yaml +# Source: alloy/templates/service.yaml apiVersion: v1 kind: Service metadata: - name: grafana-agent + name: alloy labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy app.kubernetes.io/version: "vX.Y.Z" app.kubernetes.io/managed-by: Helm spec: type: ClusterIP selector: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy internalTrafficPolicy: Cluster ports: - name: http-metrics diff --git a/operations/helm/tests/additional-serviceaccount-label/alloy/templates/serviceaccount.yaml b/operations/helm/tests/additional-serviceaccount-label/alloy/templates/serviceaccount.yaml new file mode 100644 index 0000000000..8c685ec855 --- /dev/null +++ b/operations/helm/tests/additional-serviceaccount-label/alloy/templates/serviceaccount.yaml @@ -0,0 +1,14 @@ +--- +# Source: alloy/templates/serviceaccount.yaml +apiVersion: v1 +kind: ServiceAccount +metadata: + name: alloy + namespace: default + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm + test: "true" diff --git a/operations/helm/tests/additional-serviceaccount-label/grafana-agent/templates/serviceaccount.yaml b/operations/helm/tests/additional-serviceaccount-label/grafana-agent/templates/serviceaccount.yaml deleted file mode 100644 index 08eca9f756..0000000000 --- a/operations/helm/tests/additional-serviceaccount-label/grafana-agent/templates/serviceaccount.yaml +++ /dev/null @@ -1,14 +0,0 @@ ---- -# Source: grafana-agent/templates/serviceaccount.yaml -apiVersion: v1 -kind: ServiceAccount -metadata: - name: grafana-agent - namespace: default - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm - test: "true" diff --git a/operations/helm/tests/clustering/grafana-agent/templates/cluster_service.yaml b/operations/helm/tests/clustering/alloy/templates/cluster_service.yaml similarity index 64% rename from operations/helm/tests/clustering/grafana-agent/templates/cluster_service.yaml rename to operations/helm/tests/clustering/alloy/templates/cluster_service.yaml index fb9f35e867..b7dd21b837 100644 --- a/operations/helm/tests/clustering/grafana-agent/templates/cluster_service.yaml +++ b/operations/helm/tests/clustering/alloy/templates/cluster_service.yaml @@ -1,21 +1,21 @@ --- -# Source: grafana-agent/templates/cluster_service.yaml +# Source: alloy/templates/cluster_service.yaml apiVersion: v1 kind: Service metadata: - name: grafana-agent-cluster + name: alloy-cluster labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy app.kubernetes.io/version: "vX.Y.Z" app.kubernetes.io/managed-by: Helm spec: type: ClusterIP clusterIP: 'None' selector: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy ports: # Do not include the -metrics suffix in the port name, otherwise metrics # can be double-collected with the non-headless Service if it's also diff --git a/operations/helm/tests/clustering/grafana-agent/templates/configmap.yaml b/operations/helm/tests/clustering/alloy/templates/configmap.yaml similarity index 77% rename from operations/helm/tests/clustering/grafana-agent/templates/configmap.yaml rename to operations/helm/tests/clustering/alloy/templates/configmap.yaml index 2fdc6f0117..c9ae77aa1e 100644 --- a/operations/helm/tests/clustering/grafana-agent/templates/configmap.yaml +++ b/operations/helm/tests/clustering/alloy/templates/configmap.yaml @@ -1,13 +1,13 @@ --- -# Source: grafana-agent/templates/configmap.yaml +# Source: alloy/templates/configmap.yaml apiVersion: v1 kind: ConfigMap metadata: - name: grafana-agent + name: alloy labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy app.kubernetes.io/version: "vX.Y.Z" app.kubernetes.io/managed-by: Helm data: diff --git a/operations/helm/tests/clustering/alloy/templates/controllers/statefulset.yaml b/operations/helm/tests/clustering/alloy/templates/controllers/statefulset.yaml new file mode 100644 index 0000000000..b0c6c4b829 --- /dev/null +++ b/operations/helm/tests/clustering/alloy/templates/controllers/statefulset.yaml @@ -0,0 +1,79 @@ +--- +# Source: alloy/templates/controllers/statefulset.yaml +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +spec: + replicas: 3 + podManagementPolicy: Parallel + minReadySeconds: 10 + serviceName: alloy + selector: + matchLabels: + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + template: + metadata: + annotations: + kubectl.kubernetes.io/default-container: alloy + labels: + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + spec: + serviceAccountName: alloy + containers: + - name: alloy + image: docker.io/grafana/alloy:v1.0.0 + imagePullPolicy: IfNotPresent + args: + - run + - /etc/alloy/config.river + - --storage.path=/tmp/alloy + - --server.http.listen-addr=0.0.0.0:80 + - --server.http.ui-path-prefix=/ + - --cluster.enabled=true + - --cluster.join-addresses=alloy-cluster + env: + - name: AGENT_DEPLOY_MODE + value: "helm" + - name: HOSTNAME + valueFrom: + fieldRef: + fieldPath: spec.nodeName + ports: + - containerPort: 80 + name: http-metrics + readinessProbe: + httpGet: + path: /-/ready + port: 80 + scheme: HTTP + initialDelaySeconds: 10 + timeoutSeconds: 1 + volumeMounts: + - name: config + mountPath: /etc/alloy + - name: config-reloader + image: ghcr.io/jimmidyson/configmap-reload:v0.12.0 + args: + - --volume-dir=/etc/alloy + - --webhook-url=http://localhost:80/-/reload + volumeMounts: + - name: config + mountPath: /etc/alloy + resources: + requests: + cpu: 1m + memory: 5Mi + dnsPolicy: ClusterFirst + volumes: + - name: config + configMap: + name: alloy diff --git a/operations/helm/tests/controller-volumes-extra/grafana-agent/templates/rbac.yaml b/operations/helm/tests/clustering/alloy/templates/rbac.yaml similarity index 83% rename from operations/helm/tests/controller-volumes-extra/grafana-agent/templates/rbac.yaml rename to operations/helm/tests/clustering/alloy/templates/rbac.yaml index 3765583fb6..53ca27544f 100644 --- a/operations/helm/tests/controller-volumes-extra/grafana-agent/templates/rbac.yaml +++ b/operations/helm/tests/clustering/alloy/templates/rbac.yaml @@ -1,13 +1,13 @@ --- -# Source: grafana-agent/templates/rbac.yaml +# Source: alloy/templates/rbac.yaml apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: - name: grafana-agent + name: alloy labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy app.kubernetes.io/version: "vX.Y.Z" app.kubernetes.io/managed-by: Helm rules: @@ -96,22 +96,22 @@ rules: resources: ["replicasets"] verbs: ["get", "list", "watch"] --- -# Source: grafana-agent/templates/rbac.yaml +# Source: alloy/templates/rbac.yaml apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: - name: grafana-agent + name: alloy labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy app.kubernetes.io/version: "vX.Y.Z" app.kubernetes.io/managed-by: Helm roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole - name: grafana-agent + name: alloy subjects: - kind: ServiceAccount - name: grafana-agent + name: alloy namespace: default diff --git a/operations/helm/tests/controller-volumes-extra/grafana-agent/templates/service.yaml b/operations/helm/tests/clustering/alloy/templates/service.yaml similarity index 51% rename from operations/helm/tests/controller-volumes-extra/grafana-agent/templates/service.yaml rename to operations/helm/tests/clustering/alloy/templates/service.yaml index c98f79428b..34c0608fd3 100644 --- a/operations/helm/tests/controller-volumes-extra/grafana-agent/templates/service.yaml +++ b/operations/helm/tests/clustering/alloy/templates/service.yaml @@ -1,20 +1,20 @@ --- -# Source: grafana-agent/templates/service.yaml +# Source: alloy/templates/service.yaml apiVersion: v1 kind: Service metadata: - name: grafana-agent + name: alloy labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy app.kubernetes.io/version: "vX.Y.Z" app.kubernetes.io/managed-by: Helm spec: type: ClusterIP selector: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy internalTrafficPolicy: Cluster ports: - name: http-metrics diff --git a/operations/helm/tests/clustering/alloy/templates/serviceaccount.yaml b/operations/helm/tests/clustering/alloy/templates/serviceaccount.yaml new file mode 100644 index 0000000000..46df991efb --- /dev/null +++ b/operations/helm/tests/clustering/alloy/templates/serviceaccount.yaml @@ -0,0 +1,13 @@ +--- +# Source: alloy/templates/serviceaccount.yaml +apiVersion: v1 +kind: ServiceAccount +metadata: + name: alloy + namespace: default + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm diff --git a/operations/helm/tests/clustering/grafana-agent/templates/controllers/statefulset.yaml b/operations/helm/tests/clustering/grafana-agent/templates/controllers/statefulset.yaml deleted file mode 100644 index a8601aec54..0000000000 --- a/operations/helm/tests/clustering/grafana-agent/templates/controllers/statefulset.yaml +++ /dev/null @@ -1,81 +0,0 @@ ---- -# Source: grafana-agent/templates/controllers/statefulset.yaml -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -spec: - replicas: 3 - podManagementPolicy: Parallel - minReadySeconds: 10 - serviceName: grafana-agent - selector: - matchLabels: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - template: - metadata: - annotations: - kubectl.kubernetes.io/default-container: grafana-agent - labels: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - spec: - serviceAccountName: grafana-agent - containers: - - name: grafana-agent - image: docker.io/grafana/agent:v0.40.2 - imagePullPolicy: IfNotPresent - args: - - run - - /etc/agent/config.river - - --storage.path=/tmp/agent - - --server.http.listen-addr=0.0.0.0:80 - - --server.http.ui-path-prefix=/ - - --cluster.enabled=true - - --cluster.join-addresses=grafana-agent-cluster - env: - - name: AGENT_MODE - value: flow - - name: AGENT_DEPLOY_MODE - value: "helm" - - name: HOSTNAME - valueFrom: - fieldRef: - fieldPath: spec.nodeName - ports: - - containerPort: 80 - name: http-metrics - readinessProbe: - httpGet: - path: /-/ready - port: 80 - scheme: HTTP - initialDelaySeconds: 10 - timeoutSeconds: 1 - volumeMounts: - - name: config - mountPath: /etc/agent - - name: config-reloader - image: ghcr.io/jimmidyson/configmap-reload:v0.12.0 - args: - - --volume-dir=/etc/agent - - --webhook-url=http://localhost:80/-/reload - volumeMounts: - - name: config - mountPath: /etc/agent - resources: - requests: - cpu: 1m - memory: 5Mi - dnsPolicy: ClusterFirst - volumes: - - name: config - configMap: - name: grafana-agent diff --git a/operations/helm/tests/clustering/grafana-agent/templates/serviceaccount.yaml b/operations/helm/tests/clustering/grafana-agent/templates/serviceaccount.yaml deleted file mode 100644 index 65d7e0df38..0000000000 --- a/operations/helm/tests/clustering/grafana-agent/templates/serviceaccount.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -# Source: grafana-agent/templates/serviceaccount.yaml -apiVersion: v1 -kind: ServiceAccount -metadata: - name: grafana-agent - namespace: default - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm diff --git a/operations/helm/tests/create-daemonset-hostnetwork/grafana-agent/templates/configmap.yaml b/operations/helm/tests/controller-volumes-extra/alloy/templates/configmap.yaml similarity index 77% rename from operations/helm/tests/create-daemonset-hostnetwork/grafana-agent/templates/configmap.yaml rename to operations/helm/tests/controller-volumes-extra/alloy/templates/configmap.yaml index 2fdc6f0117..c9ae77aa1e 100644 --- a/operations/helm/tests/create-daemonset-hostnetwork/grafana-agent/templates/configmap.yaml +++ b/operations/helm/tests/controller-volumes-extra/alloy/templates/configmap.yaml @@ -1,13 +1,13 @@ --- -# Source: grafana-agent/templates/configmap.yaml +# Source: alloy/templates/configmap.yaml apiVersion: v1 kind: ConfigMap metadata: - name: grafana-agent + name: alloy labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy app.kubernetes.io/version: "vX.Y.Z" app.kubernetes.io/managed-by: Helm data: diff --git a/operations/helm/tests/controller-volumes-extra/grafana-agent/templates/controllers/daemonset.yaml b/operations/helm/tests/controller-volumes-extra/alloy/templates/controllers/daemonset.yaml similarity index 64% rename from operations/helm/tests/controller-volumes-extra/grafana-agent/templates/controllers/daemonset.yaml rename to operations/helm/tests/controller-volumes-extra/alloy/templates/controllers/daemonset.yaml index de44f0e848..0e09b6a17c 100644 --- a/operations/helm/tests/controller-volumes-extra/grafana-agent/templates/controllers/daemonset.yaml +++ b/operations/helm/tests/controller-volumes-extra/alloy/templates/controllers/daemonset.yaml @@ -1,43 +1,41 @@ --- -# Source: grafana-agent/templates/controllers/daemonset.yaml +# Source: alloy/templates/controllers/daemonset.yaml apiVersion: apps/v1 kind: DaemonSet metadata: - name: grafana-agent + name: alloy labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy app.kubernetes.io/version: "vX.Y.Z" app.kubernetes.io/managed-by: Helm spec: minReadySeconds: 10 selector: matchLabels: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy template: metadata: annotations: - kubectl.kubernetes.io/default-container: grafana-agent + kubectl.kubernetes.io/default-container: alloy labels: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy spec: - serviceAccountName: grafana-agent + serviceAccountName: alloy containers: - - name: grafana-agent - image: docker.io/grafana/agent:v0.40.2 + - name: alloy + image: docker.io/grafana/alloy:v1.0.0 imagePullPolicy: IfNotPresent args: - run - - /etc/agent/config.river - - --storage.path=/tmp/agent + - /etc/alloy/config.river + - --storage.path=/tmp/alloy - --server.http.listen-addr=0.0.0.0:80 - --server.http.ui-path-prefix=/ env: - - name: AGENT_MODE - value: flow - name: AGENT_DEPLOY_MODE value: "helm" - name: HOSTNAME @@ -56,18 +54,18 @@ spec: timeoutSeconds: 1 volumeMounts: - name: config - mountPath: /etc/agent + mountPath: /etc/alloy - mountPath: /cache name: cache-volume - name: config-reloader image: ghcr.io/jimmidyson/configmap-reload:v0.12.0 args: - - --volume-dir=/etc/agent + - --volume-dir=/etc/alloy - --webhook-url=http://localhost:80/-/reload volumeMounts: - name: config - mountPath: /etc/agent + mountPath: /etc/alloy resources: requests: cpu: 1m @@ -76,7 +74,7 @@ spec: volumes: - name: config configMap: - name: grafana-agent + name: alloy - emptyDir: sizeLimit: 500Mi name: cache-volume diff --git a/operations/helm/tests/additional-serviceaccount-label/grafana-agent/templates/rbac.yaml b/operations/helm/tests/controller-volumes-extra/alloy/templates/rbac.yaml similarity index 83% rename from operations/helm/tests/additional-serviceaccount-label/grafana-agent/templates/rbac.yaml rename to operations/helm/tests/controller-volumes-extra/alloy/templates/rbac.yaml index 3765583fb6..53ca27544f 100644 --- a/operations/helm/tests/additional-serviceaccount-label/grafana-agent/templates/rbac.yaml +++ b/operations/helm/tests/controller-volumes-extra/alloy/templates/rbac.yaml @@ -1,13 +1,13 @@ --- -# Source: grafana-agent/templates/rbac.yaml +# Source: alloy/templates/rbac.yaml apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: - name: grafana-agent + name: alloy labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy app.kubernetes.io/version: "vX.Y.Z" app.kubernetes.io/managed-by: Helm rules: @@ -96,22 +96,22 @@ rules: resources: ["replicasets"] verbs: ["get", "list", "watch"] --- -# Source: grafana-agent/templates/rbac.yaml +# Source: alloy/templates/rbac.yaml apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: - name: grafana-agent + name: alloy labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy app.kubernetes.io/version: "vX.Y.Z" app.kubernetes.io/managed-by: Helm roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole - name: grafana-agent + name: alloy subjects: - kind: ServiceAccount - name: grafana-agent + name: alloy namespace: default diff --git a/operations/helm/tests/additional-serviceaccount-label/grafana-agent/templates/service.yaml b/operations/helm/tests/controller-volumes-extra/alloy/templates/service.yaml similarity index 51% rename from operations/helm/tests/additional-serviceaccount-label/grafana-agent/templates/service.yaml rename to operations/helm/tests/controller-volumes-extra/alloy/templates/service.yaml index c98f79428b..34c0608fd3 100644 --- a/operations/helm/tests/additional-serviceaccount-label/grafana-agent/templates/service.yaml +++ b/operations/helm/tests/controller-volumes-extra/alloy/templates/service.yaml @@ -1,20 +1,20 @@ --- -# Source: grafana-agent/templates/service.yaml +# Source: alloy/templates/service.yaml apiVersion: v1 kind: Service metadata: - name: grafana-agent + name: alloy labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy app.kubernetes.io/version: "vX.Y.Z" app.kubernetes.io/managed-by: Helm spec: type: ClusterIP selector: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy internalTrafficPolicy: Cluster ports: - name: http-metrics diff --git a/operations/helm/tests/controller-volumes-extra/alloy/templates/serviceaccount.yaml b/operations/helm/tests/controller-volumes-extra/alloy/templates/serviceaccount.yaml new file mode 100644 index 0000000000..46df991efb --- /dev/null +++ b/operations/helm/tests/controller-volumes-extra/alloy/templates/serviceaccount.yaml @@ -0,0 +1,13 @@ +--- +# Source: alloy/templates/serviceaccount.yaml +apiVersion: v1 +kind: ServiceAccount +metadata: + name: alloy + namespace: default + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm diff --git a/operations/helm/tests/controller-volumes-extra/grafana-agent/templates/serviceaccount.yaml b/operations/helm/tests/controller-volumes-extra/grafana-agent/templates/serviceaccount.yaml deleted file mode 100644 index 65d7e0df38..0000000000 --- a/operations/helm/tests/controller-volumes-extra/grafana-agent/templates/serviceaccount.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -# Source: grafana-agent/templates/serviceaccount.yaml -apiVersion: v1 -kind: ServiceAccount -metadata: - name: grafana-agent - namespace: default - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm diff --git a/operations/helm/tests/additional-serviceaccount-label/grafana-agent/templates/configmap.yaml b/operations/helm/tests/create-daemonset-hostnetwork/alloy/templates/configmap.yaml similarity index 77% rename from operations/helm/tests/additional-serviceaccount-label/grafana-agent/templates/configmap.yaml rename to operations/helm/tests/create-daemonset-hostnetwork/alloy/templates/configmap.yaml index 2fdc6f0117..c9ae77aa1e 100644 --- a/operations/helm/tests/additional-serviceaccount-label/grafana-agent/templates/configmap.yaml +++ b/operations/helm/tests/create-daemonset-hostnetwork/alloy/templates/configmap.yaml @@ -1,13 +1,13 @@ --- -# Source: grafana-agent/templates/configmap.yaml +# Source: alloy/templates/configmap.yaml apiVersion: v1 kind: ConfigMap metadata: - name: grafana-agent + name: alloy labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy app.kubernetes.io/version: "vX.Y.Z" app.kubernetes.io/managed-by: Helm data: diff --git a/operations/helm/tests/create-daemonset-hostnetwork/grafana-agent/templates/controllers/daemonset.yaml b/operations/helm/tests/create-daemonset-hostnetwork/alloy/templates/controllers/daemonset.yaml similarity index 62% rename from operations/helm/tests/create-daemonset-hostnetwork/grafana-agent/templates/controllers/daemonset.yaml rename to operations/helm/tests/create-daemonset-hostnetwork/alloy/templates/controllers/daemonset.yaml index ef4397494e..278ac6f3c8 100644 --- a/operations/helm/tests/create-daemonset-hostnetwork/grafana-agent/templates/controllers/daemonset.yaml +++ b/operations/helm/tests/create-daemonset-hostnetwork/alloy/templates/controllers/daemonset.yaml @@ -1,43 +1,41 @@ --- -# Source: grafana-agent/templates/controllers/daemonset.yaml +# Source: alloy/templates/controllers/daemonset.yaml apiVersion: apps/v1 kind: DaemonSet metadata: - name: grafana-agent + name: alloy labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy app.kubernetes.io/version: "vX.Y.Z" app.kubernetes.io/managed-by: Helm spec: minReadySeconds: 10 selector: matchLabels: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy template: metadata: annotations: - kubectl.kubernetes.io/default-container: grafana-agent + kubectl.kubernetes.io/default-container: alloy labels: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy spec: - serviceAccountName: grafana-agent + serviceAccountName: alloy containers: - - name: grafana-agent - image: docker.io/grafana/agent:v0.40.2 + - name: alloy + image: docker.io/grafana/alloy:v1.0.0 imagePullPolicy: IfNotPresent args: - run - - /etc/agent/config.river - - --storage.path=/tmp/agent + - /etc/alloy/config.river + - --storage.path=/tmp/alloy - --server.http.listen-addr=0.0.0.0:80 - --server.http.ui-path-prefix=/ env: - - name: AGENT_MODE - value: flow - name: AGENT_DEPLOY_MODE value: "helm" - name: HOSTNAME @@ -56,15 +54,15 @@ spec: timeoutSeconds: 1 volumeMounts: - name: config - mountPath: /etc/agent + mountPath: /etc/alloy - name: config-reloader image: ghcr.io/jimmidyson/configmap-reload:v0.12.0 args: - - --volume-dir=/etc/agent + - --volume-dir=/etc/alloy - --webhook-url=http://localhost:80/-/reload volumeMounts: - name: config - mountPath: /etc/agent + mountPath: /etc/alloy resources: requests: cpu: 1m @@ -74,4 +72,4 @@ spec: volumes: - name: config configMap: - name: grafana-agent + name: alloy diff --git a/operations/helm/tests/create-daemonset-hostnetwork/grafana-agent/templates/rbac.yaml b/operations/helm/tests/create-daemonset-hostnetwork/alloy/templates/rbac.yaml similarity index 83% rename from operations/helm/tests/create-daemonset-hostnetwork/grafana-agent/templates/rbac.yaml rename to operations/helm/tests/create-daemonset-hostnetwork/alloy/templates/rbac.yaml index 3765583fb6..53ca27544f 100644 --- a/operations/helm/tests/create-daemonset-hostnetwork/grafana-agent/templates/rbac.yaml +++ b/operations/helm/tests/create-daemonset-hostnetwork/alloy/templates/rbac.yaml @@ -1,13 +1,13 @@ --- -# Source: grafana-agent/templates/rbac.yaml +# Source: alloy/templates/rbac.yaml apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: - name: grafana-agent + name: alloy labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy app.kubernetes.io/version: "vX.Y.Z" app.kubernetes.io/managed-by: Helm rules: @@ -96,22 +96,22 @@ rules: resources: ["replicasets"] verbs: ["get", "list", "watch"] --- -# Source: grafana-agent/templates/rbac.yaml +# Source: alloy/templates/rbac.yaml apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: - name: grafana-agent + name: alloy labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy app.kubernetes.io/version: "vX.Y.Z" app.kubernetes.io/managed-by: Helm roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole - name: grafana-agent + name: alloy subjects: - kind: ServiceAccount - name: grafana-agent + name: alloy namespace: default diff --git a/operations/helm/tests/clustering/grafana-agent/templates/service.yaml b/operations/helm/tests/create-daemonset-hostnetwork/alloy/templates/service.yaml similarity index 51% rename from operations/helm/tests/clustering/grafana-agent/templates/service.yaml rename to operations/helm/tests/create-daemonset-hostnetwork/alloy/templates/service.yaml index c98f79428b..34c0608fd3 100644 --- a/operations/helm/tests/clustering/grafana-agent/templates/service.yaml +++ b/operations/helm/tests/create-daemonset-hostnetwork/alloy/templates/service.yaml @@ -1,20 +1,20 @@ --- -# Source: grafana-agent/templates/service.yaml +# Source: alloy/templates/service.yaml apiVersion: v1 kind: Service metadata: - name: grafana-agent + name: alloy labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy app.kubernetes.io/version: "vX.Y.Z" app.kubernetes.io/managed-by: Helm spec: type: ClusterIP selector: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy internalTrafficPolicy: Cluster ports: - name: http-metrics diff --git a/operations/helm/tests/create-daemonset-hostnetwork/alloy/templates/serviceaccount.yaml b/operations/helm/tests/create-daemonset-hostnetwork/alloy/templates/serviceaccount.yaml new file mode 100644 index 0000000000..46df991efb --- /dev/null +++ b/operations/helm/tests/create-daemonset-hostnetwork/alloy/templates/serviceaccount.yaml @@ -0,0 +1,13 @@ +--- +# Source: alloy/templates/serviceaccount.yaml +apiVersion: v1 +kind: ServiceAccount +metadata: + name: alloy + namespace: default + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm diff --git a/operations/helm/tests/create-daemonset-hostnetwork/grafana-agent/templates/serviceaccount.yaml b/operations/helm/tests/create-daemonset-hostnetwork/grafana-agent/templates/serviceaccount.yaml deleted file mode 100644 index 65d7e0df38..0000000000 --- a/operations/helm/tests/create-daemonset-hostnetwork/grafana-agent/templates/serviceaccount.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -# Source: grafana-agent/templates/serviceaccount.yaml -apiVersion: v1 -kind: ServiceAccount -metadata: - name: grafana-agent - namespace: default - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm diff --git a/operations/helm/tests/create-daemonset/alloy/templates/configmap.yaml b/operations/helm/tests/create-daemonset/alloy/templates/configmap.yaml new file mode 100644 index 0000000000..c9ae77aa1e --- /dev/null +++ b/operations/helm/tests/create-daemonset/alloy/templates/configmap.yaml @@ -0,0 +1,42 @@ +--- +# Source: alloy/templates/configmap.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +data: + config.river: |- + logging { + level = "info" + format = "logfmt" + } + + discovery.kubernetes "pods" { + role = "pod" + } + + discovery.kubernetes "nodes" { + role = "node" + } + + discovery.kubernetes "services" { + role = "service" + } + + discovery.kubernetes "endpoints" { + role = "endpoints" + } + + discovery.kubernetes "endpointslices" { + role = "endpointslice" + } + + discovery.kubernetes "ingresses" { + role = "ingress" + } diff --git a/operations/helm/tests/custom-config/grafana-agent/templates/controllers/daemonset.yaml b/operations/helm/tests/create-daemonset/alloy/templates/controllers/daemonset.yaml similarity index 61% rename from operations/helm/tests/custom-config/grafana-agent/templates/controllers/daemonset.yaml rename to operations/helm/tests/create-daemonset/alloy/templates/controllers/daemonset.yaml index 356c736349..ca587b7b9c 100644 --- a/operations/helm/tests/custom-config/grafana-agent/templates/controllers/daemonset.yaml +++ b/operations/helm/tests/create-daemonset/alloy/templates/controllers/daemonset.yaml @@ -1,43 +1,41 @@ --- -# Source: grafana-agent/templates/controllers/daemonset.yaml +# Source: alloy/templates/controllers/daemonset.yaml apiVersion: apps/v1 kind: DaemonSet metadata: - name: grafana-agent + name: alloy labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy app.kubernetes.io/version: "vX.Y.Z" app.kubernetes.io/managed-by: Helm spec: minReadySeconds: 10 selector: matchLabels: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy template: metadata: annotations: - kubectl.kubernetes.io/default-container: grafana-agent + kubectl.kubernetes.io/default-container: alloy labels: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy spec: - serviceAccountName: grafana-agent + serviceAccountName: alloy containers: - - name: grafana-agent - image: docker.io/grafana/agent:v0.40.2 + - name: alloy + image: docker.io/grafana/alloy:v1.0.0 imagePullPolicy: IfNotPresent args: - run - - /etc/agent/config.river - - --storage.path=/tmp/agent + - /etc/alloy/config.river + - --storage.path=/tmp/alloy - --server.http.listen-addr=0.0.0.0:80 - --server.http.ui-path-prefix=/ env: - - name: AGENT_MODE - value: flow - name: AGENT_DEPLOY_MODE value: "helm" - name: HOSTNAME @@ -56,15 +54,15 @@ spec: timeoutSeconds: 1 volumeMounts: - name: config - mountPath: /etc/agent + mountPath: /etc/alloy - name: config-reloader image: ghcr.io/jimmidyson/configmap-reload:v0.12.0 args: - - --volume-dir=/etc/agent + - --volume-dir=/etc/alloy - --webhook-url=http://localhost:80/-/reload volumeMounts: - name: config - mountPath: /etc/agent + mountPath: /etc/alloy resources: requests: cpu: 1m @@ -73,4 +71,4 @@ spec: volumes: - name: config configMap: - name: grafana-agent + name: alloy diff --git a/operations/helm/tests/create-daemonset/alloy/templates/rbac.yaml b/operations/helm/tests/create-daemonset/alloy/templates/rbac.yaml new file mode 100644 index 0000000000..53ca27544f --- /dev/null +++ b/operations/helm/tests/create-daemonset/alloy/templates/rbac.yaml @@ -0,0 +1,117 @@ +--- +# Source: alloy/templates/rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +rules: + # Rules which allow discovery.kubernetes to function. + - apiGroups: + - "" + - "discovery.k8s.io" + - "networking.k8s.io" + resources: + - endpoints + - endpointslices + - ingresses + - nodes + - nodes/proxy + - nodes/metrics + - pods + - services + verbs: + - get + - list + - watch + # Rules which allow loki.source.kubernetes and loki.source.podlogs to work. + - apiGroups: + - "" + resources: + - pods + - pods/log + - namespaces + verbs: + - get + - list + - watch + - apiGroups: + - "monitoring.grafana.com" + resources: + - podlogs + verbs: + - get + - list + - watch + # Rules which allow mimir.rules.kubernetes to work. + - apiGroups: ["monitoring.coreos.com"] + resources: + - prometheusrules + verbs: + - get + - list + - watch + - nonResourceURLs: + - /metrics + verbs: + - get + # Rules for prometheus.kubernetes.* + - apiGroups: ["monitoring.coreos.com"] + resources: + - podmonitors + - servicemonitors + - probes + verbs: + - get + - list + - watch + # Rules which allow eventhandler to work. + - apiGroups: + - "" + resources: + - events + verbs: + - get + - list + - watch + # needed for remote.kubernetes.* + - apiGroups: [""] + resources: + - "configmaps" + - "secrets" + verbs: + - get + - list + - watch + # needed for otelcol.processor.k8sattributes + - apiGroups: ["apps"] + resources: ["replicasets"] + verbs: ["get", "list", "watch"] + - apiGroups: ["extensions"] + resources: ["replicasets"] + verbs: ["get", "list", "watch"] +--- +# Source: alloy/templates/rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: alloy +subjects: + - kind: ServiceAccount + name: alloy + namespace: default diff --git a/operations/helm/tests/create-daemonset/alloy/templates/service.yaml b/operations/helm/tests/create-daemonset/alloy/templates/service.yaml new file mode 100644 index 0000000000..34c0608fd3 --- /dev/null +++ b/operations/helm/tests/create-daemonset/alloy/templates/service.yaml @@ -0,0 +1,23 @@ +--- +# Source: alloy/templates/service.yaml +apiVersion: v1 +kind: Service +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +spec: + type: ClusterIP + selector: + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + internalTrafficPolicy: Cluster + ports: + - name: http-metrics + port: 80 + targetPort: 80 + protocol: "TCP" diff --git a/operations/helm/tests/create-daemonset/alloy/templates/serviceaccount.yaml b/operations/helm/tests/create-daemonset/alloy/templates/serviceaccount.yaml new file mode 100644 index 0000000000..46df991efb --- /dev/null +++ b/operations/helm/tests/create-daemonset/alloy/templates/serviceaccount.yaml @@ -0,0 +1,13 @@ +--- +# Source: alloy/templates/serviceaccount.yaml +apiVersion: v1 +kind: ServiceAccount +metadata: + name: alloy + namespace: default + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm diff --git a/operations/helm/tests/create-daemonset/grafana-agent/templates/configmap.yaml b/operations/helm/tests/create-daemonset/grafana-agent/templates/configmap.yaml deleted file mode 100644 index 2fdc6f0117..0000000000 --- a/operations/helm/tests/create-daemonset/grafana-agent/templates/configmap.yaml +++ /dev/null @@ -1,42 +0,0 @@ ---- -# Source: grafana-agent/templates/configmap.yaml -apiVersion: v1 -kind: ConfigMap -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -data: - config.river: |- - logging { - level = "info" - format = "logfmt" - } - - discovery.kubernetes "pods" { - role = "pod" - } - - discovery.kubernetes "nodes" { - role = "node" - } - - discovery.kubernetes "services" { - role = "service" - } - - discovery.kubernetes "endpoints" { - role = "endpoints" - } - - discovery.kubernetes "endpointslices" { - role = "endpointslice" - } - - discovery.kubernetes "ingresses" { - role = "ingress" - } diff --git a/operations/helm/tests/create-daemonset/grafana-agent/templates/rbac.yaml b/operations/helm/tests/create-daemonset/grafana-agent/templates/rbac.yaml deleted file mode 100644 index 3765583fb6..0000000000 --- a/operations/helm/tests/create-daemonset/grafana-agent/templates/rbac.yaml +++ /dev/null @@ -1,117 +0,0 @@ ---- -# Source: grafana-agent/templates/rbac.yaml -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -rules: - # Rules which allow discovery.kubernetes to function. - - apiGroups: - - "" - - "discovery.k8s.io" - - "networking.k8s.io" - resources: - - endpoints - - endpointslices - - ingresses - - nodes - - nodes/proxy - - nodes/metrics - - pods - - services - verbs: - - get - - list - - watch - # Rules which allow loki.source.kubernetes and loki.source.podlogs to work. - - apiGroups: - - "" - resources: - - pods - - pods/log - - namespaces - verbs: - - get - - list - - watch - - apiGroups: - - "monitoring.grafana.com" - resources: - - podlogs - verbs: - - get - - list - - watch - # Rules which allow mimir.rules.kubernetes to work. - - apiGroups: ["monitoring.coreos.com"] - resources: - - prometheusrules - verbs: - - get - - list - - watch - - nonResourceURLs: - - /metrics - verbs: - - get - # Rules for prometheus.kubernetes.* - - apiGroups: ["monitoring.coreos.com"] - resources: - - podmonitors - - servicemonitors - - probes - verbs: - - get - - list - - watch - # Rules which allow eventhandler to work. - - apiGroups: - - "" - resources: - - events - verbs: - - get - - list - - watch - # needed for remote.kubernetes.* - - apiGroups: [""] - resources: - - "configmaps" - - "secrets" - verbs: - - get - - list - - watch - # needed for otelcol.processor.k8sattributes - - apiGroups: ["apps"] - resources: ["replicasets"] - verbs: ["get", "list", "watch"] - - apiGroups: ["extensions"] - resources: ["replicasets"] - verbs: ["get", "list", "watch"] ---- -# Source: grafana-agent/templates/rbac.yaml -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: grafana-agent -subjects: - - kind: ServiceAccount - name: grafana-agent - namespace: default diff --git a/operations/helm/tests/create-daemonset/grafana-agent/templates/service.yaml b/operations/helm/tests/create-daemonset/grafana-agent/templates/service.yaml deleted file mode 100644 index c98f79428b..0000000000 --- a/operations/helm/tests/create-daemonset/grafana-agent/templates/service.yaml +++ /dev/null @@ -1,23 +0,0 @@ ---- -# Source: grafana-agent/templates/service.yaml -apiVersion: v1 -kind: Service -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -spec: - type: ClusterIP - selector: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - internalTrafficPolicy: Cluster - ports: - - name: http-metrics - port: 80 - targetPort: 80 - protocol: "TCP" diff --git a/operations/helm/tests/create-daemonset/grafana-agent/templates/serviceaccount.yaml b/operations/helm/tests/create-daemonset/grafana-agent/templates/serviceaccount.yaml deleted file mode 100644 index 65d7e0df38..0000000000 --- a/operations/helm/tests/create-daemonset/grafana-agent/templates/serviceaccount.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -# Source: grafana-agent/templates/serviceaccount.yaml -apiVersion: v1 -kind: ServiceAccount -metadata: - name: grafana-agent - namespace: default - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm diff --git a/operations/helm/tests/create-deployment-autoscaling/alloy/templates/configmap.yaml b/operations/helm/tests/create-deployment-autoscaling/alloy/templates/configmap.yaml new file mode 100644 index 0000000000..c9ae77aa1e --- /dev/null +++ b/operations/helm/tests/create-deployment-autoscaling/alloy/templates/configmap.yaml @@ -0,0 +1,42 @@ +--- +# Source: alloy/templates/configmap.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +data: + config.river: |- + logging { + level = "info" + format = "logfmt" + } + + discovery.kubernetes "pods" { + role = "pod" + } + + discovery.kubernetes "nodes" { + role = "node" + } + + discovery.kubernetes "services" { + role = "service" + } + + discovery.kubernetes "endpoints" { + role = "endpoints" + } + + discovery.kubernetes "endpointslices" { + role = "endpointslice" + } + + discovery.kubernetes "ingresses" { + role = "ingress" + } diff --git a/operations/helm/tests/create-deployment-autoscaling/grafana-agent/templates/controllers/deployment.yaml b/operations/helm/tests/create-deployment-autoscaling/alloy/templates/controllers/deployment.yaml similarity index 63% rename from operations/helm/tests/create-deployment-autoscaling/grafana-agent/templates/controllers/deployment.yaml rename to operations/helm/tests/create-deployment-autoscaling/alloy/templates/controllers/deployment.yaml index 86f6b61d85..3c4deb3a92 100644 --- a/operations/helm/tests/create-deployment-autoscaling/grafana-agent/templates/controllers/deployment.yaml +++ b/operations/helm/tests/create-deployment-autoscaling/alloy/templates/controllers/deployment.yaml @@ -1,43 +1,41 @@ --- -# Source: grafana-agent/templates/controllers/deployment.yaml +# Source: alloy/templates/controllers/deployment.yaml apiVersion: apps/v1 kind: Deployment metadata: - name: grafana-agent + name: alloy labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy app.kubernetes.io/version: "vX.Y.Z" app.kubernetes.io/managed-by: Helm spec: minReadySeconds: 10 selector: matchLabels: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy template: metadata: annotations: - kubectl.kubernetes.io/default-container: grafana-agent + kubectl.kubernetes.io/default-container: alloy labels: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy spec: - serviceAccountName: grafana-agent + serviceAccountName: alloy containers: - - name: grafana-agent - image: docker.io/grafana/agent:v0.40.2 + - name: alloy + image: docker.io/grafana/alloy:v1.0.0 imagePullPolicy: IfNotPresent args: - run - - /etc/agent/config.river - - --storage.path=/tmp/agent + - /etc/alloy/config.river + - --storage.path=/tmp/alloy - --server.http.listen-addr=0.0.0.0:80 - --server.http.ui-path-prefix=/ env: - - name: AGENT_MODE - value: flow - name: AGENT_DEPLOY_MODE value: "helm" - name: HOSTNAME @@ -59,15 +57,15 @@ spec: memory: 100Mi volumeMounts: - name: config - mountPath: /etc/agent + mountPath: /etc/alloy - name: config-reloader image: ghcr.io/jimmidyson/configmap-reload:v0.12.0 args: - - --volume-dir=/etc/agent + - --volume-dir=/etc/alloy - --webhook-url=http://localhost:80/-/reload volumeMounts: - name: config - mountPath: /etc/agent + mountPath: /etc/alloy resources: requests: cpu: 1m @@ -76,4 +74,4 @@ spec: volumes: - name: config configMap: - name: grafana-agent + name: alloy diff --git a/operations/helm/tests/create-deployment-autoscaling/grafana-agent/templates/hpa.yaml b/operations/helm/tests/create-deployment-autoscaling/alloy/templates/hpa.yaml similarity index 82% rename from operations/helm/tests/create-deployment-autoscaling/grafana-agent/templates/hpa.yaml rename to operations/helm/tests/create-deployment-autoscaling/alloy/templates/hpa.yaml index b181724fe4..7914063972 100644 --- a/operations/helm/tests/create-deployment-autoscaling/grafana-agent/templates/hpa.yaml +++ b/operations/helm/tests/create-deployment-autoscaling/alloy/templates/hpa.yaml @@ -1,20 +1,20 @@ --- -# Source: grafana-agent/templates/hpa.yaml +# Source: alloy/templates/hpa.yaml apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: - name: grafana-agent + name: alloy labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy app.kubernetes.io/version: "vX.Y.Z" app.kubernetes.io/managed-by: Helm spec: scaleTargetRef: apiVersion: apps/v1 kind: deployment - name: grafana-agent + name: alloy minReplicas: 1 maxReplicas: 5 behavior: diff --git a/operations/helm/tests/create-deployment-autoscaling/alloy/templates/rbac.yaml b/operations/helm/tests/create-deployment-autoscaling/alloy/templates/rbac.yaml new file mode 100644 index 0000000000..53ca27544f --- /dev/null +++ b/operations/helm/tests/create-deployment-autoscaling/alloy/templates/rbac.yaml @@ -0,0 +1,117 @@ +--- +# Source: alloy/templates/rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +rules: + # Rules which allow discovery.kubernetes to function. + - apiGroups: + - "" + - "discovery.k8s.io" + - "networking.k8s.io" + resources: + - endpoints + - endpointslices + - ingresses + - nodes + - nodes/proxy + - nodes/metrics + - pods + - services + verbs: + - get + - list + - watch + # Rules which allow loki.source.kubernetes and loki.source.podlogs to work. + - apiGroups: + - "" + resources: + - pods + - pods/log + - namespaces + verbs: + - get + - list + - watch + - apiGroups: + - "monitoring.grafana.com" + resources: + - podlogs + verbs: + - get + - list + - watch + # Rules which allow mimir.rules.kubernetes to work. + - apiGroups: ["monitoring.coreos.com"] + resources: + - prometheusrules + verbs: + - get + - list + - watch + - nonResourceURLs: + - /metrics + verbs: + - get + # Rules for prometheus.kubernetes.* + - apiGroups: ["monitoring.coreos.com"] + resources: + - podmonitors + - servicemonitors + - probes + verbs: + - get + - list + - watch + # Rules which allow eventhandler to work. + - apiGroups: + - "" + resources: + - events + verbs: + - get + - list + - watch + # needed for remote.kubernetes.* + - apiGroups: [""] + resources: + - "configmaps" + - "secrets" + verbs: + - get + - list + - watch + # needed for otelcol.processor.k8sattributes + - apiGroups: ["apps"] + resources: ["replicasets"] + verbs: ["get", "list", "watch"] + - apiGroups: ["extensions"] + resources: ["replicasets"] + verbs: ["get", "list", "watch"] +--- +# Source: alloy/templates/rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: alloy +subjects: + - kind: ServiceAccount + name: alloy + namespace: default diff --git a/operations/helm/tests/create-deployment-autoscaling/alloy/templates/service.yaml b/operations/helm/tests/create-deployment-autoscaling/alloy/templates/service.yaml new file mode 100644 index 0000000000..34c0608fd3 --- /dev/null +++ b/operations/helm/tests/create-deployment-autoscaling/alloy/templates/service.yaml @@ -0,0 +1,23 @@ +--- +# Source: alloy/templates/service.yaml +apiVersion: v1 +kind: Service +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +spec: + type: ClusterIP + selector: + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + internalTrafficPolicy: Cluster + ports: + - name: http-metrics + port: 80 + targetPort: 80 + protocol: "TCP" diff --git a/operations/helm/tests/create-deployment-autoscaling/alloy/templates/serviceaccount.yaml b/operations/helm/tests/create-deployment-autoscaling/alloy/templates/serviceaccount.yaml new file mode 100644 index 0000000000..46df991efb --- /dev/null +++ b/operations/helm/tests/create-deployment-autoscaling/alloy/templates/serviceaccount.yaml @@ -0,0 +1,13 @@ +--- +# Source: alloy/templates/serviceaccount.yaml +apiVersion: v1 +kind: ServiceAccount +metadata: + name: alloy + namespace: default + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm diff --git a/operations/helm/tests/create-deployment-autoscaling/grafana-agent/templates/configmap.yaml b/operations/helm/tests/create-deployment-autoscaling/grafana-agent/templates/configmap.yaml deleted file mode 100644 index 2fdc6f0117..0000000000 --- a/operations/helm/tests/create-deployment-autoscaling/grafana-agent/templates/configmap.yaml +++ /dev/null @@ -1,42 +0,0 @@ ---- -# Source: grafana-agent/templates/configmap.yaml -apiVersion: v1 -kind: ConfigMap -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -data: - config.river: |- - logging { - level = "info" - format = "logfmt" - } - - discovery.kubernetes "pods" { - role = "pod" - } - - discovery.kubernetes "nodes" { - role = "node" - } - - discovery.kubernetes "services" { - role = "service" - } - - discovery.kubernetes "endpoints" { - role = "endpoints" - } - - discovery.kubernetes "endpointslices" { - role = "endpointslice" - } - - discovery.kubernetes "ingresses" { - role = "ingress" - } diff --git a/operations/helm/tests/create-deployment-autoscaling/grafana-agent/templates/rbac.yaml b/operations/helm/tests/create-deployment-autoscaling/grafana-agent/templates/rbac.yaml deleted file mode 100644 index 3765583fb6..0000000000 --- a/operations/helm/tests/create-deployment-autoscaling/grafana-agent/templates/rbac.yaml +++ /dev/null @@ -1,117 +0,0 @@ ---- -# Source: grafana-agent/templates/rbac.yaml -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -rules: - # Rules which allow discovery.kubernetes to function. - - apiGroups: - - "" - - "discovery.k8s.io" - - "networking.k8s.io" - resources: - - endpoints - - endpointslices - - ingresses - - nodes - - nodes/proxy - - nodes/metrics - - pods - - services - verbs: - - get - - list - - watch - # Rules which allow loki.source.kubernetes and loki.source.podlogs to work. - - apiGroups: - - "" - resources: - - pods - - pods/log - - namespaces - verbs: - - get - - list - - watch - - apiGroups: - - "monitoring.grafana.com" - resources: - - podlogs - verbs: - - get - - list - - watch - # Rules which allow mimir.rules.kubernetes to work. - - apiGroups: ["monitoring.coreos.com"] - resources: - - prometheusrules - verbs: - - get - - list - - watch - - nonResourceURLs: - - /metrics - verbs: - - get - # Rules for prometheus.kubernetes.* - - apiGroups: ["monitoring.coreos.com"] - resources: - - podmonitors - - servicemonitors - - probes - verbs: - - get - - list - - watch - # Rules which allow eventhandler to work. - - apiGroups: - - "" - resources: - - events - verbs: - - get - - list - - watch - # needed for remote.kubernetes.* - - apiGroups: [""] - resources: - - "configmaps" - - "secrets" - verbs: - - get - - list - - watch - # needed for otelcol.processor.k8sattributes - - apiGroups: ["apps"] - resources: ["replicasets"] - verbs: ["get", "list", "watch"] - - apiGroups: ["extensions"] - resources: ["replicasets"] - verbs: ["get", "list", "watch"] ---- -# Source: grafana-agent/templates/rbac.yaml -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: grafana-agent -subjects: - - kind: ServiceAccount - name: grafana-agent - namespace: default diff --git a/operations/helm/tests/create-deployment-autoscaling/grafana-agent/templates/service.yaml b/operations/helm/tests/create-deployment-autoscaling/grafana-agent/templates/service.yaml deleted file mode 100644 index c98f79428b..0000000000 --- a/operations/helm/tests/create-deployment-autoscaling/grafana-agent/templates/service.yaml +++ /dev/null @@ -1,23 +0,0 @@ ---- -# Source: grafana-agent/templates/service.yaml -apiVersion: v1 -kind: Service -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -spec: - type: ClusterIP - selector: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - internalTrafficPolicy: Cluster - ports: - - name: http-metrics - port: 80 - targetPort: 80 - protocol: "TCP" diff --git a/operations/helm/tests/create-deployment-autoscaling/grafana-agent/templates/serviceaccount.yaml b/operations/helm/tests/create-deployment-autoscaling/grafana-agent/templates/serviceaccount.yaml deleted file mode 100644 index 65d7e0df38..0000000000 --- a/operations/helm/tests/create-deployment-autoscaling/grafana-agent/templates/serviceaccount.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -# Source: grafana-agent/templates/serviceaccount.yaml -apiVersion: v1 -kind: ServiceAccount -metadata: - name: grafana-agent - namespace: default - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm diff --git a/operations/helm/tests/create-deployment/alloy/templates/configmap.yaml b/operations/helm/tests/create-deployment/alloy/templates/configmap.yaml new file mode 100644 index 0000000000..c9ae77aa1e --- /dev/null +++ b/operations/helm/tests/create-deployment/alloy/templates/configmap.yaml @@ -0,0 +1,42 @@ +--- +# Source: alloy/templates/configmap.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +data: + config.river: |- + logging { + level = "info" + format = "logfmt" + } + + discovery.kubernetes "pods" { + role = "pod" + } + + discovery.kubernetes "nodes" { + role = "node" + } + + discovery.kubernetes "services" { + role = "service" + } + + discovery.kubernetes "endpoints" { + role = "endpoints" + } + + discovery.kubernetes "endpointslices" { + role = "endpointslice" + } + + discovery.kubernetes "ingresses" { + role = "ingress" + } diff --git a/operations/helm/tests/create-deployment/grafana-agent/templates/controllers/deployment.yaml b/operations/helm/tests/create-deployment/alloy/templates/controllers/deployment.yaml similarity index 62% rename from operations/helm/tests/create-deployment/grafana-agent/templates/controllers/deployment.yaml rename to operations/helm/tests/create-deployment/alloy/templates/controllers/deployment.yaml index df8f327002..918ea5f642 100644 --- a/operations/helm/tests/create-deployment/grafana-agent/templates/controllers/deployment.yaml +++ b/operations/helm/tests/create-deployment/alloy/templates/controllers/deployment.yaml @@ -1,13 +1,13 @@ --- -# Source: grafana-agent/templates/controllers/deployment.yaml +# Source: alloy/templates/controllers/deployment.yaml apiVersion: apps/v1 kind: Deployment metadata: - name: grafana-agent + name: alloy labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy app.kubernetes.io/version: "vX.Y.Z" app.kubernetes.io/managed-by: Helm spec: @@ -15,30 +15,28 @@ spec: minReadySeconds: 10 selector: matchLabels: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy template: metadata: annotations: - kubectl.kubernetes.io/default-container: grafana-agent + kubectl.kubernetes.io/default-container: alloy labels: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy spec: - serviceAccountName: grafana-agent + serviceAccountName: alloy containers: - - name: grafana-agent - image: docker.io/grafana/agent:v0.40.2 + - name: alloy + image: docker.io/grafana/alloy:v1.0.0 imagePullPolicy: IfNotPresent args: - run - - /etc/agent/config.river - - --storage.path=/tmp/agent + - /etc/alloy/config.river + - --storage.path=/tmp/alloy - --server.http.listen-addr=0.0.0.0:80 - --server.http.ui-path-prefix=/ env: - - name: AGENT_MODE - value: flow - name: AGENT_DEPLOY_MODE value: "helm" - name: HOSTNAME @@ -57,15 +55,15 @@ spec: timeoutSeconds: 1 volumeMounts: - name: config - mountPath: /etc/agent + mountPath: /etc/alloy - name: config-reloader image: ghcr.io/jimmidyson/configmap-reload:v0.12.0 args: - - --volume-dir=/etc/agent + - --volume-dir=/etc/alloy - --webhook-url=http://localhost:80/-/reload volumeMounts: - name: config - mountPath: /etc/agent + mountPath: /etc/alloy resources: requests: cpu: 1m @@ -74,4 +72,4 @@ spec: volumes: - name: config configMap: - name: grafana-agent + name: alloy diff --git a/operations/helm/tests/create-deployment/alloy/templates/rbac.yaml b/operations/helm/tests/create-deployment/alloy/templates/rbac.yaml new file mode 100644 index 0000000000..53ca27544f --- /dev/null +++ b/operations/helm/tests/create-deployment/alloy/templates/rbac.yaml @@ -0,0 +1,117 @@ +--- +# Source: alloy/templates/rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +rules: + # Rules which allow discovery.kubernetes to function. + - apiGroups: + - "" + - "discovery.k8s.io" + - "networking.k8s.io" + resources: + - endpoints + - endpointslices + - ingresses + - nodes + - nodes/proxy + - nodes/metrics + - pods + - services + verbs: + - get + - list + - watch + # Rules which allow loki.source.kubernetes and loki.source.podlogs to work. + - apiGroups: + - "" + resources: + - pods + - pods/log + - namespaces + verbs: + - get + - list + - watch + - apiGroups: + - "monitoring.grafana.com" + resources: + - podlogs + verbs: + - get + - list + - watch + # Rules which allow mimir.rules.kubernetes to work. + - apiGroups: ["monitoring.coreos.com"] + resources: + - prometheusrules + verbs: + - get + - list + - watch + - nonResourceURLs: + - /metrics + verbs: + - get + # Rules for prometheus.kubernetes.* + - apiGroups: ["monitoring.coreos.com"] + resources: + - podmonitors + - servicemonitors + - probes + verbs: + - get + - list + - watch + # Rules which allow eventhandler to work. + - apiGroups: + - "" + resources: + - events + verbs: + - get + - list + - watch + # needed for remote.kubernetes.* + - apiGroups: [""] + resources: + - "configmaps" + - "secrets" + verbs: + - get + - list + - watch + # needed for otelcol.processor.k8sattributes + - apiGroups: ["apps"] + resources: ["replicasets"] + verbs: ["get", "list", "watch"] + - apiGroups: ["extensions"] + resources: ["replicasets"] + verbs: ["get", "list", "watch"] +--- +# Source: alloy/templates/rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: alloy +subjects: + - kind: ServiceAccount + name: alloy + namespace: default diff --git a/operations/helm/tests/create-deployment/alloy/templates/service.yaml b/operations/helm/tests/create-deployment/alloy/templates/service.yaml new file mode 100644 index 0000000000..34c0608fd3 --- /dev/null +++ b/operations/helm/tests/create-deployment/alloy/templates/service.yaml @@ -0,0 +1,23 @@ +--- +# Source: alloy/templates/service.yaml +apiVersion: v1 +kind: Service +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +spec: + type: ClusterIP + selector: + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + internalTrafficPolicy: Cluster + ports: + - name: http-metrics + port: 80 + targetPort: 80 + protocol: "TCP" diff --git a/operations/helm/tests/create-deployment/alloy/templates/serviceaccount.yaml b/operations/helm/tests/create-deployment/alloy/templates/serviceaccount.yaml new file mode 100644 index 0000000000..46df991efb --- /dev/null +++ b/operations/helm/tests/create-deployment/alloy/templates/serviceaccount.yaml @@ -0,0 +1,13 @@ +--- +# Source: alloy/templates/serviceaccount.yaml +apiVersion: v1 +kind: ServiceAccount +metadata: + name: alloy + namespace: default + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm diff --git a/operations/helm/tests/create-deployment/grafana-agent/templates/configmap.yaml b/operations/helm/tests/create-deployment/grafana-agent/templates/configmap.yaml deleted file mode 100644 index 2fdc6f0117..0000000000 --- a/operations/helm/tests/create-deployment/grafana-agent/templates/configmap.yaml +++ /dev/null @@ -1,42 +0,0 @@ ---- -# Source: grafana-agent/templates/configmap.yaml -apiVersion: v1 -kind: ConfigMap -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -data: - config.river: |- - logging { - level = "info" - format = "logfmt" - } - - discovery.kubernetes "pods" { - role = "pod" - } - - discovery.kubernetes "nodes" { - role = "node" - } - - discovery.kubernetes "services" { - role = "service" - } - - discovery.kubernetes "endpoints" { - role = "endpoints" - } - - discovery.kubernetes "endpointslices" { - role = "endpointslice" - } - - discovery.kubernetes "ingresses" { - role = "ingress" - } diff --git a/operations/helm/tests/create-deployment/grafana-agent/templates/rbac.yaml b/operations/helm/tests/create-deployment/grafana-agent/templates/rbac.yaml deleted file mode 100644 index 3765583fb6..0000000000 --- a/operations/helm/tests/create-deployment/grafana-agent/templates/rbac.yaml +++ /dev/null @@ -1,117 +0,0 @@ ---- -# Source: grafana-agent/templates/rbac.yaml -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -rules: - # Rules which allow discovery.kubernetes to function. - - apiGroups: - - "" - - "discovery.k8s.io" - - "networking.k8s.io" - resources: - - endpoints - - endpointslices - - ingresses - - nodes - - nodes/proxy - - nodes/metrics - - pods - - services - verbs: - - get - - list - - watch - # Rules which allow loki.source.kubernetes and loki.source.podlogs to work. - - apiGroups: - - "" - resources: - - pods - - pods/log - - namespaces - verbs: - - get - - list - - watch - - apiGroups: - - "monitoring.grafana.com" - resources: - - podlogs - verbs: - - get - - list - - watch - # Rules which allow mimir.rules.kubernetes to work. - - apiGroups: ["monitoring.coreos.com"] - resources: - - prometheusrules - verbs: - - get - - list - - watch - - nonResourceURLs: - - /metrics - verbs: - - get - # Rules for prometheus.kubernetes.* - - apiGroups: ["monitoring.coreos.com"] - resources: - - podmonitors - - servicemonitors - - probes - verbs: - - get - - list - - watch - # Rules which allow eventhandler to work. - - apiGroups: - - "" - resources: - - events - verbs: - - get - - list - - watch - # needed for remote.kubernetes.* - - apiGroups: [""] - resources: - - "configmaps" - - "secrets" - verbs: - - get - - list - - watch - # needed for otelcol.processor.k8sattributes - - apiGroups: ["apps"] - resources: ["replicasets"] - verbs: ["get", "list", "watch"] - - apiGroups: ["extensions"] - resources: ["replicasets"] - verbs: ["get", "list", "watch"] ---- -# Source: grafana-agent/templates/rbac.yaml -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: grafana-agent -subjects: - - kind: ServiceAccount - name: grafana-agent - namespace: default diff --git a/operations/helm/tests/create-deployment/grafana-agent/templates/service.yaml b/operations/helm/tests/create-deployment/grafana-agent/templates/service.yaml deleted file mode 100644 index c98f79428b..0000000000 --- a/operations/helm/tests/create-deployment/grafana-agent/templates/service.yaml +++ /dev/null @@ -1,23 +0,0 @@ ---- -# Source: grafana-agent/templates/service.yaml -apiVersion: v1 -kind: Service -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -spec: - type: ClusterIP - selector: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - internalTrafficPolicy: Cluster - ports: - - name: http-metrics - port: 80 - targetPort: 80 - protocol: "TCP" diff --git a/operations/helm/tests/create-deployment/grafana-agent/templates/serviceaccount.yaml b/operations/helm/tests/create-deployment/grafana-agent/templates/serviceaccount.yaml deleted file mode 100644 index 65d7e0df38..0000000000 --- a/operations/helm/tests/create-deployment/grafana-agent/templates/serviceaccount.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -# Source: grafana-agent/templates/serviceaccount.yaml -apiVersion: v1 -kind: ServiceAccount -metadata: - name: grafana-agent - namespace: default - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm diff --git a/operations/helm/tests/create-statefulset-autoscaling/alloy/templates/configmap.yaml b/operations/helm/tests/create-statefulset-autoscaling/alloy/templates/configmap.yaml new file mode 100644 index 0000000000..c9ae77aa1e --- /dev/null +++ b/operations/helm/tests/create-statefulset-autoscaling/alloy/templates/configmap.yaml @@ -0,0 +1,42 @@ +--- +# Source: alloy/templates/configmap.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +data: + config.river: |- + logging { + level = "info" + format = "logfmt" + } + + discovery.kubernetes "pods" { + role = "pod" + } + + discovery.kubernetes "nodes" { + role = "node" + } + + discovery.kubernetes "services" { + role = "service" + } + + discovery.kubernetes "endpoints" { + role = "endpoints" + } + + discovery.kubernetes "endpointslices" { + role = "endpointslice" + } + + discovery.kubernetes "ingresses" { + role = "ingress" + } diff --git a/operations/helm/tests/create-statefulset-autoscaling/grafana-agent/templates/controllers/statefulset.yaml b/operations/helm/tests/create-statefulset-autoscaling/alloy/templates/controllers/statefulset.yaml similarity index 64% rename from operations/helm/tests/create-statefulset-autoscaling/grafana-agent/templates/controllers/statefulset.yaml rename to operations/helm/tests/create-statefulset-autoscaling/alloy/templates/controllers/statefulset.yaml index 1a00f1123e..978d9a7f80 100644 --- a/operations/helm/tests/create-statefulset-autoscaling/grafana-agent/templates/controllers/statefulset.yaml +++ b/operations/helm/tests/create-statefulset-autoscaling/alloy/templates/controllers/statefulset.yaml @@ -1,45 +1,43 @@ --- -# Source: grafana-agent/templates/controllers/statefulset.yaml +# Source: alloy/templates/controllers/statefulset.yaml apiVersion: apps/v1 kind: StatefulSet metadata: - name: grafana-agent + name: alloy labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy app.kubernetes.io/version: "vX.Y.Z" app.kubernetes.io/managed-by: Helm spec: podManagementPolicy: Parallel minReadySeconds: 10 - serviceName: grafana-agent + serviceName: alloy selector: matchLabels: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy template: metadata: annotations: - kubectl.kubernetes.io/default-container: grafana-agent + kubectl.kubernetes.io/default-container: alloy labels: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy spec: - serviceAccountName: grafana-agent + serviceAccountName: alloy containers: - - name: grafana-agent - image: docker.io/grafana/agent:v0.40.2 + - name: alloy + image: docker.io/grafana/alloy:v1.0.0 imagePullPolicy: IfNotPresent args: - run - - /etc/agent/config.river - - --storage.path=/tmp/agent + - /etc/alloy/config.river + - --storage.path=/tmp/alloy - --server.http.listen-addr=0.0.0.0:80 - --server.http.ui-path-prefix=/ env: - - name: AGENT_MODE - value: flow - name: AGENT_DEPLOY_MODE value: "helm" - name: HOSTNAME @@ -61,15 +59,15 @@ spec: memory: 100Mi volumeMounts: - name: config - mountPath: /etc/agent + mountPath: /etc/alloy - name: config-reloader image: ghcr.io/jimmidyson/configmap-reload:v0.12.0 args: - - --volume-dir=/etc/agent + - --volume-dir=/etc/alloy - --webhook-url=http://localhost:80/-/reload volumeMounts: - name: config - mountPath: /etc/agent + mountPath: /etc/alloy resources: requests: cpu: 1m @@ -78,7 +76,7 @@ spec: volumes: - name: config configMap: - name: grafana-agent + name: alloy persistentVolumeClaimRetentionPolicy: whenDeleted: Delete whenScaled: Delete diff --git a/operations/helm/tests/create-statefulset-autoscaling/grafana-agent/templates/hpa.yaml b/operations/helm/tests/create-statefulset-autoscaling/alloy/templates/hpa.yaml similarity index 77% rename from operations/helm/tests/create-statefulset-autoscaling/grafana-agent/templates/hpa.yaml rename to operations/helm/tests/create-statefulset-autoscaling/alloy/templates/hpa.yaml index a6674c612a..2dd9b01343 100644 --- a/operations/helm/tests/create-statefulset-autoscaling/grafana-agent/templates/hpa.yaml +++ b/operations/helm/tests/create-statefulset-autoscaling/alloy/templates/hpa.yaml @@ -1,20 +1,20 @@ --- -# Source: grafana-agent/templates/hpa.yaml +# Source: alloy/templates/hpa.yaml apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: - name: grafana-agent + name: alloy labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy app.kubernetes.io/version: "vX.Y.Z" app.kubernetes.io/managed-by: Helm spec: scaleTargetRef: apiVersion: apps/v1 kind: statefulset - name: grafana-agent + name: alloy minReplicas: 1 maxReplicas: 5 behavior: diff --git a/operations/helm/tests/create-statefulset-autoscaling/alloy/templates/rbac.yaml b/operations/helm/tests/create-statefulset-autoscaling/alloy/templates/rbac.yaml new file mode 100644 index 0000000000..53ca27544f --- /dev/null +++ b/operations/helm/tests/create-statefulset-autoscaling/alloy/templates/rbac.yaml @@ -0,0 +1,117 @@ +--- +# Source: alloy/templates/rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +rules: + # Rules which allow discovery.kubernetes to function. + - apiGroups: + - "" + - "discovery.k8s.io" + - "networking.k8s.io" + resources: + - endpoints + - endpointslices + - ingresses + - nodes + - nodes/proxy + - nodes/metrics + - pods + - services + verbs: + - get + - list + - watch + # Rules which allow loki.source.kubernetes and loki.source.podlogs to work. + - apiGroups: + - "" + resources: + - pods + - pods/log + - namespaces + verbs: + - get + - list + - watch + - apiGroups: + - "monitoring.grafana.com" + resources: + - podlogs + verbs: + - get + - list + - watch + # Rules which allow mimir.rules.kubernetes to work. + - apiGroups: ["monitoring.coreos.com"] + resources: + - prometheusrules + verbs: + - get + - list + - watch + - nonResourceURLs: + - /metrics + verbs: + - get + # Rules for prometheus.kubernetes.* + - apiGroups: ["monitoring.coreos.com"] + resources: + - podmonitors + - servicemonitors + - probes + verbs: + - get + - list + - watch + # Rules which allow eventhandler to work. + - apiGroups: + - "" + resources: + - events + verbs: + - get + - list + - watch + # needed for remote.kubernetes.* + - apiGroups: [""] + resources: + - "configmaps" + - "secrets" + verbs: + - get + - list + - watch + # needed for otelcol.processor.k8sattributes + - apiGroups: ["apps"] + resources: ["replicasets"] + verbs: ["get", "list", "watch"] + - apiGroups: ["extensions"] + resources: ["replicasets"] + verbs: ["get", "list", "watch"] +--- +# Source: alloy/templates/rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: alloy +subjects: + - kind: ServiceAccount + name: alloy + namespace: default diff --git a/operations/helm/tests/create-statefulset-autoscaling/alloy/templates/service.yaml b/operations/helm/tests/create-statefulset-autoscaling/alloy/templates/service.yaml new file mode 100644 index 0000000000..34c0608fd3 --- /dev/null +++ b/operations/helm/tests/create-statefulset-autoscaling/alloy/templates/service.yaml @@ -0,0 +1,23 @@ +--- +# Source: alloy/templates/service.yaml +apiVersion: v1 +kind: Service +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +spec: + type: ClusterIP + selector: + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + internalTrafficPolicy: Cluster + ports: + - name: http-metrics + port: 80 + targetPort: 80 + protocol: "TCP" diff --git a/operations/helm/tests/create-statefulset-autoscaling/alloy/templates/serviceaccount.yaml b/operations/helm/tests/create-statefulset-autoscaling/alloy/templates/serviceaccount.yaml new file mode 100644 index 0000000000..46df991efb --- /dev/null +++ b/operations/helm/tests/create-statefulset-autoscaling/alloy/templates/serviceaccount.yaml @@ -0,0 +1,13 @@ +--- +# Source: alloy/templates/serviceaccount.yaml +apiVersion: v1 +kind: ServiceAccount +metadata: + name: alloy + namespace: default + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm diff --git a/operations/helm/tests/create-statefulset-autoscaling/grafana-agent/templates/configmap.yaml b/operations/helm/tests/create-statefulset-autoscaling/grafana-agent/templates/configmap.yaml deleted file mode 100644 index 2fdc6f0117..0000000000 --- a/operations/helm/tests/create-statefulset-autoscaling/grafana-agent/templates/configmap.yaml +++ /dev/null @@ -1,42 +0,0 @@ ---- -# Source: grafana-agent/templates/configmap.yaml -apiVersion: v1 -kind: ConfigMap -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -data: - config.river: |- - logging { - level = "info" - format = "logfmt" - } - - discovery.kubernetes "pods" { - role = "pod" - } - - discovery.kubernetes "nodes" { - role = "node" - } - - discovery.kubernetes "services" { - role = "service" - } - - discovery.kubernetes "endpoints" { - role = "endpoints" - } - - discovery.kubernetes "endpointslices" { - role = "endpointslice" - } - - discovery.kubernetes "ingresses" { - role = "ingress" - } diff --git a/operations/helm/tests/create-statefulset-autoscaling/grafana-agent/templates/rbac.yaml b/operations/helm/tests/create-statefulset-autoscaling/grafana-agent/templates/rbac.yaml deleted file mode 100644 index 3765583fb6..0000000000 --- a/operations/helm/tests/create-statefulset-autoscaling/grafana-agent/templates/rbac.yaml +++ /dev/null @@ -1,117 +0,0 @@ ---- -# Source: grafana-agent/templates/rbac.yaml -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -rules: - # Rules which allow discovery.kubernetes to function. - - apiGroups: - - "" - - "discovery.k8s.io" - - "networking.k8s.io" - resources: - - endpoints - - endpointslices - - ingresses - - nodes - - nodes/proxy - - nodes/metrics - - pods - - services - verbs: - - get - - list - - watch - # Rules which allow loki.source.kubernetes and loki.source.podlogs to work. - - apiGroups: - - "" - resources: - - pods - - pods/log - - namespaces - verbs: - - get - - list - - watch - - apiGroups: - - "monitoring.grafana.com" - resources: - - podlogs - verbs: - - get - - list - - watch - # Rules which allow mimir.rules.kubernetes to work. - - apiGroups: ["monitoring.coreos.com"] - resources: - - prometheusrules - verbs: - - get - - list - - watch - - nonResourceURLs: - - /metrics - verbs: - - get - # Rules for prometheus.kubernetes.* - - apiGroups: ["monitoring.coreos.com"] - resources: - - podmonitors - - servicemonitors - - probes - verbs: - - get - - list - - watch - # Rules which allow eventhandler to work. - - apiGroups: - - "" - resources: - - events - verbs: - - get - - list - - watch - # needed for remote.kubernetes.* - - apiGroups: [""] - resources: - - "configmaps" - - "secrets" - verbs: - - get - - list - - watch - # needed for otelcol.processor.k8sattributes - - apiGroups: ["apps"] - resources: ["replicasets"] - verbs: ["get", "list", "watch"] - - apiGroups: ["extensions"] - resources: ["replicasets"] - verbs: ["get", "list", "watch"] ---- -# Source: grafana-agent/templates/rbac.yaml -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: grafana-agent -subjects: - - kind: ServiceAccount - name: grafana-agent - namespace: default diff --git a/operations/helm/tests/create-statefulset-autoscaling/grafana-agent/templates/service.yaml b/operations/helm/tests/create-statefulset-autoscaling/grafana-agent/templates/service.yaml deleted file mode 100644 index c98f79428b..0000000000 --- a/operations/helm/tests/create-statefulset-autoscaling/grafana-agent/templates/service.yaml +++ /dev/null @@ -1,23 +0,0 @@ ---- -# Source: grafana-agent/templates/service.yaml -apiVersion: v1 -kind: Service -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -spec: - type: ClusterIP - selector: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - internalTrafficPolicy: Cluster - ports: - - name: http-metrics - port: 80 - targetPort: 80 - protocol: "TCP" diff --git a/operations/helm/tests/create-statefulset-autoscaling/grafana-agent/templates/serviceaccount.yaml b/operations/helm/tests/create-statefulset-autoscaling/grafana-agent/templates/serviceaccount.yaml deleted file mode 100644 index 65d7e0df38..0000000000 --- a/operations/helm/tests/create-statefulset-autoscaling/grafana-agent/templates/serviceaccount.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -# Source: grafana-agent/templates/serviceaccount.yaml -apiVersion: v1 -kind: ServiceAccount -metadata: - name: grafana-agent - namespace: default - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm diff --git a/operations/helm/tests/create-statefulset/alloy/templates/configmap.yaml b/operations/helm/tests/create-statefulset/alloy/templates/configmap.yaml new file mode 100644 index 0000000000..c9ae77aa1e --- /dev/null +++ b/operations/helm/tests/create-statefulset/alloy/templates/configmap.yaml @@ -0,0 +1,42 @@ +--- +# Source: alloy/templates/configmap.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +data: + config.river: |- + logging { + level = "info" + format = "logfmt" + } + + discovery.kubernetes "pods" { + role = "pod" + } + + discovery.kubernetes "nodes" { + role = "node" + } + + discovery.kubernetes "services" { + role = "service" + } + + discovery.kubernetes "endpoints" { + role = "endpoints" + } + + discovery.kubernetes "endpointslices" { + role = "endpointslice" + } + + discovery.kubernetes "ingresses" { + role = "ingress" + } diff --git a/operations/helm/tests/create-statefulset/grafana-agent/templates/controllers/statefulset.yaml b/operations/helm/tests/create-statefulset/alloy/templates/controllers/statefulset.yaml similarity index 61% rename from operations/helm/tests/create-statefulset/grafana-agent/templates/controllers/statefulset.yaml rename to operations/helm/tests/create-statefulset/alloy/templates/controllers/statefulset.yaml index 8fd3dbde8d..9598e99438 100644 --- a/operations/helm/tests/create-statefulset/grafana-agent/templates/controllers/statefulset.yaml +++ b/operations/helm/tests/create-statefulset/alloy/templates/controllers/statefulset.yaml @@ -1,46 +1,44 @@ --- -# Source: grafana-agent/templates/controllers/statefulset.yaml +# Source: alloy/templates/controllers/statefulset.yaml apiVersion: apps/v1 kind: StatefulSet metadata: - name: grafana-agent + name: alloy labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy app.kubernetes.io/version: "vX.Y.Z" app.kubernetes.io/managed-by: Helm spec: replicas: 1 podManagementPolicy: Parallel minReadySeconds: 10 - serviceName: grafana-agent + serviceName: alloy selector: matchLabels: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy template: metadata: annotations: - kubectl.kubernetes.io/default-container: grafana-agent + kubectl.kubernetes.io/default-container: alloy labels: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy spec: - serviceAccountName: grafana-agent + serviceAccountName: alloy containers: - - name: grafana-agent - image: docker.io/grafana/agent:v0.40.2 + - name: alloy + image: docker.io/grafana/alloy:v1.0.0 imagePullPolicy: IfNotPresent args: - run - - /etc/agent/config.river - - --storage.path=/tmp/agent + - /etc/alloy/config.river + - --storage.path=/tmp/alloy - --server.http.listen-addr=0.0.0.0:80 - --server.http.ui-path-prefix=/ env: - - name: AGENT_MODE - value: flow - name: AGENT_DEPLOY_MODE value: "helm" - name: HOSTNAME @@ -59,15 +57,15 @@ spec: timeoutSeconds: 1 volumeMounts: - name: config - mountPath: /etc/agent + mountPath: /etc/alloy - name: config-reloader image: ghcr.io/jimmidyson/configmap-reload:v0.12.0 args: - - --volume-dir=/etc/agent + - --volume-dir=/etc/alloy - --webhook-url=http://localhost:80/-/reload volumeMounts: - name: config - mountPath: /etc/agent + mountPath: /etc/alloy resources: requests: cpu: 1m @@ -76,4 +74,4 @@ spec: volumes: - name: config configMap: - name: grafana-agent + name: alloy diff --git a/operations/helm/tests/create-statefulset/alloy/templates/rbac.yaml b/operations/helm/tests/create-statefulset/alloy/templates/rbac.yaml new file mode 100644 index 0000000000..53ca27544f --- /dev/null +++ b/operations/helm/tests/create-statefulset/alloy/templates/rbac.yaml @@ -0,0 +1,117 @@ +--- +# Source: alloy/templates/rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +rules: + # Rules which allow discovery.kubernetes to function. + - apiGroups: + - "" + - "discovery.k8s.io" + - "networking.k8s.io" + resources: + - endpoints + - endpointslices + - ingresses + - nodes + - nodes/proxy + - nodes/metrics + - pods + - services + verbs: + - get + - list + - watch + # Rules which allow loki.source.kubernetes and loki.source.podlogs to work. + - apiGroups: + - "" + resources: + - pods + - pods/log + - namespaces + verbs: + - get + - list + - watch + - apiGroups: + - "monitoring.grafana.com" + resources: + - podlogs + verbs: + - get + - list + - watch + # Rules which allow mimir.rules.kubernetes to work. + - apiGroups: ["monitoring.coreos.com"] + resources: + - prometheusrules + verbs: + - get + - list + - watch + - nonResourceURLs: + - /metrics + verbs: + - get + # Rules for prometheus.kubernetes.* + - apiGroups: ["monitoring.coreos.com"] + resources: + - podmonitors + - servicemonitors + - probes + verbs: + - get + - list + - watch + # Rules which allow eventhandler to work. + - apiGroups: + - "" + resources: + - events + verbs: + - get + - list + - watch + # needed for remote.kubernetes.* + - apiGroups: [""] + resources: + - "configmaps" + - "secrets" + verbs: + - get + - list + - watch + # needed for otelcol.processor.k8sattributes + - apiGroups: ["apps"] + resources: ["replicasets"] + verbs: ["get", "list", "watch"] + - apiGroups: ["extensions"] + resources: ["replicasets"] + verbs: ["get", "list", "watch"] +--- +# Source: alloy/templates/rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: alloy +subjects: + - kind: ServiceAccount + name: alloy + namespace: default diff --git a/operations/helm/tests/create-statefulset/alloy/templates/service.yaml b/operations/helm/tests/create-statefulset/alloy/templates/service.yaml new file mode 100644 index 0000000000..34c0608fd3 --- /dev/null +++ b/operations/helm/tests/create-statefulset/alloy/templates/service.yaml @@ -0,0 +1,23 @@ +--- +# Source: alloy/templates/service.yaml +apiVersion: v1 +kind: Service +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +spec: + type: ClusterIP + selector: + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + internalTrafficPolicy: Cluster + ports: + - name: http-metrics + port: 80 + targetPort: 80 + protocol: "TCP" diff --git a/operations/helm/tests/create-statefulset/alloy/templates/serviceaccount.yaml b/operations/helm/tests/create-statefulset/alloy/templates/serviceaccount.yaml new file mode 100644 index 0000000000..46df991efb --- /dev/null +++ b/operations/helm/tests/create-statefulset/alloy/templates/serviceaccount.yaml @@ -0,0 +1,13 @@ +--- +# Source: alloy/templates/serviceaccount.yaml +apiVersion: v1 +kind: ServiceAccount +metadata: + name: alloy + namespace: default + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm diff --git a/operations/helm/tests/create-statefulset/grafana-agent/templates/configmap.yaml b/operations/helm/tests/create-statefulset/grafana-agent/templates/configmap.yaml deleted file mode 100644 index 2fdc6f0117..0000000000 --- a/operations/helm/tests/create-statefulset/grafana-agent/templates/configmap.yaml +++ /dev/null @@ -1,42 +0,0 @@ ---- -# Source: grafana-agent/templates/configmap.yaml -apiVersion: v1 -kind: ConfigMap -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -data: - config.river: |- - logging { - level = "info" - format = "logfmt" - } - - discovery.kubernetes "pods" { - role = "pod" - } - - discovery.kubernetes "nodes" { - role = "node" - } - - discovery.kubernetes "services" { - role = "service" - } - - discovery.kubernetes "endpoints" { - role = "endpoints" - } - - discovery.kubernetes "endpointslices" { - role = "endpointslice" - } - - discovery.kubernetes "ingresses" { - role = "ingress" - } diff --git a/operations/helm/tests/create-statefulset/grafana-agent/templates/rbac.yaml b/operations/helm/tests/create-statefulset/grafana-agent/templates/rbac.yaml deleted file mode 100644 index 3765583fb6..0000000000 --- a/operations/helm/tests/create-statefulset/grafana-agent/templates/rbac.yaml +++ /dev/null @@ -1,117 +0,0 @@ ---- -# Source: grafana-agent/templates/rbac.yaml -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -rules: - # Rules which allow discovery.kubernetes to function. - - apiGroups: - - "" - - "discovery.k8s.io" - - "networking.k8s.io" - resources: - - endpoints - - endpointslices - - ingresses - - nodes - - nodes/proxy - - nodes/metrics - - pods - - services - verbs: - - get - - list - - watch - # Rules which allow loki.source.kubernetes and loki.source.podlogs to work. - - apiGroups: - - "" - resources: - - pods - - pods/log - - namespaces - verbs: - - get - - list - - watch - - apiGroups: - - "monitoring.grafana.com" - resources: - - podlogs - verbs: - - get - - list - - watch - # Rules which allow mimir.rules.kubernetes to work. - - apiGroups: ["monitoring.coreos.com"] - resources: - - prometheusrules - verbs: - - get - - list - - watch - - nonResourceURLs: - - /metrics - verbs: - - get - # Rules for prometheus.kubernetes.* - - apiGroups: ["monitoring.coreos.com"] - resources: - - podmonitors - - servicemonitors - - probes - verbs: - - get - - list - - watch - # Rules which allow eventhandler to work. - - apiGroups: - - "" - resources: - - events - verbs: - - get - - list - - watch - # needed for remote.kubernetes.* - - apiGroups: [""] - resources: - - "configmaps" - - "secrets" - verbs: - - get - - list - - watch - # needed for otelcol.processor.k8sattributes - - apiGroups: ["apps"] - resources: ["replicasets"] - verbs: ["get", "list", "watch"] - - apiGroups: ["extensions"] - resources: ["replicasets"] - verbs: ["get", "list", "watch"] ---- -# Source: grafana-agent/templates/rbac.yaml -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: grafana-agent -subjects: - - kind: ServiceAccount - name: grafana-agent - namespace: default diff --git a/operations/helm/tests/create-statefulset/grafana-agent/templates/service.yaml b/operations/helm/tests/create-statefulset/grafana-agent/templates/service.yaml deleted file mode 100644 index c98f79428b..0000000000 --- a/operations/helm/tests/create-statefulset/grafana-agent/templates/service.yaml +++ /dev/null @@ -1,23 +0,0 @@ ---- -# Source: grafana-agent/templates/service.yaml -apiVersion: v1 -kind: Service -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -spec: - type: ClusterIP - selector: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - internalTrafficPolicy: Cluster - ports: - - name: http-metrics - port: 80 - targetPort: 80 - protocol: "TCP" diff --git a/operations/helm/tests/create-statefulset/grafana-agent/templates/serviceaccount.yaml b/operations/helm/tests/create-statefulset/grafana-agent/templates/serviceaccount.yaml deleted file mode 100644 index 65d7e0df38..0000000000 --- a/operations/helm/tests/create-statefulset/grafana-agent/templates/serviceaccount.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -# Source: grafana-agent/templates/serviceaccount.yaml -apiVersion: v1 -kind: ServiceAccount -metadata: - name: grafana-agent - namespace: default - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm diff --git a/operations/helm/tests/custom-config/grafana-agent/templates/configmap.yaml b/operations/helm/tests/custom-config/alloy/templates/configmap.yaml similarity index 60% rename from operations/helm/tests/custom-config/grafana-agent/templates/configmap.yaml rename to operations/helm/tests/custom-config/alloy/templates/configmap.yaml index 1b7aeff62f..17d19ad116 100644 --- a/operations/helm/tests/custom-config/grafana-agent/templates/configmap.yaml +++ b/operations/helm/tests/custom-config/alloy/templates/configmap.yaml @@ -1,13 +1,13 @@ --- -# Source: grafana-agent/templates/configmap.yaml +# Source: alloy/templates/configmap.yaml apiVersion: v1 kind: ConfigMap metadata: - name: grafana-agent + name: alloy labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy app.kubernetes.io/version: "vX.Y.Z" app.kubernetes.io/managed-by: Helm data: diff --git a/operations/helm/tests/default-values/grafana-agent/templates/controllers/daemonset.yaml b/operations/helm/tests/custom-config/alloy/templates/controllers/daemonset.yaml similarity index 61% rename from operations/helm/tests/default-values/grafana-agent/templates/controllers/daemonset.yaml rename to operations/helm/tests/custom-config/alloy/templates/controllers/daemonset.yaml index 356c736349..ca587b7b9c 100644 --- a/operations/helm/tests/default-values/grafana-agent/templates/controllers/daemonset.yaml +++ b/operations/helm/tests/custom-config/alloy/templates/controllers/daemonset.yaml @@ -1,43 +1,41 @@ --- -# Source: grafana-agent/templates/controllers/daemonset.yaml +# Source: alloy/templates/controllers/daemonset.yaml apiVersion: apps/v1 kind: DaemonSet metadata: - name: grafana-agent + name: alloy labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy app.kubernetes.io/version: "vX.Y.Z" app.kubernetes.io/managed-by: Helm spec: minReadySeconds: 10 selector: matchLabels: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy template: metadata: annotations: - kubectl.kubernetes.io/default-container: grafana-agent + kubectl.kubernetes.io/default-container: alloy labels: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy spec: - serviceAccountName: grafana-agent + serviceAccountName: alloy containers: - - name: grafana-agent - image: docker.io/grafana/agent:v0.40.2 + - name: alloy + image: docker.io/grafana/alloy:v1.0.0 imagePullPolicy: IfNotPresent args: - run - - /etc/agent/config.river - - --storage.path=/tmp/agent + - /etc/alloy/config.river + - --storage.path=/tmp/alloy - --server.http.listen-addr=0.0.0.0:80 - --server.http.ui-path-prefix=/ env: - - name: AGENT_MODE - value: flow - name: AGENT_DEPLOY_MODE value: "helm" - name: HOSTNAME @@ -56,15 +54,15 @@ spec: timeoutSeconds: 1 volumeMounts: - name: config - mountPath: /etc/agent + mountPath: /etc/alloy - name: config-reloader image: ghcr.io/jimmidyson/configmap-reload:v0.12.0 args: - - --volume-dir=/etc/agent + - --volume-dir=/etc/alloy - --webhook-url=http://localhost:80/-/reload volumeMounts: - name: config - mountPath: /etc/agent + mountPath: /etc/alloy resources: requests: cpu: 1m @@ -73,4 +71,4 @@ spec: volumes: - name: config configMap: - name: grafana-agent + name: alloy diff --git a/operations/helm/tests/custom-config/alloy/templates/rbac.yaml b/operations/helm/tests/custom-config/alloy/templates/rbac.yaml new file mode 100644 index 0000000000..53ca27544f --- /dev/null +++ b/operations/helm/tests/custom-config/alloy/templates/rbac.yaml @@ -0,0 +1,117 @@ +--- +# Source: alloy/templates/rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +rules: + # Rules which allow discovery.kubernetes to function. + - apiGroups: + - "" + - "discovery.k8s.io" + - "networking.k8s.io" + resources: + - endpoints + - endpointslices + - ingresses + - nodes + - nodes/proxy + - nodes/metrics + - pods + - services + verbs: + - get + - list + - watch + # Rules which allow loki.source.kubernetes and loki.source.podlogs to work. + - apiGroups: + - "" + resources: + - pods + - pods/log + - namespaces + verbs: + - get + - list + - watch + - apiGroups: + - "monitoring.grafana.com" + resources: + - podlogs + verbs: + - get + - list + - watch + # Rules which allow mimir.rules.kubernetes to work. + - apiGroups: ["monitoring.coreos.com"] + resources: + - prometheusrules + verbs: + - get + - list + - watch + - nonResourceURLs: + - /metrics + verbs: + - get + # Rules for prometheus.kubernetes.* + - apiGroups: ["monitoring.coreos.com"] + resources: + - podmonitors + - servicemonitors + - probes + verbs: + - get + - list + - watch + # Rules which allow eventhandler to work. + - apiGroups: + - "" + resources: + - events + verbs: + - get + - list + - watch + # needed for remote.kubernetes.* + - apiGroups: [""] + resources: + - "configmaps" + - "secrets" + verbs: + - get + - list + - watch + # needed for otelcol.processor.k8sattributes + - apiGroups: ["apps"] + resources: ["replicasets"] + verbs: ["get", "list", "watch"] + - apiGroups: ["extensions"] + resources: ["replicasets"] + verbs: ["get", "list", "watch"] +--- +# Source: alloy/templates/rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: alloy +subjects: + - kind: ServiceAccount + name: alloy + namespace: default diff --git a/operations/helm/tests/custom-config/alloy/templates/service.yaml b/operations/helm/tests/custom-config/alloy/templates/service.yaml new file mode 100644 index 0000000000..34c0608fd3 --- /dev/null +++ b/operations/helm/tests/custom-config/alloy/templates/service.yaml @@ -0,0 +1,23 @@ +--- +# Source: alloy/templates/service.yaml +apiVersion: v1 +kind: Service +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +spec: + type: ClusterIP + selector: + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + internalTrafficPolicy: Cluster + ports: + - name: http-metrics + port: 80 + targetPort: 80 + protocol: "TCP" diff --git a/operations/helm/tests/custom-config/alloy/templates/serviceaccount.yaml b/operations/helm/tests/custom-config/alloy/templates/serviceaccount.yaml new file mode 100644 index 0000000000..46df991efb --- /dev/null +++ b/operations/helm/tests/custom-config/alloy/templates/serviceaccount.yaml @@ -0,0 +1,13 @@ +--- +# Source: alloy/templates/serviceaccount.yaml +apiVersion: v1 +kind: ServiceAccount +metadata: + name: alloy + namespace: default + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm diff --git a/operations/helm/tests/custom-config/grafana-agent/templates/rbac.yaml b/operations/helm/tests/custom-config/grafana-agent/templates/rbac.yaml deleted file mode 100644 index 3765583fb6..0000000000 --- a/operations/helm/tests/custom-config/grafana-agent/templates/rbac.yaml +++ /dev/null @@ -1,117 +0,0 @@ ---- -# Source: grafana-agent/templates/rbac.yaml -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -rules: - # Rules which allow discovery.kubernetes to function. - - apiGroups: - - "" - - "discovery.k8s.io" - - "networking.k8s.io" - resources: - - endpoints - - endpointslices - - ingresses - - nodes - - nodes/proxy - - nodes/metrics - - pods - - services - verbs: - - get - - list - - watch - # Rules which allow loki.source.kubernetes and loki.source.podlogs to work. - - apiGroups: - - "" - resources: - - pods - - pods/log - - namespaces - verbs: - - get - - list - - watch - - apiGroups: - - "monitoring.grafana.com" - resources: - - podlogs - verbs: - - get - - list - - watch - # Rules which allow mimir.rules.kubernetes to work. - - apiGroups: ["monitoring.coreos.com"] - resources: - - prometheusrules - verbs: - - get - - list - - watch - - nonResourceURLs: - - /metrics - verbs: - - get - # Rules for prometheus.kubernetes.* - - apiGroups: ["monitoring.coreos.com"] - resources: - - podmonitors - - servicemonitors - - probes - verbs: - - get - - list - - watch - # Rules which allow eventhandler to work. - - apiGroups: - - "" - resources: - - events - verbs: - - get - - list - - watch - # needed for remote.kubernetes.* - - apiGroups: [""] - resources: - - "configmaps" - - "secrets" - verbs: - - get - - list - - watch - # needed for otelcol.processor.k8sattributes - - apiGroups: ["apps"] - resources: ["replicasets"] - verbs: ["get", "list", "watch"] - - apiGroups: ["extensions"] - resources: ["replicasets"] - verbs: ["get", "list", "watch"] ---- -# Source: grafana-agent/templates/rbac.yaml -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: grafana-agent -subjects: - - kind: ServiceAccount - name: grafana-agent - namespace: default diff --git a/operations/helm/tests/custom-config/grafana-agent/templates/service.yaml b/operations/helm/tests/custom-config/grafana-agent/templates/service.yaml deleted file mode 100644 index c98f79428b..0000000000 --- a/operations/helm/tests/custom-config/grafana-agent/templates/service.yaml +++ /dev/null @@ -1,23 +0,0 @@ ---- -# Source: grafana-agent/templates/service.yaml -apiVersion: v1 -kind: Service -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -spec: - type: ClusterIP - selector: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - internalTrafficPolicy: Cluster - ports: - - name: http-metrics - port: 80 - targetPort: 80 - protocol: "TCP" diff --git a/operations/helm/tests/custom-config/grafana-agent/templates/serviceaccount.yaml b/operations/helm/tests/custom-config/grafana-agent/templates/serviceaccount.yaml deleted file mode 100644 index 65d7e0df38..0000000000 --- a/operations/helm/tests/custom-config/grafana-agent/templates/serviceaccount.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -# Source: grafana-agent/templates/serviceaccount.yaml -apiVersion: v1 -kind: ServiceAccount -metadata: - name: grafana-agent - namespace: default - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm diff --git a/operations/helm/tests/default-values/alloy/templates/configmap.yaml b/operations/helm/tests/default-values/alloy/templates/configmap.yaml new file mode 100644 index 0000000000..c9ae77aa1e --- /dev/null +++ b/operations/helm/tests/default-values/alloy/templates/configmap.yaml @@ -0,0 +1,42 @@ +--- +# Source: alloy/templates/configmap.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +data: + config.river: |- + logging { + level = "info" + format = "logfmt" + } + + discovery.kubernetes "pods" { + role = "pod" + } + + discovery.kubernetes "nodes" { + role = "node" + } + + discovery.kubernetes "services" { + role = "service" + } + + discovery.kubernetes "endpoints" { + role = "endpoints" + } + + discovery.kubernetes "endpointslices" { + role = "endpointslice" + } + + discovery.kubernetes "ingresses" { + role = "ingress" + } diff --git a/operations/helm/tests/create-daemonset/grafana-agent/templates/controllers/daemonset.yaml b/operations/helm/tests/default-values/alloy/templates/controllers/daemonset.yaml similarity index 61% rename from operations/helm/tests/create-daemonset/grafana-agent/templates/controllers/daemonset.yaml rename to operations/helm/tests/default-values/alloy/templates/controllers/daemonset.yaml index 356c736349..ca587b7b9c 100644 --- a/operations/helm/tests/create-daemonset/grafana-agent/templates/controllers/daemonset.yaml +++ b/operations/helm/tests/default-values/alloy/templates/controllers/daemonset.yaml @@ -1,43 +1,41 @@ --- -# Source: grafana-agent/templates/controllers/daemonset.yaml +# Source: alloy/templates/controllers/daemonset.yaml apiVersion: apps/v1 kind: DaemonSet metadata: - name: grafana-agent + name: alloy labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy app.kubernetes.io/version: "vX.Y.Z" app.kubernetes.io/managed-by: Helm spec: minReadySeconds: 10 selector: matchLabels: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy template: metadata: annotations: - kubectl.kubernetes.io/default-container: grafana-agent + kubectl.kubernetes.io/default-container: alloy labels: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy spec: - serviceAccountName: grafana-agent + serviceAccountName: alloy containers: - - name: grafana-agent - image: docker.io/grafana/agent:v0.40.2 + - name: alloy + image: docker.io/grafana/alloy:v1.0.0 imagePullPolicy: IfNotPresent args: - run - - /etc/agent/config.river - - --storage.path=/tmp/agent + - /etc/alloy/config.river + - --storage.path=/tmp/alloy - --server.http.listen-addr=0.0.0.0:80 - --server.http.ui-path-prefix=/ env: - - name: AGENT_MODE - value: flow - name: AGENT_DEPLOY_MODE value: "helm" - name: HOSTNAME @@ -56,15 +54,15 @@ spec: timeoutSeconds: 1 volumeMounts: - name: config - mountPath: /etc/agent + mountPath: /etc/alloy - name: config-reloader image: ghcr.io/jimmidyson/configmap-reload:v0.12.0 args: - - --volume-dir=/etc/agent + - --volume-dir=/etc/alloy - --webhook-url=http://localhost:80/-/reload volumeMounts: - name: config - mountPath: /etc/agent + mountPath: /etc/alloy resources: requests: cpu: 1m @@ -73,4 +71,4 @@ spec: volumes: - name: config configMap: - name: grafana-agent + name: alloy diff --git a/operations/helm/tests/default-values/alloy/templates/rbac.yaml b/operations/helm/tests/default-values/alloy/templates/rbac.yaml new file mode 100644 index 0000000000..53ca27544f --- /dev/null +++ b/operations/helm/tests/default-values/alloy/templates/rbac.yaml @@ -0,0 +1,117 @@ +--- +# Source: alloy/templates/rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +rules: + # Rules which allow discovery.kubernetes to function. + - apiGroups: + - "" + - "discovery.k8s.io" + - "networking.k8s.io" + resources: + - endpoints + - endpointslices + - ingresses + - nodes + - nodes/proxy + - nodes/metrics + - pods + - services + verbs: + - get + - list + - watch + # Rules which allow loki.source.kubernetes and loki.source.podlogs to work. + - apiGroups: + - "" + resources: + - pods + - pods/log + - namespaces + verbs: + - get + - list + - watch + - apiGroups: + - "monitoring.grafana.com" + resources: + - podlogs + verbs: + - get + - list + - watch + # Rules which allow mimir.rules.kubernetes to work. + - apiGroups: ["monitoring.coreos.com"] + resources: + - prometheusrules + verbs: + - get + - list + - watch + - nonResourceURLs: + - /metrics + verbs: + - get + # Rules for prometheus.kubernetes.* + - apiGroups: ["monitoring.coreos.com"] + resources: + - podmonitors + - servicemonitors + - probes + verbs: + - get + - list + - watch + # Rules which allow eventhandler to work. + - apiGroups: + - "" + resources: + - events + verbs: + - get + - list + - watch + # needed for remote.kubernetes.* + - apiGroups: [""] + resources: + - "configmaps" + - "secrets" + verbs: + - get + - list + - watch + # needed for otelcol.processor.k8sattributes + - apiGroups: ["apps"] + resources: ["replicasets"] + verbs: ["get", "list", "watch"] + - apiGroups: ["extensions"] + resources: ["replicasets"] + verbs: ["get", "list", "watch"] +--- +# Source: alloy/templates/rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: alloy +subjects: + - kind: ServiceAccount + name: alloy + namespace: default diff --git a/operations/helm/tests/default-values/alloy/templates/service.yaml b/operations/helm/tests/default-values/alloy/templates/service.yaml new file mode 100644 index 0000000000..34c0608fd3 --- /dev/null +++ b/operations/helm/tests/default-values/alloy/templates/service.yaml @@ -0,0 +1,23 @@ +--- +# Source: alloy/templates/service.yaml +apiVersion: v1 +kind: Service +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +spec: + type: ClusterIP + selector: + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + internalTrafficPolicy: Cluster + ports: + - name: http-metrics + port: 80 + targetPort: 80 + protocol: "TCP" diff --git a/operations/helm/tests/default-values/alloy/templates/serviceaccount.yaml b/operations/helm/tests/default-values/alloy/templates/serviceaccount.yaml new file mode 100644 index 0000000000..46df991efb --- /dev/null +++ b/operations/helm/tests/default-values/alloy/templates/serviceaccount.yaml @@ -0,0 +1,13 @@ +--- +# Source: alloy/templates/serviceaccount.yaml +apiVersion: v1 +kind: ServiceAccount +metadata: + name: alloy + namespace: default + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm diff --git a/operations/helm/tests/default-values/grafana-agent/templates/configmap.yaml b/operations/helm/tests/default-values/grafana-agent/templates/configmap.yaml deleted file mode 100644 index 2fdc6f0117..0000000000 --- a/operations/helm/tests/default-values/grafana-agent/templates/configmap.yaml +++ /dev/null @@ -1,42 +0,0 @@ ---- -# Source: grafana-agent/templates/configmap.yaml -apiVersion: v1 -kind: ConfigMap -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -data: - config.river: |- - logging { - level = "info" - format = "logfmt" - } - - discovery.kubernetes "pods" { - role = "pod" - } - - discovery.kubernetes "nodes" { - role = "node" - } - - discovery.kubernetes "services" { - role = "service" - } - - discovery.kubernetes "endpoints" { - role = "endpoints" - } - - discovery.kubernetes "endpointslices" { - role = "endpointslice" - } - - discovery.kubernetes "ingresses" { - role = "ingress" - } diff --git a/operations/helm/tests/default-values/grafana-agent/templates/rbac.yaml b/operations/helm/tests/default-values/grafana-agent/templates/rbac.yaml deleted file mode 100644 index 3765583fb6..0000000000 --- a/operations/helm/tests/default-values/grafana-agent/templates/rbac.yaml +++ /dev/null @@ -1,117 +0,0 @@ ---- -# Source: grafana-agent/templates/rbac.yaml -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -rules: - # Rules which allow discovery.kubernetes to function. - - apiGroups: - - "" - - "discovery.k8s.io" - - "networking.k8s.io" - resources: - - endpoints - - endpointslices - - ingresses - - nodes - - nodes/proxy - - nodes/metrics - - pods - - services - verbs: - - get - - list - - watch - # Rules which allow loki.source.kubernetes and loki.source.podlogs to work. - - apiGroups: - - "" - resources: - - pods - - pods/log - - namespaces - verbs: - - get - - list - - watch - - apiGroups: - - "monitoring.grafana.com" - resources: - - podlogs - verbs: - - get - - list - - watch - # Rules which allow mimir.rules.kubernetes to work. - - apiGroups: ["monitoring.coreos.com"] - resources: - - prometheusrules - verbs: - - get - - list - - watch - - nonResourceURLs: - - /metrics - verbs: - - get - # Rules for prometheus.kubernetes.* - - apiGroups: ["monitoring.coreos.com"] - resources: - - podmonitors - - servicemonitors - - probes - verbs: - - get - - list - - watch - # Rules which allow eventhandler to work. - - apiGroups: - - "" - resources: - - events - verbs: - - get - - list - - watch - # needed for remote.kubernetes.* - - apiGroups: [""] - resources: - - "configmaps" - - "secrets" - verbs: - - get - - list - - watch - # needed for otelcol.processor.k8sattributes - - apiGroups: ["apps"] - resources: ["replicasets"] - verbs: ["get", "list", "watch"] - - apiGroups: ["extensions"] - resources: ["replicasets"] - verbs: ["get", "list", "watch"] ---- -# Source: grafana-agent/templates/rbac.yaml -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: grafana-agent -subjects: - - kind: ServiceAccount - name: grafana-agent - namespace: default diff --git a/operations/helm/tests/default-values/grafana-agent/templates/service.yaml b/operations/helm/tests/default-values/grafana-agent/templates/service.yaml deleted file mode 100644 index c98f79428b..0000000000 --- a/operations/helm/tests/default-values/grafana-agent/templates/service.yaml +++ /dev/null @@ -1,23 +0,0 @@ ---- -# Source: grafana-agent/templates/service.yaml -apiVersion: v1 -kind: Service -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -spec: - type: ClusterIP - selector: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - internalTrafficPolicy: Cluster - ports: - - name: http-metrics - port: 80 - targetPort: 80 - protocol: "TCP" diff --git a/operations/helm/tests/default-values/grafana-agent/templates/serviceaccount.yaml b/operations/helm/tests/default-values/grafana-agent/templates/serviceaccount.yaml deleted file mode 100644 index 65d7e0df38..0000000000 --- a/operations/helm/tests/default-values/grafana-agent/templates/serviceaccount.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -# Source: grafana-agent/templates/serviceaccount.yaml -apiVersion: v1 -kind: ServiceAccount -metadata: - name: grafana-agent - namespace: default - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm diff --git a/operations/helm/tests/enable-servicemonitor-tls/alloy/templates/configmap.yaml b/operations/helm/tests/enable-servicemonitor-tls/alloy/templates/configmap.yaml new file mode 100644 index 0000000000..c9ae77aa1e --- /dev/null +++ b/operations/helm/tests/enable-servicemonitor-tls/alloy/templates/configmap.yaml @@ -0,0 +1,42 @@ +--- +# Source: alloy/templates/configmap.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +data: + config.river: |- + logging { + level = "info" + format = "logfmt" + } + + discovery.kubernetes "pods" { + role = "pod" + } + + discovery.kubernetes "nodes" { + role = "node" + } + + discovery.kubernetes "services" { + role = "service" + } + + discovery.kubernetes "endpoints" { + role = "endpoints" + } + + discovery.kubernetes "endpointslices" { + role = "endpointslice" + } + + discovery.kubernetes "ingresses" { + role = "ingress" + } diff --git a/operations/helm/tests/enable-servicemonitor-tls/grafana-agent/templates/controllers/daemonset.yaml b/operations/helm/tests/enable-servicemonitor-tls/alloy/templates/controllers/daemonset.yaml similarity index 61% rename from operations/helm/tests/enable-servicemonitor-tls/grafana-agent/templates/controllers/daemonset.yaml rename to operations/helm/tests/enable-servicemonitor-tls/alloy/templates/controllers/daemonset.yaml index 4eb807a30b..8d60204d1d 100644 --- a/operations/helm/tests/enable-servicemonitor-tls/grafana-agent/templates/controllers/daemonset.yaml +++ b/operations/helm/tests/enable-servicemonitor-tls/alloy/templates/controllers/daemonset.yaml @@ -1,43 +1,41 @@ --- -# Source: grafana-agent/templates/controllers/daemonset.yaml +# Source: alloy/templates/controllers/daemonset.yaml apiVersion: apps/v1 kind: DaemonSet metadata: - name: grafana-agent + name: alloy labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy app.kubernetes.io/version: "vX.Y.Z" app.kubernetes.io/managed-by: Helm spec: minReadySeconds: 10 selector: matchLabels: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy template: metadata: annotations: - kubectl.kubernetes.io/default-container: grafana-agent + kubectl.kubernetes.io/default-container: alloy labels: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy spec: - serviceAccountName: grafana-agent + serviceAccountName: alloy containers: - - name: grafana-agent - image: docker.io/grafana/agent:v0.40.2 + - name: alloy + image: docker.io/grafana/alloy:v1.0.0 imagePullPolicy: IfNotPresent args: - run - - /etc/agent/config.river - - --storage.path=/tmp/agent + - /etc/alloy/config.river + - --storage.path=/tmp/alloy - --server.http.listen-addr=0.0.0.0:80 - --server.http.ui-path-prefix=/ env: - - name: AGENT_MODE - value: flow - name: AGENT_DEPLOY_MODE value: "helm" - name: HOSTNAME @@ -56,15 +54,15 @@ spec: timeoutSeconds: 1 volumeMounts: - name: config - mountPath: /etc/agent + mountPath: /etc/alloy - name: config-reloader image: ghcr.io/jimmidyson/configmap-reload:v0.12.0 args: - - --volume-dir=/etc/agent + - --volume-dir=/etc/alloy - --webhook-url=http://localhost:80/-/reload volumeMounts: - name: config - mountPath: /etc/agent + mountPath: /etc/alloy resources: requests: cpu: 1m @@ -73,4 +71,4 @@ spec: volumes: - name: config configMap: - name: grafana-agent + name: alloy diff --git a/operations/helm/tests/enable-servicemonitor-tls/alloy/templates/rbac.yaml b/operations/helm/tests/enable-servicemonitor-tls/alloy/templates/rbac.yaml new file mode 100644 index 0000000000..53ca27544f --- /dev/null +++ b/operations/helm/tests/enable-servicemonitor-tls/alloy/templates/rbac.yaml @@ -0,0 +1,117 @@ +--- +# Source: alloy/templates/rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +rules: + # Rules which allow discovery.kubernetes to function. + - apiGroups: + - "" + - "discovery.k8s.io" + - "networking.k8s.io" + resources: + - endpoints + - endpointslices + - ingresses + - nodes + - nodes/proxy + - nodes/metrics + - pods + - services + verbs: + - get + - list + - watch + # Rules which allow loki.source.kubernetes and loki.source.podlogs to work. + - apiGroups: + - "" + resources: + - pods + - pods/log + - namespaces + verbs: + - get + - list + - watch + - apiGroups: + - "monitoring.grafana.com" + resources: + - podlogs + verbs: + - get + - list + - watch + # Rules which allow mimir.rules.kubernetes to work. + - apiGroups: ["monitoring.coreos.com"] + resources: + - prometheusrules + verbs: + - get + - list + - watch + - nonResourceURLs: + - /metrics + verbs: + - get + # Rules for prometheus.kubernetes.* + - apiGroups: ["monitoring.coreos.com"] + resources: + - podmonitors + - servicemonitors + - probes + verbs: + - get + - list + - watch + # Rules which allow eventhandler to work. + - apiGroups: + - "" + resources: + - events + verbs: + - get + - list + - watch + # needed for remote.kubernetes.* + - apiGroups: [""] + resources: + - "configmaps" + - "secrets" + verbs: + - get + - list + - watch + # needed for otelcol.processor.k8sattributes + - apiGroups: ["apps"] + resources: ["replicasets"] + verbs: ["get", "list", "watch"] + - apiGroups: ["extensions"] + resources: ["replicasets"] + verbs: ["get", "list", "watch"] +--- +# Source: alloy/templates/rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: alloy +subjects: + - kind: ServiceAccount + name: alloy + namespace: default diff --git a/operations/helm/tests/enable-servicemonitor-tls/alloy/templates/service.yaml b/operations/helm/tests/enable-servicemonitor-tls/alloy/templates/service.yaml new file mode 100644 index 0000000000..34c0608fd3 --- /dev/null +++ b/operations/helm/tests/enable-servicemonitor-tls/alloy/templates/service.yaml @@ -0,0 +1,23 @@ +--- +# Source: alloy/templates/service.yaml +apiVersion: v1 +kind: Service +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +spec: + type: ClusterIP + selector: + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + internalTrafficPolicy: Cluster + ports: + - name: http-metrics + port: 80 + targetPort: 80 + protocol: "TCP" diff --git a/operations/helm/tests/enable-servicemonitor-tls/alloy/templates/serviceaccount.yaml b/operations/helm/tests/enable-servicemonitor-tls/alloy/templates/serviceaccount.yaml new file mode 100644 index 0000000000..46df991efb --- /dev/null +++ b/operations/helm/tests/enable-servicemonitor-tls/alloy/templates/serviceaccount.yaml @@ -0,0 +1,13 @@ +--- +# Source: alloy/templates/serviceaccount.yaml +apiVersion: v1 +kind: ServiceAccount +metadata: + name: alloy + namespace: default + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm diff --git a/operations/helm/tests/enable-servicemonitor-tls/grafana-agent/templates/servicemonitor.yaml b/operations/helm/tests/enable-servicemonitor-tls/alloy/templates/servicemonitor.yaml similarity index 52% rename from operations/helm/tests/enable-servicemonitor-tls/grafana-agent/templates/servicemonitor.yaml rename to operations/helm/tests/enable-servicemonitor-tls/alloy/templates/servicemonitor.yaml index 3312cb651c..ac88625439 100644 --- a/operations/helm/tests/enable-servicemonitor-tls/grafana-agent/templates/servicemonitor.yaml +++ b/operations/helm/tests/enable-servicemonitor-tls/alloy/templates/servicemonitor.yaml @@ -1,13 +1,13 @@ --- -# Source: grafana-agent/templates/servicemonitor.yaml +# Source: alloy/templates/servicemonitor.yaml apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: - name: grafana-agent + name: alloy labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy app.kubernetes.io/version: "vX.Y.Z" app.kubernetes.io/managed-by: Helm spec: @@ -19,5 +19,5 @@ spec: insecureSkipVerify: true selector: matchLabels: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy diff --git a/operations/helm/tests/enable-servicemonitor-tls/grafana-agent/templates/configmap.yaml b/operations/helm/tests/enable-servicemonitor-tls/grafana-agent/templates/configmap.yaml deleted file mode 100644 index 2fdc6f0117..0000000000 --- a/operations/helm/tests/enable-servicemonitor-tls/grafana-agent/templates/configmap.yaml +++ /dev/null @@ -1,42 +0,0 @@ ---- -# Source: grafana-agent/templates/configmap.yaml -apiVersion: v1 -kind: ConfigMap -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -data: - config.river: |- - logging { - level = "info" - format = "logfmt" - } - - discovery.kubernetes "pods" { - role = "pod" - } - - discovery.kubernetes "nodes" { - role = "node" - } - - discovery.kubernetes "services" { - role = "service" - } - - discovery.kubernetes "endpoints" { - role = "endpoints" - } - - discovery.kubernetes "endpointslices" { - role = "endpointslice" - } - - discovery.kubernetes "ingresses" { - role = "ingress" - } diff --git a/operations/helm/tests/enable-servicemonitor-tls/grafana-agent/templates/rbac.yaml b/operations/helm/tests/enable-servicemonitor-tls/grafana-agent/templates/rbac.yaml deleted file mode 100644 index 3765583fb6..0000000000 --- a/operations/helm/tests/enable-servicemonitor-tls/grafana-agent/templates/rbac.yaml +++ /dev/null @@ -1,117 +0,0 @@ ---- -# Source: grafana-agent/templates/rbac.yaml -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -rules: - # Rules which allow discovery.kubernetes to function. - - apiGroups: - - "" - - "discovery.k8s.io" - - "networking.k8s.io" - resources: - - endpoints - - endpointslices - - ingresses - - nodes - - nodes/proxy - - nodes/metrics - - pods - - services - verbs: - - get - - list - - watch - # Rules which allow loki.source.kubernetes and loki.source.podlogs to work. - - apiGroups: - - "" - resources: - - pods - - pods/log - - namespaces - verbs: - - get - - list - - watch - - apiGroups: - - "monitoring.grafana.com" - resources: - - podlogs - verbs: - - get - - list - - watch - # Rules which allow mimir.rules.kubernetes to work. - - apiGroups: ["monitoring.coreos.com"] - resources: - - prometheusrules - verbs: - - get - - list - - watch - - nonResourceURLs: - - /metrics - verbs: - - get - # Rules for prometheus.kubernetes.* - - apiGroups: ["monitoring.coreos.com"] - resources: - - podmonitors - - servicemonitors - - probes - verbs: - - get - - list - - watch - # Rules which allow eventhandler to work. - - apiGroups: - - "" - resources: - - events - verbs: - - get - - list - - watch - # needed for remote.kubernetes.* - - apiGroups: [""] - resources: - - "configmaps" - - "secrets" - verbs: - - get - - list - - watch - # needed for otelcol.processor.k8sattributes - - apiGroups: ["apps"] - resources: ["replicasets"] - verbs: ["get", "list", "watch"] - - apiGroups: ["extensions"] - resources: ["replicasets"] - verbs: ["get", "list", "watch"] ---- -# Source: grafana-agent/templates/rbac.yaml -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: grafana-agent -subjects: - - kind: ServiceAccount - name: grafana-agent - namespace: default diff --git a/operations/helm/tests/enable-servicemonitor-tls/grafana-agent/templates/service.yaml b/operations/helm/tests/enable-servicemonitor-tls/grafana-agent/templates/service.yaml deleted file mode 100644 index c98f79428b..0000000000 --- a/operations/helm/tests/enable-servicemonitor-tls/grafana-agent/templates/service.yaml +++ /dev/null @@ -1,23 +0,0 @@ ---- -# Source: grafana-agent/templates/service.yaml -apiVersion: v1 -kind: Service -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -spec: - type: ClusterIP - selector: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - internalTrafficPolicy: Cluster - ports: - - name: http-metrics - port: 80 - targetPort: 80 - protocol: "TCP" diff --git a/operations/helm/tests/enable-servicemonitor-tls/grafana-agent/templates/serviceaccount.yaml b/operations/helm/tests/enable-servicemonitor-tls/grafana-agent/templates/serviceaccount.yaml deleted file mode 100644 index 65d7e0df38..0000000000 --- a/operations/helm/tests/enable-servicemonitor-tls/grafana-agent/templates/serviceaccount.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -# Source: grafana-agent/templates/serviceaccount.yaml -apiVersion: v1 -kind: ServiceAccount -metadata: - name: grafana-agent - namespace: default - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm diff --git a/operations/helm/tests/enable-servicemonitor/alloy/templates/configmap.yaml b/operations/helm/tests/enable-servicemonitor/alloy/templates/configmap.yaml new file mode 100644 index 0000000000..c9ae77aa1e --- /dev/null +++ b/operations/helm/tests/enable-servicemonitor/alloy/templates/configmap.yaml @@ -0,0 +1,42 @@ +--- +# Source: alloy/templates/configmap.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +data: + config.river: |- + logging { + level = "info" + format = "logfmt" + } + + discovery.kubernetes "pods" { + role = "pod" + } + + discovery.kubernetes "nodes" { + role = "node" + } + + discovery.kubernetes "services" { + role = "service" + } + + discovery.kubernetes "endpoints" { + role = "endpoints" + } + + discovery.kubernetes "endpointslices" { + role = "endpointslice" + } + + discovery.kubernetes "ingresses" { + role = "ingress" + } diff --git a/operations/helm/tests/enable-servicemonitor/alloy/templates/controllers/daemonset.yaml b/operations/helm/tests/enable-servicemonitor/alloy/templates/controllers/daemonset.yaml new file mode 100644 index 0000000000..ca587b7b9c --- /dev/null +++ b/operations/helm/tests/enable-servicemonitor/alloy/templates/controllers/daemonset.yaml @@ -0,0 +1,74 @@ +--- +# Source: alloy/templates/controllers/daemonset.yaml +apiVersion: apps/v1 +kind: DaemonSet +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +spec: + minReadySeconds: 10 + selector: + matchLabels: + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + template: + metadata: + annotations: + kubectl.kubernetes.io/default-container: alloy + labels: + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + spec: + serviceAccountName: alloy + containers: + - name: alloy + image: docker.io/grafana/alloy:v1.0.0 + imagePullPolicy: IfNotPresent + args: + - run + - /etc/alloy/config.river + - --storage.path=/tmp/alloy + - --server.http.listen-addr=0.0.0.0:80 + - --server.http.ui-path-prefix=/ + env: + - name: AGENT_DEPLOY_MODE + value: "helm" + - name: HOSTNAME + valueFrom: + fieldRef: + fieldPath: spec.nodeName + ports: + - containerPort: 80 + name: http-metrics + readinessProbe: + httpGet: + path: /-/ready + port: 80 + scheme: HTTP + initialDelaySeconds: 10 + timeoutSeconds: 1 + volumeMounts: + - name: config + mountPath: /etc/alloy + - name: config-reloader + image: ghcr.io/jimmidyson/configmap-reload:v0.12.0 + args: + - --volume-dir=/etc/alloy + - --webhook-url=http://localhost:80/-/reload + volumeMounts: + - name: config + mountPath: /etc/alloy + resources: + requests: + cpu: 1m + memory: 5Mi + dnsPolicy: ClusterFirst + volumes: + - name: config + configMap: + name: alloy diff --git a/operations/helm/tests/enable-servicemonitor/alloy/templates/rbac.yaml b/operations/helm/tests/enable-servicemonitor/alloy/templates/rbac.yaml new file mode 100644 index 0000000000..53ca27544f --- /dev/null +++ b/operations/helm/tests/enable-servicemonitor/alloy/templates/rbac.yaml @@ -0,0 +1,117 @@ +--- +# Source: alloy/templates/rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +rules: + # Rules which allow discovery.kubernetes to function. + - apiGroups: + - "" + - "discovery.k8s.io" + - "networking.k8s.io" + resources: + - endpoints + - endpointslices + - ingresses + - nodes + - nodes/proxy + - nodes/metrics + - pods + - services + verbs: + - get + - list + - watch + # Rules which allow loki.source.kubernetes and loki.source.podlogs to work. + - apiGroups: + - "" + resources: + - pods + - pods/log + - namespaces + verbs: + - get + - list + - watch + - apiGroups: + - "monitoring.grafana.com" + resources: + - podlogs + verbs: + - get + - list + - watch + # Rules which allow mimir.rules.kubernetes to work. + - apiGroups: ["monitoring.coreos.com"] + resources: + - prometheusrules + verbs: + - get + - list + - watch + - nonResourceURLs: + - /metrics + verbs: + - get + # Rules for prometheus.kubernetes.* + - apiGroups: ["monitoring.coreos.com"] + resources: + - podmonitors + - servicemonitors + - probes + verbs: + - get + - list + - watch + # Rules which allow eventhandler to work. + - apiGroups: + - "" + resources: + - events + verbs: + - get + - list + - watch + # needed for remote.kubernetes.* + - apiGroups: [""] + resources: + - "configmaps" + - "secrets" + verbs: + - get + - list + - watch + # needed for otelcol.processor.k8sattributes + - apiGroups: ["apps"] + resources: ["replicasets"] + verbs: ["get", "list", "watch"] + - apiGroups: ["extensions"] + resources: ["replicasets"] + verbs: ["get", "list", "watch"] +--- +# Source: alloy/templates/rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: alloy +subjects: + - kind: ServiceAccount + name: alloy + namespace: default diff --git a/operations/helm/tests/enable-servicemonitor/alloy/templates/service.yaml b/operations/helm/tests/enable-servicemonitor/alloy/templates/service.yaml new file mode 100644 index 0000000000..34c0608fd3 --- /dev/null +++ b/operations/helm/tests/enable-servicemonitor/alloy/templates/service.yaml @@ -0,0 +1,23 @@ +--- +# Source: alloy/templates/service.yaml +apiVersion: v1 +kind: Service +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +spec: + type: ClusterIP + selector: + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + internalTrafficPolicy: Cluster + ports: + - name: http-metrics + port: 80 + targetPort: 80 + protocol: "TCP" diff --git a/operations/helm/tests/enable-servicemonitor/alloy/templates/serviceaccount.yaml b/operations/helm/tests/enable-servicemonitor/alloy/templates/serviceaccount.yaml new file mode 100644 index 0000000000..46df991efb --- /dev/null +++ b/operations/helm/tests/enable-servicemonitor/alloy/templates/serviceaccount.yaml @@ -0,0 +1,13 @@ +--- +# Source: alloy/templates/serviceaccount.yaml +apiVersion: v1 +kind: ServiceAccount +metadata: + name: alloy + namespace: default + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm diff --git a/operations/helm/tests/enable-servicemonitor/alloy/templates/servicemonitor.yaml b/operations/helm/tests/enable-servicemonitor/alloy/templates/servicemonitor.yaml new file mode 100644 index 0000000000..0437bb1ef1 --- /dev/null +++ b/operations/helm/tests/enable-servicemonitor/alloy/templates/servicemonitor.yaml @@ -0,0 +1,21 @@ +--- +# Source: alloy/templates/servicemonitor.yaml +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +spec: + endpoints: + - port: http-metrics + scheme: http + honorLabels: true + selector: + matchLabels: + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy diff --git a/operations/helm/tests/enable-servicemonitor/grafana-agent/templates/configmap.yaml b/operations/helm/tests/enable-servicemonitor/grafana-agent/templates/configmap.yaml deleted file mode 100644 index 2fdc6f0117..0000000000 --- a/operations/helm/tests/enable-servicemonitor/grafana-agent/templates/configmap.yaml +++ /dev/null @@ -1,42 +0,0 @@ ---- -# Source: grafana-agent/templates/configmap.yaml -apiVersion: v1 -kind: ConfigMap -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -data: - config.river: |- - logging { - level = "info" - format = "logfmt" - } - - discovery.kubernetes "pods" { - role = "pod" - } - - discovery.kubernetes "nodes" { - role = "node" - } - - discovery.kubernetes "services" { - role = "service" - } - - discovery.kubernetes "endpoints" { - role = "endpoints" - } - - discovery.kubernetes "endpointslices" { - role = "endpointslice" - } - - discovery.kubernetes "ingresses" { - role = "ingress" - } diff --git a/operations/helm/tests/enable-servicemonitor/grafana-agent/templates/controllers/daemonset.yaml b/operations/helm/tests/enable-servicemonitor/grafana-agent/templates/controllers/daemonset.yaml deleted file mode 100644 index 356c736349..0000000000 --- a/operations/helm/tests/enable-servicemonitor/grafana-agent/templates/controllers/daemonset.yaml +++ /dev/null @@ -1,76 +0,0 @@ ---- -# Source: grafana-agent/templates/controllers/daemonset.yaml -apiVersion: apps/v1 -kind: DaemonSet -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -spec: - minReadySeconds: 10 - selector: - matchLabels: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - template: - metadata: - annotations: - kubectl.kubernetes.io/default-container: grafana-agent - labels: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - spec: - serviceAccountName: grafana-agent - containers: - - name: grafana-agent - image: docker.io/grafana/agent:v0.40.2 - imagePullPolicy: IfNotPresent - args: - - run - - /etc/agent/config.river - - --storage.path=/tmp/agent - - --server.http.listen-addr=0.0.0.0:80 - - --server.http.ui-path-prefix=/ - env: - - name: AGENT_MODE - value: flow - - name: AGENT_DEPLOY_MODE - value: "helm" - - name: HOSTNAME - valueFrom: - fieldRef: - fieldPath: spec.nodeName - ports: - - containerPort: 80 - name: http-metrics - readinessProbe: - httpGet: - path: /-/ready - port: 80 - scheme: HTTP - initialDelaySeconds: 10 - timeoutSeconds: 1 - volumeMounts: - - name: config - mountPath: /etc/agent - - name: config-reloader - image: ghcr.io/jimmidyson/configmap-reload:v0.12.0 - args: - - --volume-dir=/etc/agent - - --webhook-url=http://localhost:80/-/reload - volumeMounts: - - name: config - mountPath: /etc/agent - resources: - requests: - cpu: 1m - memory: 5Mi - dnsPolicy: ClusterFirst - volumes: - - name: config - configMap: - name: grafana-agent diff --git a/operations/helm/tests/enable-servicemonitor/grafana-agent/templates/rbac.yaml b/operations/helm/tests/enable-servicemonitor/grafana-agent/templates/rbac.yaml deleted file mode 100644 index 3765583fb6..0000000000 --- a/operations/helm/tests/enable-servicemonitor/grafana-agent/templates/rbac.yaml +++ /dev/null @@ -1,117 +0,0 @@ ---- -# Source: grafana-agent/templates/rbac.yaml -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -rules: - # Rules which allow discovery.kubernetes to function. - - apiGroups: - - "" - - "discovery.k8s.io" - - "networking.k8s.io" - resources: - - endpoints - - endpointslices - - ingresses - - nodes - - nodes/proxy - - nodes/metrics - - pods - - services - verbs: - - get - - list - - watch - # Rules which allow loki.source.kubernetes and loki.source.podlogs to work. - - apiGroups: - - "" - resources: - - pods - - pods/log - - namespaces - verbs: - - get - - list - - watch - - apiGroups: - - "monitoring.grafana.com" - resources: - - podlogs - verbs: - - get - - list - - watch - # Rules which allow mimir.rules.kubernetes to work. - - apiGroups: ["monitoring.coreos.com"] - resources: - - prometheusrules - verbs: - - get - - list - - watch - - nonResourceURLs: - - /metrics - verbs: - - get - # Rules for prometheus.kubernetes.* - - apiGroups: ["monitoring.coreos.com"] - resources: - - podmonitors - - servicemonitors - - probes - verbs: - - get - - list - - watch - # Rules which allow eventhandler to work. - - apiGroups: - - "" - resources: - - events - verbs: - - get - - list - - watch - # needed for remote.kubernetes.* - - apiGroups: [""] - resources: - - "configmaps" - - "secrets" - verbs: - - get - - list - - watch - # needed for otelcol.processor.k8sattributes - - apiGroups: ["apps"] - resources: ["replicasets"] - verbs: ["get", "list", "watch"] - - apiGroups: ["extensions"] - resources: ["replicasets"] - verbs: ["get", "list", "watch"] ---- -# Source: grafana-agent/templates/rbac.yaml -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: grafana-agent -subjects: - - kind: ServiceAccount - name: grafana-agent - namespace: default diff --git a/operations/helm/tests/enable-servicemonitor/grafana-agent/templates/service.yaml b/operations/helm/tests/enable-servicemonitor/grafana-agent/templates/service.yaml deleted file mode 100644 index c98f79428b..0000000000 --- a/operations/helm/tests/enable-servicemonitor/grafana-agent/templates/service.yaml +++ /dev/null @@ -1,23 +0,0 @@ ---- -# Source: grafana-agent/templates/service.yaml -apiVersion: v1 -kind: Service -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -spec: - type: ClusterIP - selector: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - internalTrafficPolicy: Cluster - ports: - - name: http-metrics - port: 80 - targetPort: 80 - protocol: "TCP" diff --git a/operations/helm/tests/enable-servicemonitor/grafana-agent/templates/serviceaccount.yaml b/operations/helm/tests/enable-servicemonitor/grafana-agent/templates/serviceaccount.yaml deleted file mode 100644 index 65d7e0df38..0000000000 --- a/operations/helm/tests/enable-servicemonitor/grafana-agent/templates/serviceaccount.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -# Source: grafana-agent/templates/serviceaccount.yaml -apiVersion: v1 -kind: ServiceAccount -metadata: - name: grafana-agent - namespace: default - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm diff --git a/operations/helm/tests/enable-servicemonitor/grafana-agent/templates/servicemonitor.yaml b/operations/helm/tests/enable-servicemonitor/grafana-agent/templates/servicemonitor.yaml deleted file mode 100644 index 4a5a3e6bc4..0000000000 --- a/operations/helm/tests/enable-servicemonitor/grafana-agent/templates/servicemonitor.yaml +++ /dev/null @@ -1,21 +0,0 @@ ---- -# Source: grafana-agent/templates/servicemonitor.yaml -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -spec: - endpoints: - - port: http-metrics - scheme: http - honorLabels: true - selector: - matchLabels: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent diff --git a/operations/helm/tests/envFrom/alloy/templates/configmap.yaml b/operations/helm/tests/envFrom/alloy/templates/configmap.yaml new file mode 100644 index 0000000000..c9ae77aa1e --- /dev/null +++ b/operations/helm/tests/envFrom/alloy/templates/configmap.yaml @@ -0,0 +1,42 @@ +--- +# Source: alloy/templates/configmap.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +data: + config.river: |- + logging { + level = "info" + format = "logfmt" + } + + discovery.kubernetes "pods" { + role = "pod" + } + + discovery.kubernetes "nodes" { + role = "node" + } + + discovery.kubernetes "services" { + role = "service" + } + + discovery.kubernetes "endpoints" { + role = "endpoints" + } + + discovery.kubernetes "endpointslices" { + role = "endpointslice" + } + + discovery.kubernetes "ingresses" { + role = "ingress" + } diff --git a/operations/helm/tests/envFrom/grafana-agent/templates/controllers/daemonset.yaml b/operations/helm/tests/envFrom/alloy/templates/controllers/daemonset.yaml similarity index 63% rename from operations/helm/tests/envFrom/grafana-agent/templates/controllers/daemonset.yaml rename to operations/helm/tests/envFrom/alloy/templates/controllers/daemonset.yaml index 425efb8183..605f24ed6d 100644 --- a/operations/helm/tests/envFrom/grafana-agent/templates/controllers/daemonset.yaml +++ b/operations/helm/tests/envFrom/alloy/templates/controllers/daemonset.yaml @@ -1,43 +1,41 @@ --- -# Source: grafana-agent/templates/controllers/daemonset.yaml +# Source: alloy/templates/controllers/daemonset.yaml apiVersion: apps/v1 kind: DaemonSet metadata: - name: grafana-agent + name: alloy labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy app.kubernetes.io/version: "vX.Y.Z" app.kubernetes.io/managed-by: Helm spec: minReadySeconds: 10 selector: matchLabels: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy template: metadata: annotations: - kubectl.kubernetes.io/default-container: grafana-agent + kubectl.kubernetes.io/default-container: alloy labels: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy spec: - serviceAccountName: grafana-agent + serviceAccountName: alloy containers: - - name: grafana-agent - image: docker.io/grafana/agent:v0.40.2 + - name: alloy + image: docker.io/grafana/alloy:v1.0.0 imagePullPolicy: IfNotPresent args: - run - - /etc/agent/config.river - - --storage.path=/tmp/agent + - /etc/alloy/config.river + - --storage.path=/tmp/alloy - --server.http.listen-addr=0.0.0.0:80 - --server.http.ui-path-prefix=/ env: - - name: AGENT_MODE - value: flow - name: AGENT_DEPLOY_MODE value: "helm" - name: HOSTNAME @@ -59,15 +57,15 @@ spec: timeoutSeconds: 1 volumeMounts: - name: config - mountPath: /etc/agent + mountPath: /etc/alloy - name: config-reloader image: ghcr.io/jimmidyson/configmap-reload:v0.12.0 args: - - --volume-dir=/etc/agent + - --volume-dir=/etc/alloy - --webhook-url=http://localhost:80/-/reload volumeMounts: - name: config - mountPath: /etc/agent + mountPath: /etc/alloy resources: requests: cpu: 1m @@ -76,4 +74,4 @@ spec: volumes: - name: config configMap: - name: grafana-agent + name: alloy diff --git a/operations/helm/tests/envFrom/alloy/templates/rbac.yaml b/operations/helm/tests/envFrom/alloy/templates/rbac.yaml new file mode 100644 index 0000000000..53ca27544f --- /dev/null +++ b/operations/helm/tests/envFrom/alloy/templates/rbac.yaml @@ -0,0 +1,117 @@ +--- +# Source: alloy/templates/rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +rules: + # Rules which allow discovery.kubernetes to function. + - apiGroups: + - "" + - "discovery.k8s.io" + - "networking.k8s.io" + resources: + - endpoints + - endpointslices + - ingresses + - nodes + - nodes/proxy + - nodes/metrics + - pods + - services + verbs: + - get + - list + - watch + # Rules which allow loki.source.kubernetes and loki.source.podlogs to work. + - apiGroups: + - "" + resources: + - pods + - pods/log + - namespaces + verbs: + - get + - list + - watch + - apiGroups: + - "monitoring.grafana.com" + resources: + - podlogs + verbs: + - get + - list + - watch + # Rules which allow mimir.rules.kubernetes to work. + - apiGroups: ["monitoring.coreos.com"] + resources: + - prometheusrules + verbs: + - get + - list + - watch + - nonResourceURLs: + - /metrics + verbs: + - get + # Rules for prometheus.kubernetes.* + - apiGroups: ["monitoring.coreos.com"] + resources: + - podmonitors + - servicemonitors + - probes + verbs: + - get + - list + - watch + # Rules which allow eventhandler to work. + - apiGroups: + - "" + resources: + - events + verbs: + - get + - list + - watch + # needed for remote.kubernetes.* + - apiGroups: [""] + resources: + - "configmaps" + - "secrets" + verbs: + - get + - list + - watch + # needed for otelcol.processor.k8sattributes + - apiGroups: ["apps"] + resources: ["replicasets"] + verbs: ["get", "list", "watch"] + - apiGroups: ["extensions"] + resources: ["replicasets"] + verbs: ["get", "list", "watch"] +--- +# Source: alloy/templates/rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: alloy +subjects: + - kind: ServiceAccount + name: alloy + namespace: default diff --git a/operations/helm/tests/envFrom/alloy/templates/service.yaml b/operations/helm/tests/envFrom/alloy/templates/service.yaml new file mode 100644 index 0000000000..34c0608fd3 --- /dev/null +++ b/operations/helm/tests/envFrom/alloy/templates/service.yaml @@ -0,0 +1,23 @@ +--- +# Source: alloy/templates/service.yaml +apiVersion: v1 +kind: Service +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +spec: + type: ClusterIP + selector: + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + internalTrafficPolicy: Cluster + ports: + - name: http-metrics + port: 80 + targetPort: 80 + protocol: "TCP" diff --git a/operations/helm/tests/envFrom/alloy/templates/serviceaccount.yaml b/operations/helm/tests/envFrom/alloy/templates/serviceaccount.yaml new file mode 100644 index 0000000000..46df991efb --- /dev/null +++ b/operations/helm/tests/envFrom/alloy/templates/serviceaccount.yaml @@ -0,0 +1,13 @@ +--- +# Source: alloy/templates/serviceaccount.yaml +apiVersion: v1 +kind: ServiceAccount +metadata: + name: alloy + namespace: default + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm diff --git a/operations/helm/tests/envFrom/grafana-agent/templates/configmap.yaml b/operations/helm/tests/envFrom/grafana-agent/templates/configmap.yaml deleted file mode 100644 index 2fdc6f0117..0000000000 --- a/operations/helm/tests/envFrom/grafana-agent/templates/configmap.yaml +++ /dev/null @@ -1,42 +0,0 @@ ---- -# Source: grafana-agent/templates/configmap.yaml -apiVersion: v1 -kind: ConfigMap -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -data: - config.river: |- - logging { - level = "info" - format = "logfmt" - } - - discovery.kubernetes "pods" { - role = "pod" - } - - discovery.kubernetes "nodes" { - role = "node" - } - - discovery.kubernetes "services" { - role = "service" - } - - discovery.kubernetes "endpoints" { - role = "endpoints" - } - - discovery.kubernetes "endpointslices" { - role = "endpointslice" - } - - discovery.kubernetes "ingresses" { - role = "ingress" - } diff --git a/operations/helm/tests/envFrom/grafana-agent/templates/rbac.yaml b/operations/helm/tests/envFrom/grafana-agent/templates/rbac.yaml deleted file mode 100644 index 3765583fb6..0000000000 --- a/operations/helm/tests/envFrom/grafana-agent/templates/rbac.yaml +++ /dev/null @@ -1,117 +0,0 @@ ---- -# Source: grafana-agent/templates/rbac.yaml -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -rules: - # Rules which allow discovery.kubernetes to function. - - apiGroups: - - "" - - "discovery.k8s.io" - - "networking.k8s.io" - resources: - - endpoints - - endpointslices - - ingresses - - nodes - - nodes/proxy - - nodes/metrics - - pods - - services - verbs: - - get - - list - - watch - # Rules which allow loki.source.kubernetes and loki.source.podlogs to work. - - apiGroups: - - "" - resources: - - pods - - pods/log - - namespaces - verbs: - - get - - list - - watch - - apiGroups: - - "monitoring.grafana.com" - resources: - - podlogs - verbs: - - get - - list - - watch - # Rules which allow mimir.rules.kubernetes to work. - - apiGroups: ["monitoring.coreos.com"] - resources: - - prometheusrules - verbs: - - get - - list - - watch - - nonResourceURLs: - - /metrics - verbs: - - get - # Rules for prometheus.kubernetes.* - - apiGroups: ["monitoring.coreos.com"] - resources: - - podmonitors - - servicemonitors - - probes - verbs: - - get - - list - - watch - # Rules which allow eventhandler to work. - - apiGroups: - - "" - resources: - - events - verbs: - - get - - list - - watch - # needed for remote.kubernetes.* - - apiGroups: [""] - resources: - - "configmaps" - - "secrets" - verbs: - - get - - list - - watch - # needed for otelcol.processor.k8sattributes - - apiGroups: ["apps"] - resources: ["replicasets"] - verbs: ["get", "list", "watch"] - - apiGroups: ["extensions"] - resources: ["replicasets"] - verbs: ["get", "list", "watch"] ---- -# Source: grafana-agent/templates/rbac.yaml -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: grafana-agent -subjects: - - kind: ServiceAccount - name: grafana-agent - namespace: default diff --git a/operations/helm/tests/envFrom/grafana-agent/templates/service.yaml b/operations/helm/tests/envFrom/grafana-agent/templates/service.yaml deleted file mode 100644 index c98f79428b..0000000000 --- a/operations/helm/tests/envFrom/grafana-agent/templates/service.yaml +++ /dev/null @@ -1,23 +0,0 @@ ---- -# Source: grafana-agent/templates/service.yaml -apiVersion: v1 -kind: Service -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -spec: - type: ClusterIP - selector: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - internalTrafficPolicy: Cluster - ports: - - name: http-metrics - port: 80 - targetPort: 80 - protocol: "TCP" diff --git a/operations/helm/tests/envFrom/grafana-agent/templates/serviceaccount.yaml b/operations/helm/tests/envFrom/grafana-agent/templates/serviceaccount.yaml deleted file mode 100644 index 65d7e0df38..0000000000 --- a/operations/helm/tests/envFrom/grafana-agent/templates/serviceaccount.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -# Source: grafana-agent/templates/serviceaccount.yaml -apiVersion: v1 -kind: ServiceAccount -metadata: - name: grafana-agent - namespace: default - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm diff --git a/operations/helm/tests/existing-config/grafana-agent/templates/controllers/daemonset.yaml b/operations/helm/tests/existing-config/alloy/templates/controllers/daemonset.yaml similarity index 63% rename from operations/helm/tests/existing-config/grafana-agent/templates/controllers/daemonset.yaml rename to operations/helm/tests/existing-config/alloy/templates/controllers/daemonset.yaml index 7c266c655f..596d8a71c1 100644 --- a/operations/helm/tests/existing-config/grafana-agent/templates/controllers/daemonset.yaml +++ b/operations/helm/tests/existing-config/alloy/templates/controllers/daemonset.yaml @@ -1,43 +1,41 @@ --- -# Source: grafana-agent/templates/controllers/daemonset.yaml +# Source: alloy/templates/controllers/daemonset.yaml apiVersion: apps/v1 kind: DaemonSet metadata: - name: grafana-agent + name: alloy labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy app.kubernetes.io/version: "vX.Y.Z" app.kubernetes.io/managed-by: Helm spec: minReadySeconds: 10 selector: matchLabels: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy template: metadata: annotations: - kubectl.kubernetes.io/default-container: grafana-agent + kubectl.kubernetes.io/default-container: alloy labels: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy spec: - serviceAccountName: grafana-agent + serviceAccountName: alloy containers: - - name: grafana-agent - image: docker.io/grafana/agent:v0.40.2 + - name: alloy + image: docker.io/grafana/alloy:v1.0.0 imagePullPolicy: IfNotPresent args: - run - - /etc/agent/my-config.river - - --storage.path=/tmp/agent + - /etc/alloy/my-config.river + - --storage.path=/tmp/alloy - --server.http.listen-addr=0.0.0.0:80 - --server.http.ui-path-prefix=/ env: - - name: AGENT_MODE - value: flow - name: AGENT_DEPLOY_MODE value: "helm" - name: HOSTNAME @@ -56,15 +54,15 @@ spec: timeoutSeconds: 1 volumeMounts: - name: config - mountPath: /etc/agent + mountPath: /etc/alloy - name: config-reloader image: ghcr.io/jimmidyson/configmap-reload:v0.12.0 args: - - --volume-dir=/etc/agent + - --volume-dir=/etc/alloy - --webhook-url=http://localhost:80/-/reload volumeMounts: - name: config - mountPath: /etc/agent + mountPath: /etc/alloy resources: requests: cpu: 1m diff --git a/operations/helm/tests/existing-config/alloy/templates/rbac.yaml b/operations/helm/tests/existing-config/alloy/templates/rbac.yaml new file mode 100644 index 0000000000..53ca27544f --- /dev/null +++ b/operations/helm/tests/existing-config/alloy/templates/rbac.yaml @@ -0,0 +1,117 @@ +--- +# Source: alloy/templates/rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +rules: + # Rules which allow discovery.kubernetes to function. + - apiGroups: + - "" + - "discovery.k8s.io" + - "networking.k8s.io" + resources: + - endpoints + - endpointslices + - ingresses + - nodes + - nodes/proxy + - nodes/metrics + - pods + - services + verbs: + - get + - list + - watch + # Rules which allow loki.source.kubernetes and loki.source.podlogs to work. + - apiGroups: + - "" + resources: + - pods + - pods/log + - namespaces + verbs: + - get + - list + - watch + - apiGroups: + - "monitoring.grafana.com" + resources: + - podlogs + verbs: + - get + - list + - watch + # Rules which allow mimir.rules.kubernetes to work. + - apiGroups: ["monitoring.coreos.com"] + resources: + - prometheusrules + verbs: + - get + - list + - watch + - nonResourceURLs: + - /metrics + verbs: + - get + # Rules for prometheus.kubernetes.* + - apiGroups: ["monitoring.coreos.com"] + resources: + - podmonitors + - servicemonitors + - probes + verbs: + - get + - list + - watch + # Rules which allow eventhandler to work. + - apiGroups: + - "" + resources: + - events + verbs: + - get + - list + - watch + # needed for remote.kubernetes.* + - apiGroups: [""] + resources: + - "configmaps" + - "secrets" + verbs: + - get + - list + - watch + # needed for otelcol.processor.k8sattributes + - apiGroups: ["apps"] + resources: ["replicasets"] + verbs: ["get", "list", "watch"] + - apiGroups: ["extensions"] + resources: ["replicasets"] + verbs: ["get", "list", "watch"] +--- +# Source: alloy/templates/rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: alloy +subjects: + - kind: ServiceAccount + name: alloy + namespace: default diff --git a/operations/helm/tests/existing-config/alloy/templates/service.yaml b/operations/helm/tests/existing-config/alloy/templates/service.yaml new file mode 100644 index 0000000000..34c0608fd3 --- /dev/null +++ b/operations/helm/tests/existing-config/alloy/templates/service.yaml @@ -0,0 +1,23 @@ +--- +# Source: alloy/templates/service.yaml +apiVersion: v1 +kind: Service +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +spec: + type: ClusterIP + selector: + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + internalTrafficPolicy: Cluster + ports: + - name: http-metrics + port: 80 + targetPort: 80 + protocol: "TCP" diff --git a/operations/helm/tests/existing-config/alloy/templates/serviceaccount.yaml b/operations/helm/tests/existing-config/alloy/templates/serviceaccount.yaml new file mode 100644 index 0000000000..46df991efb --- /dev/null +++ b/operations/helm/tests/existing-config/alloy/templates/serviceaccount.yaml @@ -0,0 +1,13 @@ +--- +# Source: alloy/templates/serviceaccount.yaml +apiVersion: v1 +kind: ServiceAccount +metadata: + name: alloy + namespace: default + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm diff --git a/operations/helm/tests/existing-config/grafana-agent/templates/rbac.yaml b/operations/helm/tests/existing-config/grafana-agent/templates/rbac.yaml deleted file mode 100644 index 3765583fb6..0000000000 --- a/operations/helm/tests/existing-config/grafana-agent/templates/rbac.yaml +++ /dev/null @@ -1,117 +0,0 @@ ---- -# Source: grafana-agent/templates/rbac.yaml -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -rules: - # Rules which allow discovery.kubernetes to function. - - apiGroups: - - "" - - "discovery.k8s.io" - - "networking.k8s.io" - resources: - - endpoints - - endpointslices - - ingresses - - nodes - - nodes/proxy - - nodes/metrics - - pods - - services - verbs: - - get - - list - - watch - # Rules which allow loki.source.kubernetes and loki.source.podlogs to work. - - apiGroups: - - "" - resources: - - pods - - pods/log - - namespaces - verbs: - - get - - list - - watch - - apiGroups: - - "monitoring.grafana.com" - resources: - - podlogs - verbs: - - get - - list - - watch - # Rules which allow mimir.rules.kubernetes to work. - - apiGroups: ["monitoring.coreos.com"] - resources: - - prometheusrules - verbs: - - get - - list - - watch - - nonResourceURLs: - - /metrics - verbs: - - get - # Rules for prometheus.kubernetes.* - - apiGroups: ["monitoring.coreos.com"] - resources: - - podmonitors - - servicemonitors - - probes - verbs: - - get - - list - - watch - # Rules which allow eventhandler to work. - - apiGroups: - - "" - resources: - - events - verbs: - - get - - list - - watch - # needed for remote.kubernetes.* - - apiGroups: [""] - resources: - - "configmaps" - - "secrets" - verbs: - - get - - list - - watch - # needed for otelcol.processor.k8sattributes - - apiGroups: ["apps"] - resources: ["replicasets"] - verbs: ["get", "list", "watch"] - - apiGroups: ["extensions"] - resources: ["replicasets"] - verbs: ["get", "list", "watch"] ---- -# Source: grafana-agent/templates/rbac.yaml -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: grafana-agent -subjects: - - kind: ServiceAccount - name: grafana-agent - namespace: default diff --git a/operations/helm/tests/existing-config/grafana-agent/templates/service.yaml b/operations/helm/tests/existing-config/grafana-agent/templates/service.yaml deleted file mode 100644 index c98f79428b..0000000000 --- a/operations/helm/tests/existing-config/grafana-agent/templates/service.yaml +++ /dev/null @@ -1,23 +0,0 @@ ---- -# Source: grafana-agent/templates/service.yaml -apiVersion: v1 -kind: Service -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -spec: - type: ClusterIP - selector: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - internalTrafficPolicy: Cluster - ports: - - name: http-metrics - port: 80 - targetPort: 80 - protocol: "TCP" diff --git a/operations/helm/tests/existing-config/grafana-agent/templates/serviceaccount.yaml b/operations/helm/tests/existing-config/grafana-agent/templates/serviceaccount.yaml deleted file mode 100644 index 65d7e0df38..0000000000 --- a/operations/helm/tests/existing-config/grafana-agent/templates/serviceaccount.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -# Source: grafana-agent/templates/serviceaccount.yaml -apiVersion: v1 -kind: ServiceAccount -metadata: - name: grafana-agent - namespace: default - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm diff --git a/operations/helm/tests/extra-env/alloy/templates/configmap.yaml b/operations/helm/tests/extra-env/alloy/templates/configmap.yaml new file mode 100644 index 0000000000..c9ae77aa1e --- /dev/null +++ b/operations/helm/tests/extra-env/alloy/templates/configmap.yaml @@ -0,0 +1,42 @@ +--- +# Source: alloy/templates/configmap.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +data: + config.river: |- + logging { + level = "info" + format = "logfmt" + } + + discovery.kubernetes "pods" { + role = "pod" + } + + discovery.kubernetes "nodes" { + role = "node" + } + + discovery.kubernetes "services" { + role = "service" + } + + discovery.kubernetes "endpoints" { + role = "endpoints" + } + + discovery.kubernetes "endpointslices" { + role = "endpointslice" + } + + discovery.kubernetes "ingresses" { + role = "ingress" + } diff --git a/operations/helm/tests/extra-env/grafana-agent/templates/controllers/daemonset.yaml b/operations/helm/tests/extra-env/alloy/templates/controllers/daemonset.yaml similarity index 65% rename from operations/helm/tests/extra-env/grafana-agent/templates/controllers/daemonset.yaml rename to operations/helm/tests/extra-env/alloy/templates/controllers/daemonset.yaml index 0844db8bf1..5198946515 100644 --- a/operations/helm/tests/extra-env/grafana-agent/templates/controllers/daemonset.yaml +++ b/operations/helm/tests/extra-env/alloy/templates/controllers/daemonset.yaml @@ -1,43 +1,41 @@ --- -# Source: grafana-agent/templates/controllers/daemonset.yaml +# Source: alloy/templates/controllers/daemonset.yaml apiVersion: apps/v1 kind: DaemonSet metadata: - name: grafana-agent + name: alloy labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy app.kubernetes.io/version: "vX.Y.Z" app.kubernetes.io/managed-by: Helm spec: minReadySeconds: 10 selector: matchLabels: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy template: metadata: annotations: - kubectl.kubernetes.io/default-container: grafana-agent + kubectl.kubernetes.io/default-container: alloy labels: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy spec: - serviceAccountName: grafana-agent + serviceAccountName: alloy containers: - - name: grafana-agent - image: docker.io/grafana/agent:v0.40.2 + - name: alloy + image: docker.io/grafana/alloy:v1.0.0 imagePullPolicy: IfNotPresent args: - run - - /etc/agent/config.river - - --storage.path=/tmp/agent + - /etc/alloy/config.river + - --storage.path=/tmp/alloy - --server.http.listen-addr=0.0.0.0:80 - --server.http.ui-path-prefix=/ env: - - name: AGENT_MODE - value: flow - name: AGENT_DEPLOY_MODE value: "helm" - name: HOSTNAME @@ -65,15 +63,15 @@ spec: timeoutSeconds: 1 volumeMounts: - name: config - mountPath: /etc/agent + mountPath: /etc/alloy - name: config-reloader image: ghcr.io/jimmidyson/configmap-reload:v0.12.0 args: - - --volume-dir=/etc/agent + - --volume-dir=/etc/alloy - --webhook-url=http://localhost:80/-/reload volumeMounts: - name: config - mountPath: /etc/agent + mountPath: /etc/alloy resources: requests: cpu: 1m @@ -82,4 +80,4 @@ spec: volumes: - name: config configMap: - name: grafana-agent + name: alloy diff --git a/operations/helm/tests/extra-env/alloy/templates/rbac.yaml b/operations/helm/tests/extra-env/alloy/templates/rbac.yaml new file mode 100644 index 0000000000..53ca27544f --- /dev/null +++ b/operations/helm/tests/extra-env/alloy/templates/rbac.yaml @@ -0,0 +1,117 @@ +--- +# Source: alloy/templates/rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +rules: + # Rules which allow discovery.kubernetes to function. + - apiGroups: + - "" + - "discovery.k8s.io" + - "networking.k8s.io" + resources: + - endpoints + - endpointslices + - ingresses + - nodes + - nodes/proxy + - nodes/metrics + - pods + - services + verbs: + - get + - list + - watch + # Rules which allow loki.source.kubernetes and loki.source.podlogs to work. + - apiGroups: + - "" + resources: + - pods + - pods/log + - namespaces + verbs: + - get + - list + - watch + - apiGroups: + - "monitoring.grafana.com" + resources: + - podlogs + verbs: + - get + - list + - watch + # Rules which allow mimir.rules.kubernetes to work. + - apiGroups: ["monitoring.coreos.com"] + resources: + - prometheusrules + verbs: + - get + - list + - watch + - nonResourceURLs: + - /metrics + verbs: + - get + # Rules for prometheus.kubernetes.* + - apiGroups: ["monitoring.coreos.com"] + resources: + - podmonitors + - servicemonitors + - probes + verbs: + - get + - list + - watch + # Rules which allow eventhandler to work. + - apiGroups: + - "" + resources: + - events + verbs: + - get + - list + - watch + # needed for remote.kubernetes.* + - apiGroups: [""] + resources: + - "configmaps" + - "secrets" + verbs: + - get + - list + - watch + # needed for otelcol.processor.k8sattributes + - apiGroups: ["apps"] + resources: ["replicasets"] + verbs: ["get", "list", "watch"] + - apiGroups: ["extensions"] + resources: ["replicasets"] + verbs: ["get", "list", "watch"] +--- +# Source: alloy/templates/rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: alloy +subjects: + - kind: ServiceAccount + name: alloy + namespace: default diff --git a/operations/helm/tests/extra-env/alloy/templates/service.yaml b/operations/helm/tests/extra-env/alloy/templates/service.yaml new file mode 100644 index 0000000000..34c0608fd3 --- /dev/null +++ b/operations/helm/tests/extra-env/alloy/templates/service.yaml @@ -0,0 +1,23 @@ +--- +# Source: alloy/templates/service.yaml +apiVersion: v1 +kind: Service +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +spec: + type: ClusterIP + selector: + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + internalTrafficPolicy: Cluster + ports: + - name: http-metrics + port: 80 + targetPort: 80 + protocol: "TCP" diff --git a/operations/helm/tests/extra-env/alloy/templates/serviceaccount.yaml b/operations/helm/tests/extra-env/alloy/templates/serviceaccount.yaml new file mode 100644 index 0000000000..46df991efb --- /dev/null +++ b/operations/helm/tests/extra-env/alloy/templates/serviceaccount.yaml @@ -0,0 +1,13 @@ +--- +# Source: alloy/templates/serviceaccount.yaml +apiVersion: v1 +kind: ServiceAccount +metadata: + name: alloy + namespace: default + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm diff --git a/operations/helm/tests/extra-env/grafana-agent/templates/configmap.yaml b/operations/helm/tests/extra-env/grafana-agent/templates/configmap.yaml deleted file mode 100644 index 2fdc6f0117..0000000000 --- a/operations/helm/tests/extra-env/grafana-agent/templates/configmap.yaml +++ /dev/null @@ -1,42 +0,0 @@ ---- -# Source: grafana-agent/templates/configmap.yaml -apiVersion: v1 -kind: ConfigMap -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -data: - config.river: |- - logging { - level = "info" - format = "logfmt" - } - - discovery.kubernetes "pods" { - role = "pod" - } - - discovery.kubernetes "nodes" { - role = "node" - } - - discovery.kubernetes "services" { - role = "service" - } - - discovery.kubernetes "endpoints" { - role = "endpoints" - } - - discovery.kubernetes "endpointslices" { - role = "endpointslice" - } - - discovery.kubernetes "ingresses" { - role = "ingress" - } diff --git a/operations/helm/tests/extra-env/grafana-agent/templates/rbac.yaml b/operations/helm/tests/extra-env/grafana-agent/templates/rbac.yaml deleted file mode 100644 index 3765583fb6..0000000000 --- a/operations/helm/tests/extra-env/grafana-agent/templates/rbac.yaml +++ /dev/null @@ -1,117 +0,0 @@ ---- -# Source: grafana-agent/templates/rbac.yaml -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -rules: - # Rules which allow discovery.kubernetes to function. - - apiGroups: - - "" - - "discovery.k8s.io" - - "networking.k8s.io" - resources: - - endpoints - - endpointslices - - ingresses - - nodes - - nodes/proxy - - nodes/metrics - - pods - - services - verbs: - - get - - list - - watch - # Rules which allow loki.source.kubernetes and loki.source.podlogs to work. - - apiGroups: - - "" - resources: - - pods - - pods/log - - namespaces - verbs: - - get - - list - - watch - - apiGroups: - - "monitoring.grafana.com" - resources: - - podlogs - verbs: - - get - - list - - watch - # Rules which allow mimir.rules.kubernetes to work. - - apiGroups: ["monitoring.coreos.com"] - resources: - - prometheusrules - verbs: - - get - - list - - watch - - nonResourceURLs: - - /metrics - verbs: - - get - # Rules for prometheus.kubernetes.* - - apiGroups: ["monitoring.coreos.com"] - resources: - - podmonitors - - servicemonitors - - probes - verbs: - - get - - list - - watch - # Rules which allow eventhandler to work. - - apiGroups: - - "" - resources: - - events - verbs: - - get - - list - - watch - # needed for remote.kubernetes.* - - apiGroups: [""] - resources: - - "configmaps" - - "secrets" - verbs: - - get - - list - - watch - # needed for otelcol.processor.k8sattributes - - apiGroups: ["apps"] - resources: ["replicasets"] - verbs: ["get", "list", "watch"] - - apiGroups: ["extensions"] - resources: ["replicasets"] - verbs: ["get", "list", "watch"] ---- -# Source: grafana-agent/templates/rbac.yaml -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: grafana-agent -subjects: - - kind: ServiceAccount - name: grafana-agent - namespace: default diff --git a/operations/helm/tests/extra-env/grafana-agent/templates/service.yaml b/operations/helm/tests/extra-env/grafana-agent/templates/service.yaml deleted file mode 100644 index c98f79428b..0000000000 --- a/operations/helm/tests/extra-env/grafana-agent/templates/service.yaml +++ /dev/null @@ -1,23 +0,0 @@ ---- -# Source: grafana-agent/templates/service.yaml -apiVersion: v1 -kind: Service -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -spec: - type: ClusterIP - selector: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - internalTrafficPolicy: Cluster - ports: - - name: http-metrics - port: 80 - targetPort: 80 - protocol: "TCP" diff --git a/operations/helm/tests/extra-env/grafana-agent/templates/serviceaccount.yaml b/operations/helm/tests/extra-env/grafana-agent/templates/serviceaccount.yaml deleted file mode 100644 index 65d7e0df38..0000000000 --- a/operations/helm/tests/extra-env/grafana-agent/templates/serviceaccount.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -# Source: grafana-agent/templates/serviceaccount.yaml -apiVersion: v1 -kind: ServiceAccount -metadata: - name: grafana-agent - namespace: default - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm diff --git a/operations/helm/tests/extra-ports/alloy/templates/configmap.yaml b/operations/helm/tests/extra-ports/alloy/templates/configmap.yaml new file mode 100644 index 0000000000..c9ae77aa1e --- /dev/null +++ b/operations/helm/tests/extra-ports/alloy/templates/configmap.yaml @@ -0,0 +1,42 @@ +--- +# Source: alloy/templates/configmap.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +data: + config.river: |- + logging { + level = "info" + format = "logfmt" + } + + discovery.kubernetes "pods" { + role = "pod" + } + + discovery.kubernetes "nodes" { + role = "node" + } + + discovery.kubernetes "services" { + role = "service" + } + + discovery.kubernetes "endpoints" { + role = "endpoints" + } + + discovery.kubernetes "endpointslices" { + role = "endpointslice" + } + + discovery.kubernetes "ingresses" { + role = "ingress" + } diff --git a/operations/helm/tests/extra-ports/grafana-agent/templates/controllers/daemonset.yaml b/operations/helm/tests/extra-ports/alloy/templates/controllers/daemonset.yaml similarity index 63% rename from operations/helm/tests/extra-ports/grafana-agent/templates/controllers/daemonset.yaml rename to operations/helm/tests/extra-ports/alloy/templates/controllers/daemonset.yaml index 47042b9de5..5cf9738e87 100644 --- a/operations/helm/tests/extra-ports/grafana-agent/templates/controllers/daemonset.yaml +++ b/operations/helm/tests/extra-ports/alloy/templates/controllers/daemonset.yaml @@ -1,43 +1,41 @@ --- -# Source: grafana-agent/templates/controllers/daemonset.yaml +# Source: alloy/templates/controllers/daemonset.yaml apiVersion: apps/v1 kind: DaemonSet metadata: - name: grafana-agent + name: alloy labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy app.kubernetes.io/version: "vX.Y.Z" app.kubernetes.io/managed-by: Helm spec: minReadySeconds: 10 selector: matchLabels: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy template: metadata: annotations: - kubectl.kubernetes.io/default-container: grafana-agent + kubectl.kubernetes.io/default-container: alloy labels: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy spec: - serviceAccountName: grafana-agent + serviceAccountName: alloy containers: - - name: grafana-agent - image: docker.io/grafana/agent:v0.40.2 + - name: alloy + image: docker.io/grafana/alloy:v1.0.0 imagePullPolicy: IfNotPresent args: - run - - /etc/agent/config.river - - --storage.path=/tmp/agent + - /etc/alloy/config.river + - --storage.path=/tmp/alloy - --server.http.listen-addr=0.0.0.0:80 - --server.http.ui-path-prefix=/ env: - - name: AGENT_MODE - value: flow - name: AGENT_DEPLOY_MODE value: "helm" - name: HOSTNAME @@ -59,15 +57,15 @@ spec: timeoutSeconds: 1 volumeMounts: - name: config - mountPath: /etc/agent + mountPath: /etc/alloy - name: config-reloader image: ghcr.io/jimmidyson/configmap-reload:v0.12.0 args: - - --volume-dir=/etc/agent + - --volume-dir=/etc/alloy - --webhook-url=http://localhost:80/-/reload volumeMounts: - name: config - mountPath: /etc/agent + mountPath: /etc/alloy resources: requests: cpu: 1m @@ -76,4 +74,4 @@ spec: volumes: - name: config configMap: - name: grafana-agent + name: alloy diff --git a/operations/helm/tests/extra-ports/alloy/templates/rbac.yaml b/operations/helm/tests/extra-ports/alloy/templates/rbac.yaml new file mode 100644 index 0000000000..53ca27544f --- /dev/null +++ b/operations/helm/tests/extra-ports/alloy/templates/rbac.yaml @@ -0,0 +1,117 @@ +--- +# Source: alloy/templates/rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +rules: + # Rules which allow discovery.kubernetes to function. + - apiGroups: + - "" + - "discovery.k8s.io" + - "networking.k8s.io" + resources: + - endpoints + - endpointslices + - ingresses + - nodes + - nodes/proxy + - nodes/metrics + - pods + - services + verbs: + - get + - list + - watch + # Rules which allow loki.source.kubernetes and loki.source.podlogs to work. + - apiGroups: + - "" + resources: + - pods + - pods/log + - namespaces + verbs: + - get + - list + - watch + - apiGroups: + - "monitoring.grafana.com" + resources: + - podlogs + verbs: + - get + - list + - watch + # Rules which allow mimir.rules.kubernetes to work. + - apiGroups: ["monitoring.coreos.com"] + resources: + - prometheusrules + verbs: + - get + - list + - watch + - nonResourceURLs: + - /metrics + verbs: + - get + # Rules for prometheus.kubernetes.* + - apiGroups: ["monitoring.coreos.com"] + resources: + - podmonitors + - servicemonitors + - probes + verbs: + - get + - list + - watch + # Rules which allow eventhandler to work. + - apiGroups: + - "" + resources: + - events + verbs: + - get + - list + - watch + # needed for remote.kubernetes.* + - apiGroups: [""] + resources: + - "configmaps" + - "secrets" + verbs: + - get + - list + - watch + # needed for otelcol.processor.k8sattributes + - apiGroups: ["apps"] + resources: ["replicasets"] + verbs: ["get", "list", "watch"] + - apiGroups: ["extensions"] + resources: ["replicasets"] + verbs: ["get", "list", "watch"] +--- +# Source: alloy/templates/rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: alloy +subjects: + - kind: ServiceAccount + name: alloy + namespace: default diff --git a/operations/helm/tests/extra-ports/grafana-agent/templates/service.yaml b/operations/helm/tests/extra-ports/alloy/templates/service.yaml similarity index 57% rename from operations/helm/tests/extra-ports/grafana-agent/templates/service.yaml rename to operations/helm/tests/extra-ports/alloy/templates/service.yaml index 89acaacaad..e4fc0125bb 100644 --- a/operations/helm/tests/extra-ports/grafana-agent/templates/service.yaml +++ b/operations/helm/tests/extra-ports/alloy/templates/service.yaml @@ -1,20 +1,20 @@ --- -# Source: grafana-agent/templates/service.yaml +# Source: alloy/templates/service.yaml apiVersion: v1 kind: Service metadata: - name: grafana-agent + name: alloy labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy app.kubernetes.io/version: "vX.Y.Z" app.kubernetes.io/managed-by: Helm spec: type: ClusterIP selector: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy internalTrafficPolicy: Cluster ports: - name: http-metrics diff --git a/operations/helm/tests/extra-ports/alloy/templates/serviceaccount.yaml b/operations/helm/tests/extra-ports/alloy/templates/serviceaccount.yaml new file mode 100644 index 0000000000..46df991efb --- /dev/null +++ b/operations/helm/tests/extra-ports/alloy/templates/serviceaccount.yaml @@ -0,0 +1,13 @@ +--- +# Source: alloy/templates/serviceaccount.yaml +apiVersion: v1 +kind: ServiceAccount +metadata: + name: alloy + namespace: default + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm diff --git a/operations/helm/tests/extra-ports/grafana-agent/templates/configmap.yaml b/operations/helm/tests/extra-ports/grafana-agent/templates/configmap.yaml deleted file mode 100644 index 2fdc6f0117..0000000000 --- a/operations/helm/tests/extra-ports/grafana-agent/templates/configmap.yaml +++ /dev/null @@ -1,42 +0,0 @@ ---- -# Source: grafana-agent/templates/configmap.yaml -apiVersion: v1 -kind: ConfigMap -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -data: - config.river: |- - logging { - level = "info" - format = "logfmt" - } - - discovery.kubernetes "pods" { - role = "pod" - } - - discovery.kubernetes "nodes" { - role = "node" - } - - discovery.kubernetes "services" { - role = "service" - } - - discovery.kubernetes "endpoints" { - role = "endpoints" - } - - discovery.kubernetes "endpointslices" { - role = "endpointslice" - } - - discovery.kubernetes "ingresses" { - role = "ingress" - } diff --git a/operations/helm/tests/extra-ports/grafana-agent/templates/rbac.yaml b/operations/helm/tests/extra-ports/grafana-agent/templates/rbac.yaml deleted file mode 100644 index 3765583fb6..0000000000 --- a/operations/helm/tests/extra-ports/grafana-agent/templates/rbac.yaml +++ /dev/null @@ -1,117 +0,0 @@ ---- -# Source: grafana-agent/templates/rbac.yaml -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -rules: - # Rules which allow discovery.kubernetes to function. - - apiGroups: - - "" - - "discovery.k8s.io" - - "networking.k8s.io" - resources: - - endpoints - - endpointslices - - ingresses - - nodes - - nodes/proxy - - nodes/metrics - - pods - - services - verbs: - - get - - list - - watch - # Rules which allow loki.source.kubernetes and loki.source.podlogs to work. - - apiGroups: - - "" - resources: - - pods - - pods/log - - namespaces - verbs: - - get - - list - - watch - - apiGroups: - - "monitoring.grafana.com" - resources: - - podlogs - verbs: - - get - - list - - watch - # Rules which allow mimir.rules.kubernetes to work. - - apiGroups: ["monitoring.coreos.com"] - resources: - - prometheusrules - verbs: - - get - - list - - watch - - nonResourceURLs: - - /metrics - verbs: - - get - # Rules for prometheus.kubernetes.* - - apiGroups: ["monitoring.coreos.com"] - resources: - - podmonitors - - servicemonitors - - probes - verbs: - - get - - list - - watch - # Rules which allow eventhandler to work. - - apiGroups: - - "" - resources: - - events - verbs: - - get - - list - - watch - # needed for remote.kubernetes.* - - apiGroups: [""] - resources: - - "configmaps" - - "secrets" - verbs: - - get - - list - - watch - # needed for otelcol.processor.k8sattributes - - apiGroups: ["apps"] - resources: ["replicasets"] - verbs: ["get", "list", "watch"] - - apiGroups: ["extensions"] - resources: ["replicasets"] - verbs: ["get", "list", "watch"] ---- -# Source: grafana-agent/templates/rbac.yaml -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: grafana-agent -subjects: - - kind: ServiceAccount - name: grafana-agent - namespace: default diff --git a/operations/helm/tests/extra-ports/grafana-agent/templates/serviceaccount.yaml b/operations/helm/tests/extra-ports/grafana-agent/templates/serviceaccount.yaml deleted file mode 100644 index 65d7e0df38..0000000000 --- a/operations/helm/tests/extra-ports/grafana-agent/templates/serviceaccount.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -# Source: grafana-agent/templates/serviceaccount.yaml -apiVersion: v1 -kind: ServiceAccount -metadata: - name: grafana-agent - namespace: default - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm diff --git a/operations/helm/tests/faro-ingress/alloy/templates/configmap.yaml b/operations/helm/tests/faro-ingress/alloy/templates/configmap.yaml new file mode 100644 index 0000000000..c9ae77aa1e --- /dev/null +++ b/operations/helm/tests/faro-ingress/alloy/templates/configmap.yaml @@ -0,0 +1,42 @@ +--- +# Source: alloy/templates/configmap.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +data: + config.river: |- + logging { + level = "info" + format = "logfmt" + } + + discovery.kubernetes "pods" { + role = "pod" + } + + discovery.kubernetes "nodes" { + role = "node" + } + + discovery.kubernetes "services" { + role = "service" + } + + discovery.kubernetes "endpoints" { + role = "endpoints" + } + + discovery.kubernetes "endpointslices" { + role = "endpointslice" + } + + discovery.kubernetes "ingresses" { + role = "ingress" + } diff --git a/operations/helm/tests/faro-ingress/grafana-agent/templates/controllers/daemonset.yaml b/operations/helm/tests/faro-ingress/alloy/templates/controllers/daemonset.yaml similarity index 63% rename from operations/helm/tests/faro-ingress/grafana-agent/templates/controllers/daemonset.yaml rename to operations/helm/tests/faro-ingress/alloy/templates/controllers/daemonset.yaml index b712b997ee..1e55d3b51a 100644 --- a/operations/helm/tests/faro-ingress/grafana-agent/templates/controllers/daemonset.yaml +++ b/operations/helm/tests/faro-ingress/alloy/templates/controllers/daemonset.yaml @@ -1,43 +1,41 @@ --- -# Source: grafana-agent/templates/controllers/daemonset.yaml +# Source: alloy/templates/controllers/daemonset.yaml apiVersion: apps/v1 kind: DaemonSet metadata: - name: grafana-agent + name: alloy labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy app.kubernetes.io/version: "vX.Y.Z" app.kubernetes.io/managed-by: Helm spec: minReadySeconds: 10 selector: matchLabels: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy template: metadata: annotations: - kubectl.kubernetes.io/default-container: grafana-agent + kubectl.kubernetes.io/default-container: alloy labels: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy spec: - serviceAccountName: grafana-agent + serviceAccountName: alloy containers: - - name: grafana-agent - image: docker.io/grafana/agent:v0.40.2 + - name: alloy + image: docker.io/grafana/alloy:v1.0.0 imagePullPolicy: IfNotPresent args: - run - - /etc/agent/config.river - - --storage.path=/tmp/agent + - /etc/alloy/config.river + - --storage.path=/tmp/alloy - --server.http.listen-addr=0.0.0.0:80 - --server.http.ui-path-prefix=/ env: - - name: AGENT_MODE - value: flow - name: AGENT_DEPLOY_MODE value: "helm" - name: HOSTNAME @@ -59,15 +57,15 @@ spec: timeoutSeconds: 1 volumeMounts: - name: config - mountPath: /etc/agent + mountPath: /etc/alloy - name: config-reloader image: ghcr.io/jimmidyson/configmap-reload:v0.12.0 args: - - --volume-dir=/etc/agent + - --volume-dir=/etc/alloy - --webhook-url=http://localhost:80/-/reload volumeMounts: - name: config - mountPath: /etc/agent + mountPath: /etc/alloy resources: requests: cpu: 1m @@ -76,4 +74,4 @@ spec: volumes: - name: config configMap: - name: grafana-agent + name: alloy diff --git a/operations/helm/tests/faro-ingress/grafana-agent/templates/ingress.yaml b/operations/helm/tests/faro-ingress/alloy/templates/ingress.yaml similarity index 63% rename from operations/helm/tests/faro-ingress/grafana-agent/templates/ingress.yaml rename to operations/helm/tests/faro-ingress/alloy/templates/ingress.yaml index dfd9a0b9ba..7c4b32c460 100644 --- a/operations/helm/tests/faro-ingress/grafana-agent/templates/ingress.yaml +++ b/operations/helm/tests/faro-ingress/alloy/templates/ingress.yaml @@ -1,14 +1,14 @@ --- -# Source: grafana-agent/templates/ingress.yaml +# Source: alloy/templates/ingress.yaml apiVersion: networking.k8s.io/v1 kind: Ingress metadata: - name: grafana-agent + name: alloy namespace: default labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy app.kubernetes.io/version: "vX.Y.Z" app.kubernetes.io/managed-by: Helm spec: @@ -20,6 +20,6 @@ spec: pathType: Prefix backend: service: - name: grafana-agent + name: alloy port: number: 12347 diff --git a/operations/helm/tests/faro-ingress/alloy/templates/rbac.yaml b/operations/helm/tests/faro-ingress/alloy/templates/rbac.yaml new file mode 100644 index 0000000000..53ca27544f --- /dev/null +++ b/operations/helm/tests/faro-ingress/alloy/templates/rbac.yaml @@ -0,0 +1,117 @@ +--- +# Source: alloy/templates/rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +rules: + # Rules which allow discovery.kubernetes to function. + - apiGroups: + - "" + - "discovery.k8s.io" + - "networking.k8s.io" + resources: + - endpoints + - endpointslices + - ingresses + - nodes + - nodes/proxy + - nodes/metrics + - pods + - services + verbs: + - get + - list + - watch + # Rules which allow loki.source.kubernetes and loki.source.podlogs to work. + - apiGroups: + - "" + resources: + - pods + - pods/log + - namespaces + verbs: + - get + - list + - watch + - apiGroups: + - "monitoring.grafana.com" + resources: + - podlogs + verbs: + - get + - list + - watch + # Rules which allow mimir.rules.kubernetes to work. + - apiGroups: ["monitoring.coreos.com"] + resources: + - prometheusrules + verbs: + - get + - list + - watch + - nonResourceURLs: + - /metrics + verbs: + - get + # Rules for prometheus.kubernetes.* + - apiGroups: ["monitoring.coreos.com"] + resources: + - podmonitors + - servicemonitors + - probes + verbs: + - get + - list + - watch + # Rules which allow eventhandler to work. + - apiGroups: + - "" + resources: + - events + verbs: + - get + - list + - watch + # needed for remote.kubernetes.* + - apiGroups: [""] + resources: + - "configmaps" + - "secrets" + verbs: + - get + - list + - watch + # needed for otelcol.processor.k8sattributes + - apiGroups: ["apps"] + resources: ["replicasets"] + verbs: ["get", "list", "watch"] + - apiGroups: ["extensions"] + resources: ["replicasets"] + verbs: ["get", "list", "watch"] +--- +# Source: alloy/templates/rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: alloy +subjects: + - kind: ServiceAccount + name: alloy + namespace: default diff --git a/operations/helm/tests/faro-ingress/grafana-agent/templates/service.yaml b/operations/helm/tests/faro-ingress/alloy/templates/service.yaml similarity index 57% rename from operations/helm/tests/faro-ingress/grafana-agent/templates/service.yaml rename to operations/helm/tests/faro-ingress/alloy/templates/service.yaml index 46474326df..18c045acff 100644 --- a/operations/helm/tests/faro-ingress/grafana-agent/templates/service.yaml +++ b/operations/helm/tests/faro-ingress/alloy/templates/service.yaml @@ -1,20 +1,20 @@ --- -# Source: grafana-agent/templates/service.yaml +# Source: alloy/templates/service.yaml apiVersion: v1 kind: Service metadata: - name: grafana-agent + name: alloy labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy app.kubernetes.io/version: "vX.Y.Z" app.kubernetes.io/managed-by: Helm spec: type: ClusterIP selector: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy internalTrafficPolicy: Cluster ports: - name: http-metrics diff --git a/operations/helm/tests/faro-ingress/alloy/templates/serviceaccount.yaml b/operations/helm/tests/faro-ingress/alloy/templates/serviceaccount.yaml new file mode 100644 index 0000000000..46df991efb --- /dev/null +++ b/operations/helm/tests/faro-ingress/alloy/templates/serviceaccount.yaml @@ -0,0 +1,13 @@ +--- +# Source: alloy/templates/serviceaccount.yaml +apiVersion: v1 +kind: ServiceAccount +metadata: + name: alloy + namespace: default + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm diff --git a/operations/helm/tests/faro-ingress/grafana-agent/templates/configmap.yaml b/operations/helm/tests/faro-ingress/grafana-agent/templates/configmap.yaml deleted file mode 100644 index 2fdc6f0117..0000000000 --- a/operations/helm/tests/faro-ingress/grafana-agent/templates/configmap.yaml +++ /dev/null @@ -1,42 +0,0 @@ ---- -# Source: grafana-agent/templates/configmap.yaml -apiVersion: v1 -kind: ConfigMap -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -data: - config.river: |- - logging { - level = "info" - format = "logfmt" - } - - discovery.kubernetes "pods" { - role = "pod" - } - - discovery.kubernetes "nodes" { - role = "node" - } - - discovery.kubernetes "services" { - role = "service" - } - - discovery.kubernetes "endpoints" { - role = "endpoints" - } - - discovery.kubernetes "endpointslices" { - role = "endpointslice" - } - - discovery.kubernetes "ingresses" { - role = "ingress" - } diff --git a/operations/helm/tests/faro-ingress/grafana-agent/templates/rbac.yaml b/operations/helm/tests/faro-ingress/grafana-agent/templates/rbac.yaml deleted file mode 100644 index 3765583fb6..0000000000 --- a/operations/helm/tests/faro-ingress/grafana-agent/templates/rbac.yaml +++ /dev/null @@ -1,117 +0,0 @@ ---- -# Source: grafana-agent/templates/rbac.yaml -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -rules: - # Rules which allow discovery.kubernetes to function. - - apiGroups: - - "" - - "discovery.k8s.io" - - "networking.k8s.io" - resources: - - endpoints - - endpointslices - - ingresses - - nodes - - nodes/proxy - - nodes/metrics - - pods - - services - verbs: - - get - - list - - watch - # Rules which allow loki.source.kubernetes and loki.source.podlogs to work. - - apiGroups: - - "" - resources: - - pods - - pods/log - - namespaces - verbs: - - get - - list - - watch - - apiGroups: - - "monitoring.grafana.com" - resources: - - podlogs - verbs: - - get - - list - - watch - # Rules which allow mimir.rules.kubernetes to work. - - apiGroups: ["monitoring.coreos.com"] - resources: - - prometheusrules - verbs: - - get - - list - - watch - - nonResourceURLs: - - /metrics - verbs: - - get - # Rules for prometheus.kubernetes.* - - apiGroups: ["monitoring.coreos.com"] - resources: - - podmonitors - - servicemonitors - - probes - verbs: - - get - - list - - watch - # Rules which allow eventhandler to work. - - apiGroups: - - "" - resources: - - events - verbs: - - get - - list - - watch - # needed for remote.kubernetes.* - - apiGroups: [""] - resources: - - "configmaps" - - "secrets" - verbs: - - get - - list - - watch - # needed for otelcol.processor.k8sattributes - - apiGroups: ["apps"] - resources: ["replicasets"] - verbs: ["get", "list", "watch"] - - apiGroups: ["extensions"] - resources: ["replicasets"] - verbs: ["get", "list", "watch"] ---- -# Source: grafana-agent/templates/rbac.yaml -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: grafana-agent -subjects: - - kind: ServiceAccount - name: grafana-agent - namespace: default diff --git a/operations/helm/tests/faro-ingress/grafana-agent/templates/serviceaccount.yaml b/operations/helm/tests/faro-ingress/grafana-agent/templates/serviceaccount.yaml deleted file mode 100644 index 65d7e0df38..0000000000 --- a/operations/helm/tests/faro-ingress/grafana-agent/templates/serviceaccount.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -# Source: grafana-agent/templates/serviceaccount.yaml -apiVersion: v1 -kind: ServiceAccount -metadata: - name: grafana-agent - namespace: default - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm diff --git a/operations/helm/tests/global-image-pullsecrets/alloy/templates/configmap.yaml b/operations/helm/tests/global-image-pullsecrets/alloy/templates/configmap.yaml new file mode 100644 index 0000000000..c9ae77aa1e --- /dev/null +++ b/operations/helm/tests/global-image-pullsecrets/alloy/templates/configmap.yaml @@ -0,0 +1,42 @@ +--- +# Source: alloy/templates/configmap.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +data: + config.river: |- + logging { + level = "info" + format = "logfmt" + } + + discovery.kubernetes "pods" { + role = "pod" + } + + discovery.kubernetes "nodes" { + role = "node" + } + + discovery.kubernetes "services" { + role = "service" + } + + discovery.kubernetes "endpoints" { + role = "endpoints" + } + + discovery.kubernetes "endpointslices" { + role = "endpointslice" + } + + discovery.kubernetes "ingresses" { + role = "ingress" + } diff --git a/operations/helm/tests/global-image-pullsecrets/grafana-agent/templates/controllers/daemonset.yaml b/operations/helm/tests/global-image-pullsecrets/alloy/templates/controllers/daemonset.yaml similarity index 63% rename from operations/helm/tests/global-image-pullsecrets/grafana-agent/templates/controllers/daemonset.yaml rename to operations/helm/tests/global-image-pullsecrets/alloy/templates/controllers/daemonset.yaml index 4b1470e1a8..7764c5c163 100644 --- a/operations/helm/tests/global-image-pullsecrets/grafana-agent/templates/controllers/daemonset.yaml +++ b/operations/helm/tests/global-image-pullsecrets/alloy/templates/controllers/daemonset.yaml @@ -1,48 +1,46 @@ --- -# Source: grafana-agent/templates/controllers/daemonset.yaml +# Source: alloy/templates/controllers/daemonset.yaml apiVersion: apps/v1 kind: DaemonSet metadata: - name: grafana-agent + name: alloy labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy app.kubernetes.io/version: "vX.Y.Z" app.kubernetes.io/managed-by: Helm spec: minReadySeconds: 10 selector: matchLabels: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy template: metadata: annotations: - kubectl.kubernetes.io/default-container: grafana-agent + kubectl.kubernetes.io/default-container: alloy labels: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy spec: securityContext: runAsGroup: 1000 runAsUser: 1000 - serviceAccountName: grafana-agent + serviceAccountName: alloy imagePullSecrets: - name: global-cred containers: - - name: grafana-agent - image: docker.io/grafana/agent:v0.40.2 + - name: alloy + image: docker.io/grafana/alloy:v1.0.0 imagePullPolicy: IfNotPresent args: - run - - /etc/agent/config.river - - --storage.path=/tmp/agent + - /etc/alloy/config.river + - --storage.path=/tmp/alloy - --server.http.listen-addr=0.0.0.0:80 - --server.http.ui-path-prefix=/ env: - - name: AGENT_MODE - value: flow - name: AGENT_DEPLOY_MODE value: "helm" - name: HOSTNAME @@ -61,15 +59,15 @@ spec: timeoutSeconds: 1 volumeMounts: - name: config - mountPath: /etc/agent + mountPath: /etc/alloy - name: config-reloader image: ghcr.io/jimmidyson/configmap-reload:v0.12.0 args: - - --volume-dir=/etc/agent + - --volume-dir=/etc/alloy - --webhook-url=http://localhost:80/-/reload volumeMounts: - name: config - mountPath: /etc/agent + mountPath: /etc/alloy resources: requests: cpu: 1m @@ -78,4 +76,4 @@ spec: volumes: - name: config configMap: - name: grafana-agent + name: alloy diff --git a/operations/helm/tests/global-image-pullsecrets/alloy/templates/rbac.yaml b/operations/helm/tests/global-image-pullsecrets/alloy/templates/rbac.yaml new file mode 100644 index 0000000000..53ca27544f --- /dev/null +++ b/operations/helm/tests/global-image-pullsecrets/alloy/templates/rbac.yaml @@ -0,0 +1,117 @@ +--- +# Source: alloy/templates/rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +rules: + # Rules which allow discovery.kubernetes to function. + - apiGroups: + - "" + - "discovery.k8s.io" + - "networking.k8s.io" + resources: + - endpoints + - endpointslices + - ingresses + - nodes + - nodes/proxy + - nodes/metrics + - pods + - services + verbs: + - get + - list + - watch + # Rules which allow loki.source.kubernetes and loki.source.podlogs to work. + - apiGroups: + - "" + resources: + - pods + - pods/log + - namespaces + verbs: + - get + - list + - watch + - apiGroups: + - "monitoring.grafana.com" + resources: + - podlogs + verbs: + - get + - list + - watch + # Rules which allow mimir.rules.kubernetes to work. + - apiGroups: ["monitoring.coreos.com"] + resources: + - prometheusrules + verbs: + - get + - list + - watch + - nonResourceURLs: + - /metrics + verbs: + - get + # Rules for prometheus.kubernetes.* + - apiGroups: ["monitoring.coreos.com"] + resources: + - podmonitors + - servicemonitors + - probes + verbs: + - get + - list + - watch + # Rules which allow eventhandler to work. + - apiGroups: + - "" + resources: + - events + verbs: + - get + - list + - watch + # needed for remote.kubernetes.* + - apiGroups: [""] + resources: + - "configmaps" + - "secrets" + verbs: + - get + - list + - watch + # needed for otelcol.processor.k8sattributes + - apiGroups: ["apps"] + resources: ["replicasets"] + verbs: ["get", "list", "watch"] + - apiGroups: ["extensions"] + resources: ["replicasets"] + verbs: ["get", "list", "watch"] +--- +# Source: alloy/templates/rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: alloy +subjects: + - kind: ServiceAccount + name: alloy + namespace: default diff --git a/operations/helm/tests/global-image-pullsecrets/alloy/templates/service.yaml b/operations/helm/tests/global-image-pullsecrets/alloy/templates/service.yaml new file mode 100644 index 0000000000..34c0608fd3 --- /dev/null +++ b/operations/helm/tests/global-image-pullsecrets/alloy/templates/service.yaml @@ -0,0 +1,23 @@ +--- +# Source: alloy/templates/service.yaml +apiVersion: v1 +kind: Service +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +spec: + type: ClusterIP + selector: + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + internalTrafficPolicy: Cluster + ports: + - name: http-metrics + port: 80 + targetPort: 80 + protocol: "TCP" diff --git a/operations/helm/tests/global-image-pullsecrets/alloy/templates/serviceaccount.yaml b/operations/helm/tests/global-image-pullsecrets/alloy/templates/serviceaccount.yaml new file mode 100644 index 0000000000..46df991efb --- /dev/null +++ b/operations/helm/tests/global-image-pullsecrets/alloy/templates/serviceaccount.yaml @@ -0,0 +1,13 @@ +--- +# Source: alloy/templates/serviceaccount.yaml +apiVersion: v1 +kind: ServiceAccount +metadata: + name: alloy + namespace: default + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm diff --git a/operations/helm/tests/global-image-pullsecrets/grafana-agent/templates/configmap.yaml b/operations/helm/tests/global-image-pullsecrets/grafana-agent/templates/configmap.yaml deleted file mode 100644 index 2fdc6f0117..0000000000 --- a/operations/helm/tests/global-image-pullsecrets/grafana-agent/templates/configmap.yaml +++ /dev/null @@ -1,42 +0,0 @@ ---- -# Source: grafana-agent/templates/configmap.yaml -apiVersion: v1 -kind: ConfigMap -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -data: - config.river: |- - logging { - level = "info" - format = "logfmt" - } - - discovery.kubernetes "pods" { - role = "pod" - } - - discovery.kubernetes "nodes" { - role = "node" - } - - discovery.kubernetes "services" { - role = "service" - } - - discovery.kubernetes "endpoints" { - role = "endpoints" - } - - discovery.kubernetes "endpointslices" { - role = "endpointslice" - } - - discovery.kubernetes "ingresses" { - role = "ingress" - } diff --git a/operations/helm/tests/global-image-pullsecrets/grafana-agent/templates/rbac.yaml b/operations/helm/tests/global-image-pullsecrets/grafana-agent/templates/rbac.yaml deleted file mode 100644 index 3765583fb6..0000000000 --- a/operations/helm/tests/global-image-pullsecrets/grafana-agent/templates/rbac.yaml +++ /dev/null @@ -1,117 +0,0 @@ ---- -# Source: grafana-agent/templates/rbac.yaml -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -rules: - # Rules which allow discovery.kubernetes to function. - - apiGroups: - - "" - - "discovery.k8s.io" - - "networking.k8s.io" - resources: - - endpoints - - endpointslices - - ingresses - - nodes - - nodes/proxy - - nodes/metrics - - pods - - services - verbs: - - get - - list - - watch - # Rules which allow loki.source.kubernetes and loki.source.podlogs to work. - - apiGroups: - - "" - resources: - - pods - - pods/log - - namespaces - verbs: - - get - - list - - watch - - apiGroups: - - "monitoring.grafana.com" - resources: - - podlogs - verbs: - - get - - list - - watch - # Rules which allow mimir.rules.kubernetes to work. - - apiGroups: ["monitoring.coreos.com"] - resources: - - prometheusrules - verbs: - - get - - list - - watch - - nonResourceURLs: - - /metrics - verbs: - - get - # Rules for prometheus.kubernetes.* - - apiGroups: ["monitoring.coreos.com"] - resources: - - podmonitors - - servicemonitors - - probes - verbs: - - get - - list - - watch - # Rules which allow eventhandler to work. - - apiGroups: - - "" - resources: - - events - verbs: - - get - - list - - watch - # needed for remote.kubernetes.* - - apiGroups: [""] - resources: - - "configmaps" - - "secrets" - verbs: - - get - - list - - watch - # needed for otelcol.processor.k8sattributes - - apiGroups: ["apps"] - resources: ["replicasets"] - verbs: ["get", "list", "watch"] - - apiGroups: ["extensions"] - resources: ["replicasets"] - verbs: ["get", "list", "watch"] ---- -# Source: grafana-agent/templates/rbac.yaml -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: grafana-agent -subjects: - - kind: ServiceAccount - name: grafana-agent - namespace: default diff --git a/operations/helm/tests/global-image-pullsecrets/grafana-agent/templates/service.yaml b/operations/helm/tests/global-image-pullsecrets/grafana-agent/templates/service.yaml deleted file mode 100644 index c98f79428b..0000000000 --- a/operations/helm/tests/global-image-pullsecrets/grafana-agent/templates/service.yaml +++ /dev/null @@ -1,23 +0,0 @@ ---- -# Source: grafana-agent/templates/service.yaml -apiVersion: v1 -kind: Service -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -spec: - type: ClusterIP - selector: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - internalTrafficPolicy: Cluster - ports: - - name: http-metrics - port: 80 - targetPort: 80 - protocol: "TCP" diff --git a/operations/helm/tests/global-image-pullsecrets/grafana-agent/templates/serviceaccount.yaml b/operations/helm/tests/global-image-pullsecrets/grafana-agent/templates/serviceaccount.yaml deleted file mode 100644 index 65d7e0df38..0000000000 --- a/operations/helm/tests/global-image-pullsecrets/grafana-agent/templates/serviceaccount.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -# Source: grafana-agent/templates/serviceaccount.yaml -apiVersion: v1 -kind: ServiceAccount -metadata: - name: grafana-agent - namespace: default - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm diff --git a/operations/helm/tests/global-image-registry/alloy/templates/configmap.yaml b/operations/helm/tests/global-image-registry/alloy/templates/configmap.yaml new file mode 100644 index 0000000000..c9ae77aa1e --- /dev/null +++ b/operations/helm/tests/global-image-registry/alloy/templates/configmap.yaml @@ -0,0 +1,42 @@ +--- +# Source: alloy/templates/configmap.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +data: + config.river: |- + logging { + level = "info" + format = "logfmt" + } + + discovery.kubernetes "pods" { + role = "pod" + } + + discovery.kubernetes "nodes" { + role = "node" + } + + discovery.kubernetes "services" { + role = "service" + } + + discovery.kubernetes "endpoints" { + role = "endpoints" + } + + discovery.kubernetes "endpointslices" { + role = "endpointslice" + } + + discovery.kubernetes "ingresses" { + role = "ingress" + } diff --git a/operations/helm/tests/global-image-registry/grafana-agent/templates/controllers/daemonset.yaml b/operations/helm/tests/global-image-registry/alloy/templates/controllers/daemonset.yaml similarity index 61% rename from operations/helm/tests/global-image-registry/grafana-agent/templates/controllers/daemonset.yaml rename to operations/helm/tests/global-image-registry/alloy/templates/controllers/daemonset.yaml index 2210cfb0ce..a6b6c4a8b7 100644 --- a/operations/helm/tests/global-image-registry/grafana-agent/templates/controllers/daemonset.yaml +++ b/operations/helm/tests/global-image-registry/alloy/templates/controllers/daemonset.yaml @@ -1,43 +1,41 @@ --- -# Source: grafana-agent/templates/controllers/daemonset.yaml +# Source: alloy/templates/controllers/daemonset.yaml apiVersion: apps/v1 kind: DaemonSet metadata: - name: grafana-agent + name: alloy labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy app.kubernetes.io/version: "vX.Y.Z" app.kubernetes.io/managed-by: Helm spec: minReadySeconds: 10 selector: matchLabels: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy template: metadata: annotations: - kubectl.kubernetes.io/default-container: grafana-agent + kubectl.kubernetes.io/default-container: alloy labels: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy spec: - serviceAccountName: grafana-agent + serviceAccountName: alloy containers: - - name: grafana-agent - image: quay.io/grafana/agent:v0.40.2 + - name: alloy + image: quay.io/grafana/alloy:v1.0.0 imagePullPolicy: IfNotPresent args: - run - - /etc/agent/config.river - - --storage.path=/tmp/agent + - /etc/alloy/config.river + - --storage.path=/tmp/alloy - --server.http.listen-addr=0.0.0.0:80 - --server.http.ui-path-prefix=/ env: - - name: AGENT_MODE - value: flow - name: AGENT_DEPLOY_MODE value: "helm" - name: HOSTNAME @@ -56,15 +54,15 @@ spec: timeoutSeconds: 1 volumeMounts: - name: config - mountPath: /etc/agent + mountPath: /etc/alloy - name: config-reloader image: quay.io/jimmidyson/configmap-reload:v0.12.0 args: - - --volume-dir=/etc/agent + - --volume-dir=/etc/alloy - --webhook-url=http://localhost:80/-/reload volumeMounts: - name: config - mountPath: /etc/agent + mountPath: /etc/alloy resources: requests: cpu: 1m @@ -73,4 +71,4 @@ spec: volumes: - name: config configMap: - name: grafana-agent + name: alloy diff --git a/operations/helm/tests/global-image-registry/alloy/templates/rbac.yaml b/operations/helm/tests/global-image-registry/alloy/templates/rbac.yaml new file mode 100644 index 0000000000..53ca27544f --- /dev/null +++ b/operations/helm/tests/global-image-registry/alloy/templates/rbac.yaml @@ -0,0 +1,117 @@ +--- +# Source: alloy/templates/rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +rules: + # Rules which allow discovery.kubernetes to function. + - apiGroups: + - "" + - "discovery.k8s.io" + - "networking.k8s.io" + resources: + - endpoints + - endpointslices + - ingresses + - nodes + - nodes/proxy + - nodes/metrics + - pods + - services + verbs: + - get + - list + - watch + # Rules which allow loki.source.kubernetes and loki.source.podlogs to work. + - apiGroups: + - "" + resources: + - pods + - pods/log + - namespaces + verbs: + - get + - list + - watch + - apiGroups: + - "monitoring.grafana.com" + resources: + - podlogs + verbs: + - get + - list + - watch + # Rules which allow mimir.rules.kubernetes to work. + - apiGroups: ["monitoring.coreos.com"] + resources: + - prometheusrules + verbs: + - get + - list + - watch + - nonResourceURLs: + - /metrics + verbs: + - get + # Rules for prometheus.kubernetes.* + - apiGroups: ["monitoring.coreos.com"] + resources: + - podmonitors + - servicemonitors + - probes + verbs: + - get + - list + - watch + # Rules which allow eventhandler to work. + - apiGroups: + - "" + resources: + - events + verbs: + - get + - list + - watch + # needed for remote.kubernetes.* + - apiGroups: [""] + resources: + - "configmaps" + - "secrets" + verbs: + - get + - list + - watch + # needed for otelcol.processor.k8sattributes + - apiGroups: ["apps"] + resources: ["replicasets"] + verbs: ["get", "list", "watch"] + - apiGroups: ["extensions"] + resources: ["replicasets"] + verbs: ["get", "list", "watch"] +--- +# Source: alloy/templates/rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: alloy +subjects: + - kind: ServiceAccount + name: alloy + namespace: default diff --git a/operations/helm/tests/global-image-registry/alloy/templates/service.yaml b/operations/helm/tests/global-image-registry/alloy/templates/service.yaml new file mode 100644 index 0000000000..34c0608fd3 --- /dev/null +++ b/operations/helm/tests/global-image-registry/alloy/templates/service.yaml @@ -0,0 +1,23 @@ +--- +# Source: alloy/templates/service.yaml +apiVersion: v1 +kind: Service +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +spec: + type: ClusterIP + selector: + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + internalTrafficPolicy: Cluster + ports: + - name: http-metrics + port: 80 + targetPort: 80 + protocol: "TCP" diff --git a/operations/helm/tests/global-image-registry/alloy/templates/serviceaccount.yaml b/operations/helm/tests/global-image-registry/alloy/templates/serviceaccount.yaml new file mode 100644 index 0000000000..46df991efb --- /dev/null +++ b/operations/helm/tests/global-image-registry/alloy/templates/serviceaccount.yaml @@ -0,0 +1,13 @@ +--- +# Source: alloy/templates/serviceaccount.yaml +apiVersion: v1 +kind: ServiceAccount +metadata: + name: alloy + namespace: default + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm diff --git a/operations/helm/tests/global-image-registry/grafana-agent/templates/configmap.yaml b/operations/helm/tests/global-image-registry/grafana-agent/templates/configmap.yaml deleted file mode 100644 index 2fdc6f0117..0000000000 --- a/operations/helm/tests/global-image-registry/grafana-agent/templates/configmap.yaml +++ /dev/null @@ -1,42 +0,0 @@ ---- -# Source: grafana-agent/templates/configmap.yaml -apiVersion: v1 -kind: ConfigMap -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -data: - config.river: |- - logging { - level = "info" - format = "logfmt" - } - - discovery.kubernetes "pods" { - role = "pod" - } - - discovery.kubernetes "nodes" { - role = "node" - } - - discovery.kubernetes "services" { - role = "service" - } - - discovery.kubernetes "endpoints" { - role = "endpoints" - } - - discovery.kubernetes "endpointslices" { - role = "endpointslice" - } - - discovery.kubernetes "ingresses" { - role = "ingress" - } diff --git a/operations/helm/tests/global-image-registry/grafana-agent/templates/rbac.yaml b/operations/helm/tests/global-image-registry/grafana-agent/templates/rbac.yaml deleted file mode 100644 index 3765583fb6..0000000000 --- a/operations/helm/tests/global-image-registry/grafana-agent/templates/rbac.yaml +++ /dev/null @@ -1,117 +0,0 @@ ---- -# Source: grafana-agent/templates/rbac.yaml -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -rules: - # Rules which allow discovery.kubernetes to function. - - apiGroups: - - "" - - "discovery.k8s.io" - - "networking.k8s.io" - resources: - - endpoints - - endpointslices - - ingresses - - nodes - - nodes/proxy - - nodes/metrics - - pods - - services - verbs: - - get - - list - - watch - # Rules which allow loki.source.kubernetes and loki.source.podlogs to work. - - apiGroups: - - "" - resources: - - pods - - pods/log - - namespaces - verbs: - - get - - list - - watch - - apiGroups: - - "monitoring.grafana.com" - resources: - - podlogs - verbs: - - get - - list - - watch - # Rules which allow mimir.rules.kubernetes to work. - - apiGroups: ["monitoring.coreos.com"] - resources: - - prometheusrules - verbs: - - get - - list - - watch - - nonResourceURLs: - - /metrics - verbs: - - get - # Rules for prometheus.kubernetes.* - - apiGroups: ["monitoring.coreos.com"] - resources: - - podmonitors - - servicemonitors - - probes - verbs: - - get - - list - - watch - # Rules which allow eventhandler to work. - - apiGroups: - - "" - resources: - - events - verbs: - - get - - list - - watch - # needed for remote.kubernetes.* - - apiGroups: [""] - resources: - - "configmaps" - - "secrets" - verbs: - - get - - list - - watch - # needed for otelcol.processor.k8sattributes - - apiGroups: ["apps"] - resources: ["replicasets"] - verbs: ["get", "list", "watch"] - - apiGroups: ["extensions"] - resources: ["replicasets"] - verbs: ["get", "list", "watch"] ---- -# Source: grafana-agent/templates/rbac.yaml -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: grafana-agent -subjects: - - kind: ServiceAccount - name: grafana-agent - namespace: default diff --git a/operations/helm/tests/global-image-registry/grafana-agent/templates/service.yaml b/operations/helm/tests/global-image-registry/grafana-agent/templates/service.yaml deleted file mode 100644 index c98f79428b..0000000000 --- a/operations/helm/tests/global-image-registry/grafana-agent/templates/service.yaml +++ /dev/null @@ -1,23 +0,0 @@ ---- -# Source: grafana-agent/templates/service.yaml -apiVersion: v1 -kind: Service -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -spec: - type: ClusterIP - selector: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - internalTrafficPolicy: Cluster - ports: - - name: http-metrics - port: 80 - targetPort: 80 - protocol: "TCP" diff --git a/operations/helm/tests/global-image-registry/grafana-agent/templates/serviceaccount.yaml b/operations/helm/tests/global-image-registry/grafana-agent/templates/serviceaccount.yaml deleted file mode 100644 index 65d7e0df38..0000000000 --- a/operations/helm/tests/global-image-registry/grafana-agent/templates/serviceaccount.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -# Source: grafana-agent/templates/serviceaccount.yaml -apiVersion: v1 -kind: ServiceAccount -metadata: - name: grafana-agent - namespace: default - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm diff --git a/operations/helm/tests/initcontainers/alloy/templates/configmap.yaml b/operations/helm/tests/initcontainers/alloy/templates/configmap.yaml new file mode 100644 index 0000000000..c9ae77aa1e --- /dev/null +++ b/operations/helm/tests/initcontainers/alloy/templates/configmap.yaml @@ -0,0 +1,42 @@ +--- +# Source: alloy/templates/configmap.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +data: + config.river: |- + logging { + level = "info" + format = "logfmt" + } + + discovery.kubernetes "pods" { + role = "pod" + } + + discovery.kubernetes "nodes" { + role = "node" + } + + discovery.kubernetes "services" { + role = "service" + } + + discovery.kubernetes "endpoints" { + role = "endpoints" + } + + discovery.kubernetes "endpointslices" { + role = "endpointslice" + } + + discovery.kubernetes "ingresses" { + role = "ingress" + } diff --git a/operations/helm/tests/initcontainers/grafana-agent/templates/controllers/daemonset.yaml b/operations/helm/tests/initcontainers/alloy/templates/controllers/daemonset.yaml similarity index 71% rename from operations/helm/tests/initcontainers/grafana-agent/templates/controllers/daemonset.yaml rename to operations/helm/tests/initcontainers/alloy/templates/controllers/daemonset.yaml index 9523a2b09b..7ec77a461f 100644 --- a/operations/helm/tests/initcontainers/grafana-agent/templates/controllers/daemonset.yaml +++ b/operations/helm/tests/initcontainers/alloy/templates/controllers/daemonset.yaml @@ -1,30 +1,30 @@ --- -# Source: grafana-agent/templates/controllers/daemonset.yaml +# Source: alloy/templates/controllers/daemonset.yaml apiVersion: apps/v1 kind: DaemonSet metadata: - name: grafana-agent + name: alloy labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy app.kubernetes.io/version: "vX.Y.Z" app.kubernetes.io/managed-by: Helm spec: minReadySeconds: 10 selector: matchLabels: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy template: metadata: annotations: - kubectl.kubernetes.io/default-container: grafana-agent + kubectl.kubernetes.io/default-container: alloy labels: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy spec: - serviceAccountName: grafana-agent + serviceAccountName: alloy initContainers: - env: - name: GEOIPUPDATE_ACCOUNT_ID @@ -44,18 +44,16 @@ spec: - emptyDir: {} name: geoip containers: - - name: grafana-agent - image: docker.io/grafana/agent:v0.40.2 + - name: alloy + image: docker.io/grafana/alloy:v1.0.0 imagePullPolicy: IfNotPresent args: - run - - /etc/agent/config.river - - --storage.path=/tmp/agent + - /etc/alloy/config.river + - --storage.path=/tmp/alloy - --server.http.listen-addr=0.0.0.0:80 - --server.http.ui-path-prefix=/ env: - - name: AGENT_MODE - value: flow - name: AGENT_DEPLOY_MODE value: "helm" - name: HOSTNAME @@ -74,18 +72,18 @@ spec: timeoutSeconds: 1 volumeMounts: - name: config - mountPath: /etc/agent + mountPath: /etc/alloy - mountPath: /etc/geoip name: geoip - name: config-reloader image: ghcr.io/jimmidyson/configmap-reload:v0.12.0 args: - - --volume-dir=/etc/agent + - --volume-dir=/etc/alloy - --webhook-url=http://localhost:80/-/reload volumeMounts: - name: config - mountPath: /etc/agent + mountPath: /etc/alloy resources: requests: cpu: 1m @@ -94,6 +92,6 @@ spec: volumes: - name: config configMap: - name: grafana-agent + name: alloy - mountPath: /etc/geoip name: geoip diff --git a/operations/helm/tests/initcontainers/alloy/templates/rbac.yaml b/operations/helm/tests/initcontainers/alloy/templates/rbac.yaml new file mode 100644 index 0000000000..53ca27544f --- /dev/null +++ b/operations/helm/tests/initcontainers/alloy/templates/rbac.yaml @@ -0,0 +1,117 @@ +--- +# Source: alloy/templates/rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +rules: + # Rules which allow discovery.kubernetes to function. + - apiGroups: + - "" + - "discovery.k8s.io" + - "networking.k8s.io" + resources: + - endpoints + - endpointslices + - ingresses + - nodes + - nodes/proxy + - nodes/metrics + - pods + - services + verbs: + - get + - list + - watch + # Rules which allow loki.source.kubernetes and loki.source.podlogs to work. + - apiGroups: + - "" + resources: + - pods + - pods/log + - namespaces + verbs: + - get + - list + - watch + - apiGroups: + - "monitoring.grafana.com" + resources: + - podlogs + verbs: + - get + - list + - watch + # Rules which allow mimir.rules.kubernetes to work. + - apiGroups: ["monitoring.coreos.com"] + resources: + - prometheusrules + verbs: + - get + - list + - watch + - nonResourceURLs: + - /metrics + verbs: + - get + # Rules for prometheus.kubernetes.* + - apiGroups: ["monitoring.coreos.com"] + resources: + - podmonitors + - servicemonitors + - probes + verbs: + - get + - list + - watch + # Rules which allow eventhandler to work. + - apiGroups: + - "" + resources: + - events + verbs: + - get + - list + - watch + # needed for remote.kubernetes.* + - apiGroups: [""] + resources: + - "configmaps" + - "secrets" + verbs: + - get + - list + - watch + # needed for otelcol.processor.k8sattributes + - apiGroups: ["apps"] + resources: ["replicasets"] + verbs: ["get", "list", "watch"] + - apiGroups: ["extensions"] + resources: ["replicasets"] + verbs: ["get", "list", "watch"] +--- +# Source: alloy/templates/rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: alloy +subjects: + - kind: ServiceAccount + name: alloy + namespace: default diff --git a/operations/helm/tests/initcontainers/alloy/templates/service.yaml b/operations/helm/tests/initcontainers/alloy/templates/service.yaml new file mode 100644 index 0000000000..34c0608fd3 --- /dev/null +++ b/operations/helm/tests/initcontainers/alloy/templates/service.yaml @@ -0,0 +1,23 @@ +--- +# Source: alloy/templates/service.yaml +apiVersion: v1 +kind: Service +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +spec: + type: ClusterIP + selector: + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + internalTrafficPolicy: Cluster + ports: + - name: http-metrics + port: 80 + targetPort: 80 + protocol: "TCP" diff --git a/operations/helm/tests/initcontainers/alloy/templates/serviceaccount.yaml b/operations/helm/tests/initcontainers/alloy/templates/serviceaccount.yaml new file mode 100644 index 0000000000..46df991efb --- /dev/null +++ b/operations/helm/tests/initcontainers/alloy/templates/serviceaccount.yaml @@ -0,0 +1,13 @@ +--- +# Source: alloy/templates/serviceaccount.yaml +apiVersion: v1 +kind: ServiceAccount +metadata: + name: alloy + namespace: default + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm diff --git a/operations/helm/tests/initcontainers/grafana-agent/templates/configmap.yaml b/operations/helm/tests/initcontainers/grafana-agent/templates/configmap.yaml deleted file mode 100644 index 2fdc6f0117..0000000000 --- a/operations/helm/tests/initcontainers/grafana-agent/templates/configmap.yaml +++ /dev/null @@ -1,42 +0,0 @@ ---- -# Source: grafana-agent/templates/configmap.yaml -apiVersion: v1 -kind: ConfigMap -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -data: - config.river: |- - logging { - level = "info" - format = "logfmt" - } - - discovery.kubernetes "pods" { - role = "pod" - } - - discovery.kubernetes "nodes" { - role = "node" - } - - discovery.kubernetes "services" { - role = "service" - } - - discovery.kubernetes "endpoints" { - role = "endpoints" - } - - discovery.kubernetes "endpointslices" { - role = "endpointslice" - } - - discovery.kubernetes "ingresses" { - role = "ingress" - } diff --git a/operations/helm/tests/initcontainers/grafana-agent/templates/rbac.yaml b/operations/helm/tests/initcontainers/grafana-agent/templates/rbac.yaml deleted file mode 100644 index 3765583fb6..0000000000 --- a/operations/helm/tests/initcontainers/grafana-agent/templates/rbac.yaml +++ /dev/null @@ -1,117 +0,0 @@ ---- -# Source: grafana-agent/templates/rbac.yaml -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -rules: - # Rules which allow discovery.kubernetes to function. - - apiGroups: - - "" - - "discovery.k8s.io" - - "networking.k8s.io" - resources: - - endpoints - - endpointslices - - ingresses - - nodes - - nodes/proxy - - nodes/metrics - - pods - - services - verbs: - - get - - list - - watch - # Rules which allow loki.source.kubernetes and loki.source.podlogs to work. - - apiGroups: - - "" - resources: - - pods - - pods/log - - namespaces - verbs: - - get - - list - - watch - - apiGroups: - - "monitoring.grafana.com" - resources: - - podlogs - verbs: - - get - - list - - watch - # Rules which allow mimir.rules.kubernetes to work. - - apiGroups: ["monitoring.coreos.com"] - resources: - - prometheusrules - verbs: - - get - - list - - watch - - nonResourceURLs: - - /metrics - verbs: - - get - # Rules for prometheus.kubernetes.* - - apiGroups: ["monitoring.coreos.com"] - resources: - - podmonitors - - servicemonitors - - probes - verbs: - - get - - list - - watch - # Rules which allow eventhandler to work. - - apiGroups: - - "" - resources: - - events - verbs: - - get - - list - - watch - # needed for remote.kubernetes.* - - apiGroups: [""] - resources: - - "configmaps" - - "secrets" - verbs: - - get - - list - - watch - # needed for otelcol.processor.k8sattributes - - apiGroups: ["apps"] - resources: ["replicasets"] - verbs: ["get", "list", "watch"] - - apiGroups: ["extensions"] - resources: ["replicasets"] - verbs: ["get", "list", "watch"] ---- -# Source: grafana-agent/templates/rbac.yaml -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: grafana-agent -subjects: - - kind: ServiceAccount - name: grafana-agent - namespace: default diff --git a/operations/helm/tests/initcontainers/grafana-agent/templates/service.yaml b/operations/helm/tests/initcontainers/grafana-agent/templates/service.yaml deleted file mode 100644 index c98f79428b..0000000000 --- a/operations/helm/tests/initcontainers/grafana-agent/templates/service.yaml +++ /dev/null @@ -1,23 +0,0 @@ ---- -# Source: grafana-agent/templates/service.yaml -apiVersion: v1 -kind: Service -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -spec: - type: ClusterIP - selector: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - internalTrafficPolicy: Cluster - ports: - - name: http-metrics - port: 80 - targetPort: 80 - protocol: "TCP" diff --git a/operations/helm/tests/initcontainers/grafana-agent/templates/serviceaccount.yaml b/operations/helm/tests/initcontainers/grafana-agent/templates/serviceaccount.yaml deleted file mode 100644 index 65d7e0df38..0000000000 --- a/operations/helm/tests/initcontainers/grafana-agent/templates/serviceaccount.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -# Source: grafana-agent/templates/serviceaccount.yaml -apiVersion: v1 -kind: ServiceAccount -metadata: - name: grafana-agent - namespace: default - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm diff --git a/operations/helm/tests/local-image-pullsecrets/alloy/templates/configmap.yaml b/operations/helm/tests/local-image-pullsecrets/alloy/templates/configmap.yaml new file mode 100644 index 0000000000..c9ae77aa1e --- /dev/null +++ b/operations/helm/tests/local-image-pullsecrets/alloy/templates/configmap.yaml @@ -0,0 +1,42 @@ +--- +# Source: alloy/templates/configmap.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +data: + config.river: |- + logging { + level = "info" + format = "logfmt" + } + + discovery.kubernetes "pods" { + role = "pod" + } + + discovery.kubernetes "nodes" { + role = "node" + } + + discovery.kubernetes "services" { + role = "service" + } + + discovery.kubernetes "endpoints" { + role = "endpoints" + } + + discovery.kubernetes "endpointslices" { + role = "endpointslice" + } + + discovery.kubernetes "ingresses" { + role = "ingress" + } diff --git a/operations/helm/tests/local-image-pullsecrets/grafana-agent/templates/controllers/daemonset.yaml b/operations/helm/tests/local-image-pullsecrets/alloy/templates/controllers/daemonset.yaml similarity index 62% rename from operations/helm/tests/local-image-pullsecrets/grafana-agent/templates/controllers/daemonset.yaml rename to operations/helm/tests/local-image-pullsecrets/alloy/templates/controllers/daemonset.yaml index e0a94d77b2..a33405935e 100644 --- a/operations/helm/tests/local-image-pullsecrets/grafana-agent/templates/controllers/daemonset.yaml +++ b/operations/helm/tests/local-image-pullsecrets/alloy/templates/controllers/daemonset.yaml @@ -1,45 +1,43 @@ --- -# Source: grafana-agent/templates/controllers/daemonset.yaml +# Source: alloy/templates/controllers/daemonset.yaml apiVersion: apps/v1 kind: DaemonSet metadata: - name: grafana-agent + name: alloy labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy app.kubernetes.io/version: "vX.Y.Z" app.kubernetes.io/managed-by: Helm spec: minReadySeconds: 10 selector: matchLabels: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy template: metadata: annotations: - kubectl.kubernetes.io/default-container: grafana-agent + kubectl.kubernetes.io/default-container: alloy labels: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy spec: - serviceAccountName: grafana-agent + serviceAccountName: alloy imagePullSecrets: - name: local-cred containers: - - name: grafana-agent - image: docker.io/grafana/agent:v0.40.2 + - name: alloy + image: docker.io/grafana/alloy:v1.0.0 imagePullPolicy: IfNotPresent args: - run - - /etc/agent/config.river - - --storage.path=/tmp/agent + - /etc/alloy/config.river + - --storage.path=/tmp/alloy - --server.http.listen-addr=0.0.0.0:80 - --server.http.ui-path-prefix=/ env: - - name: AGENT_MODE - value: flow - name: AGENT_DEPLOY_MODE value: "helm" - name: HOSTNAME @@ -58,15 +56,15 @@ spec: timeoutSeconds: 1 volumeMounts: - name: config - mountPath: /etc/agent + mountPath: /etc/alloy - name: config-reloader image: ghcr.io/jimmidyson/configmap-reload:v0.12.0 args: - - --volume-dir=/etc/agent + - --volume-dir=/etc/alloy - --webhook-url=http://localhost:80/-/reload volumeMounts: - name: config - mountPath: /etc/agent + mountPath: /etc/alloy resources: requests: cpu: 1m @@ -75,4 +73,4 @@ spec: volumes: - name: config configMap: - name: grafana-agent + name: alloy diff --git a/operations/helm/tests/local-image-pullsecrets/alloy/templates/rbac.yaml b/operations/helm/tests/local-image-pullsecrets/alloy/templates/rbac.yaml new file mode 100644 index 0000000000..53ca27544f --- /dev/null +++ b/operations/helm/tests/local-image-pullsecrets/alloy/templates/rbac.yaml @@ -0,0 +1,117 @@ +--- +# Source: alloy/templates/rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +rules: + # Rules which allow discovery.kubernetes to function. + - apiGroups: + - "" + - "discovery.k8s.io" + - "networking.k8s.io" + resources: + - endpoints + - endpointslices + - ingresses + - nodes + - nodes/proxy + - nodes/metrics + - pods + - services + verbs: + - get + - list + - watch + # Rules which allow loki.source.kubernetes and loki.source.podlogs to work. + - apiGroups: + - "" + resources: + - pods + - pods/log + - namespaces + verbs: + - get + - list + - watch + - apiGroups: + - "monitoring.grafana.com" + resources: + - podlogs + verbs: + - get + - list + - watch + # Rules which allow mimir.rules.kubernetes to work. + - apiGroups: ["monitoring.coreos.com"] + resources: + - prometheusrules + verbs: + - get + - list + - watch + - nonResourceURLs: + - /metrics + verbs: + - get + # Rules for prometheus.kubernetes.* + - apiGroups: ["monitoring.coreos.com"] + resources: + - podmonitors + - servicemonitors + - probes + verbs: + - get + - list + - watch + # Rules which allow eventhandler to work. + - apiGroups: + - "" + resources: + - events + verbs: + - get + - list + - watch + # needed for remote.kubernetes.* + - apiGroups: [""] + resources: + - "configmaps" + - "secrets" + verbs: + - get + - list + - watch + # needed for otelcol.processor.k8sattributes + - apiGroups: ["apps"] + resources: ["replicasets"] + verbs: ["get", "list", "watch"] + - apiGroups: ["extensions"] + resources: ["replicasets"] + verbs: ["get", "list", "watch"] +--- +# Source: alloy/templates/rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: alloy +subjects: + - kind: ServiceAccount + name: alloy + namespace: default diff --git a/operations/helm/tests/local-image-pullsecrets/alloy/templates/service.yaml b/operations/helm/tests/local-image-pullsecrets/alloy/templates/service.yaml new file mode 100644 index 0000000000..34c0608fd3 --- /dev/null +++ b/operations/helm/tests/local-image-pullsecrets/alloy/templates/service.yaml @@ -0,0 +1,23 @@ +--- +# Source: alloy/templates/service.yaml +apiVersion: v1 +kind: Service +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +spec: + type: ClusterIP + selector: + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + internalTrafficPolicy: Cluster + ports: + - name: http-metrics + port: 80 + targetPort: 80 + protocol: "TCP" diff --git a/operations/helm/tests/local-image-pullsecrets/alloy/templates/serviceaccount.yaml b/operations/helm/tests/local-image-pullsecrets/alloy/templates/serviceaccount.yaml new file mode 100644 index 0000000000..46df991efb --- /dev/null +++ b/operations/helm/tests/local-image-pullsecrets/alloy/templates/serviceaccount.yaml @@ -0,0 +1,13 @@ +--- +# Source: alloy/templates/serviceaccount.yaml +apiVersion: v1 +kind: ServiceAccount +metadata: + name: alloy + namespace: default + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm diff --git a/operations/helm/tests/local-image-pullsecrets/grafana-agent/templates/configmap.yaml b/operations/helm/tests/local-image-pullsecrets/grafana-agent/templates/configmap.yaml deleted file mode 100644 index 2fdc6f0117..0000000000 --- a/operations/helm/tests/local-image-pullsecrets/grafana-agent/templates/configmap.yaml +++ /dev/null @@ -1,42 +0,0 @@ ---- -# Source: grafana-agent/templates/configmap.yaml -apiVersion: v1 -kind: ConfigMap -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -data: - config.river: |- - logging { - level = "info" - format = "logfmt" - } - - discovery.kubernetes "pods" { - role = "pod" - } - - discovery.kubernetes "nodes" { - role = "node" - } - - discovery.kubernetes "services" { - role = "service" - } - - discovery.kubernetes "endpoints" { - role = "endpoints" - } - - discovery.kubernetes "endpointslices" { - role = "endpointslice" - } - - discovery.kubernetes "ingresses" { - role = "ingress" - } diff --git a/operations/helm/tests/local-image-pullsecrets/grafana-agent/templates/rbac.yaml b/operations/helm/tests/local-image-pullsecrets/grafana-agent/templates/rbac.yaml deleted file mode 100644 index 3765583fb6..0000000000 --- a/operations/helm/tests/local-image-pullsecrets/grafana-agent/templates/rbac.yaml +++ /dev/null @@ -1,117 +0,0 @@ ---- -# Source: grafana-agent/templates/rbac.yaml -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -rules: - # Rules which allow discovery.kubernetes to function. - - apiGroups: - - "" - - "discovery.k8s.io" - - "networking.k8s.io" - resources: - - endpoints - - endpointslices - - ingresses - - nodes - - nodes/proxy - - nodes/metrics - - pods - - services - verbs: - - get - - list - - watch - # Rules which allow loki.source.kubernetes and loki.source.podlogs to work. - - apiGroups: - - "" - resources: - - pods - - pods/log - - namespaces - verbs: - - get - - list - - watch - - apiGroups: - - "monitoring.grafana.com" - resources: - - podlogs - verbs: - - get - - list - - watch - # Rules which allow mimir.rules.kubernetes to work. - - apiGroups: ["monitoring.coreos.com"] - resources: - - prometheusrules - verbs: - - get - - list - - watch - - nonResourceURLs: - - /metrics - verbs: - - get - # Rules for prometheus.kubernetes.* - - apiGroups: ["monitoring.coreos.com"] - resources: - - podmonitors - - servicemonitors - - probes - verbs: - - get - - list - - watch - # Rules which allow eventhandler to work. - - apiGroups: - - "" - resources: - - events - verbs: - - get - - list - - watch - # needed for remote.kubernetes.* - - apiGroups: [""] - resources: - - "configmaps" - - "secrets" - verbs: - - get - - list - - watch - # needed for otelcol.processor.k8sattributes - - apiGroups: ["apps"] - resources: ["replicasets"] - verbs: ["get", "list", "watch"] - - apiGroups: ["extensions"] - resources: ["replicasets"] - verbs: ["get", "list", "watch"] ---- -# Source: grafana-agent/templates/rbac.yaml -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: grafana-agent -subjects: - - kind: ServiceAccount - name: grafana-agent - namespace: default diff --git a/operations/helm/tests/local-image-pullsecrets/grafana-agent/templates/service.yaml b/operations/helm/tests/local-image-pullsecrets/grafana-agent/templates/service.yaml deleted file mode 100644 index c98f79428b..0000000000 --- a/operations/helm/tests/local-image-pullsecrets/grafana-agent/templates/service.yaml +++ /dev/null @@ -1,23 +0,0 @@ ---- -# Source: grafana-agent/templates/service.yaml -apiVersion: v1 -kind: Service -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -spec: - type: ClusterIP - selector: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - internalTrafficPolicy: Cluster - ports: - - name: http-metrics - port: 80 - targetPort: 80 - protocol: "TCP" diff --git a/operations/helm/tests/local-image-pullsecrets/grafana-agent/templates/serviceaccount.yaml b/operations/helm/tests/local-image-pullsecrets/grafana-agent/templates/serviceaccount.yaml deleted file mode 100644 index 65d7e0df38..0000000000 --- a/operations/helm/tests/local-image-pullsecrets/grafana-agent/templates/serviceaccount.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -# Source: grafana-agent/templates/serviceaccount.yaml -apiVersion: v1 -kind: ServiceAccount -metadata: - name: grafana-agent - namespace: default - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm diff --git a/operations/helm/tests/local-image-registry/alloy/templates/configmap.yaml b/operations/helm/tests/local-image-registry/alloy/templates/configmap.yaml new file mode 100644 index 0000000000..c9ae77aa1e --- /dev/null +++ b/operations/helm/tests/local-image-registry/alloy/templates/configmap.yaml @@ -0,0 +1,42 @@ +--- +# Source: alloy/templates/configmap.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +data: + config.river: |- + logging { + level = "info" + format = "logfmt" + } + + discovery.kubernetes "pods" { + role = "pod" + } + + discovery.kubernetes "nodes" { + role = "node" + } + + discovery.kubernetes "services" { + role = "service" + } + + discovery.kubernetes "endpoints" { + role = "endpoints" + } + + discovery.kubernetes "endpointslices" { + role = "endpointslice" + } + + discovery.kubernetes "ingresses" { + role = "ingress" + } diff --git a/operations/helm/tests/local-image-registry/grafana-agent/templates/controllers/daemonset.yaml b/operations/helm/tests/local-image-registry/alloy/templates/controllers/daemonset.yaml similarity index 61% rename from operations/helm/tests/local-image-registry/grafana-agent/templates/controllers/daemonset.yaml rename to operations/helm/tests/local-image-registry/alloy/templates/controllers/daemonset.yaml index 2210cfb0ce..a6b6c4a8b7 100644 --- a/operations/helm/tests/local-image-registry/grafana-agent/templates/controllers/daemonset.yaml +++ b/operations/helm/tests/local-image-registry/alloy/templates/controllers/daemonset.yaml @@ -1,43 +1,41 @@ --- -# Source: grafana-agent/templates/controllers/daemonset.yaml +# Source: alloy/templates/controllers/daemonset.yaml apiVersion: apps/v1 kind: DaemonSet metadata: - name: grafana-agent + name: alloy labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy app.kubernetes.io/version: "vX.Y.Z" app.kubernetes.io/managed-by: Helm spec: minReadySeconds: 10 selector: matchLabels: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy template: metadata: annotations: - kubectl.kubernetes.io/default-container: grafana-agent + kubectl.kubernetes.io/default-container: alloy labels: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy spec: - serviceAccountName: grafana-agent + serviceAccountName: alloy containers: - - name: grafana-agent - image: quay.io/grafana/agent:v0.40.2 + - name: alloy + image: quay.io/grafana/alloy:v1.0.0 imagePullPolicy: IfNotPresent args: - run - - /etc/agent/config.river - - --storage.path=/tmp/agent + - /etc/alloy/config.river + - --storage.path=/tmp/alloy - --server.http.listen-addr=0.0.0.0:80 - --server.http.ui-path-prefix=/ env: - - name: AGENT_MODE - value: flow - name: AGENT_DEPLOY_MODE value: "helm" - name: HOSTNAME @@ -56,15 +54,15 @@ spec: timeoutSeconds: 1 volumeMounts: - name: config - mountPath: /etc/agent + mountPath: /etc/alloy - name: config-reloader image: quay.io/jimmidyson/configmap-reload:v0.12.0 args: - - --volume-dir=/etc/agent + - --volume-dir=/etc/alloy - --webhook-url=http://localhost:80/-/reload volumeMounts: - name: config - mountPath: /etc/agent + mountPath: /etc/alloy resources: requests: cpu: 1m @@ -73,4 +71,4 @@ spec: volumes: - name: config configMap: - name: grafana-agent + name: alloy diff --git a/operations/helm/tests/local-image-registry/alloy/templates/rbac.yaml b/operations/helm/tests/local-image-registry/alloy/templates/rbac.yaml new file mode 100644 index 0000000000..53ca27544f --- /dev/null +++ b/operations/helm/tests/local-image-registry/alloy/templates/rbac.yaml @@ -0,0 +1,117 @@ +--- +# Source: alloy/templates/rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +rules: + # Rules which allow discovery.kubernetes to function. + - apiGroups: + - "" + - "discovery.k8s.io" + - "networking.k8s.io" + resources: + - endpoints + - endpointslices + - ingresses + - nodes + - nodes/proxy + - nodes/metrics + - pods + - services + verbs: + - get + - list + - watch + # Rules which allow loki.source.kubernetes and loki.source.podlogs to work. + - apiGroups: + - "" + resources: + - pods + - pods/log + - namespaces + verbs: + - get + - list + - watch + - apiGroups: + - "monitoring.grafana.com" + resources: + - podlogs + verbs: + - get + - list + - watch + # Rules which allow mimir.rules.kubernetes to work. + - apiGroups: ["monitoring.coreos.com"] + resources: + - prometheusrules + verbs: + - get + - list + - watch + - nonResourceURLs: + - /metrics + verbs: + - get + # Rules for prometheus.kubernetes.* + - apiGroups: ["monitoring.coreos.com"] + resources: + - podmonitors + - servicemonitors + - probes + verbs: + - get + - list + - watch + # Rules which allow eventhandler to work. + - apiGroups: + - "" + resources: + - events + verbs: + - get + - list + - watch + # needed for remote.kubernetes.* + - apiGroups: [""] + resources: + - "configmaps" + - "secrets" + verbs: + - get + - list + - watch + # needed for otelcol.processor.k8sattributes + - apiGroups: ["apps"] + resources: ["replicasets"] + verbs: ["get", "list", "watch"] + - apiGroups: ["extensions"] + resources: ["replicasets"] + verbs: ["get", "list", "watch"] +--- +# Source: alloy/templates/rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: alloy +subjects: + - kind: ServiceAccount + name: alloy + namespace: default diff --git a/operations/helm/tests/local-image-registry/alloy/templates/service.yaml b/operations/helm/tests/local-image-registry/alloy/templates/service.yaml new file mode 100644 index 0000000000..34c0608fd3 --- /dev/null +++ b/operations/helm/tests/local-image-registry/alloy/templates/service.yaml @@ -0,0 +1,23 @@ +--- +# Source: alloy/templates/service.yaml +apiVersion: v1 +kind: Service +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +spec: + type: ClusterIP + selector: + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + internalTrafficPolicy: Cluster + ports: + - name: http-metrics + port: 80 + targetPort: 80 + protocol: "TCP" diff --git a/operations/helm/tests/local-image-registry/alloy/templates/serviceaccount.yaml b/operations/helm/tests/local-image-registry/alloy/templates/serviceaccount.yaml new file mode 100644 index 0000000000..46df991efb --- /dev/null +++ b/operations/helm/tests/local-image-registry/alloy/templates/serviceaccount.yaml @@ -0,0 +1,13 @@ +--- +# Source: alloy/templates/serviceaccount.yaml +apiVersion: v1 +kind: ServiceAccount +metadata: + name: alloy + namespace: default + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm diff --git a/operations/helm/tests/local-image-registry/grafana-agent/templates/configmap.yaml b/operations/helm/tests/local-image-registry/grafana-agent/templates/configmap.yaml deleted file mode 100644 index 2fdc6f0117..0000000000 --- a/operations/helm/tests/local-image-registry/grafana-agent/templates/configmap.yaml +++ /dev/null @@ -1,42 +0,0 @@ ---- -# Source: grafana-agent/templates/configmap.yaml -apiVersion: v1 -kind: ConfigMap -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -data: - config.river: |- - logging { - level = "info" - format = "logfmt" - } - - discovery.kubernetes "pods" { - role = "pod" - } - - discovery.kubernetes "nodes" { - role = "node" - } - - discovery.kubernetes "services" { - role = "service" - } - - discovery.kubernetes "endpoints" { - role = "endpoints" - } - - discovery.kubernetes "endpointslices" { - role = "endpointslice" - } - - discovery.kubernetes "ingresses" { - role = "ingress" - } diff --git a/operations/helm/tests/local-image-registry/grafana-agent/templates/rbac.yaml b/operations/helm/tests/local-image-registry/grafana-agent/templates/rbac.yaml deleted file mode 100644 index 3765583fb6..0000000000 --- a/operations/helm/tests/local-image-registry/grafana-agent/templates/rbac.yaml +++ /dev/null @@ -1,117 +0,0 @@ ---- -# Source: grafana-agent/templates/rbac.yaml -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -rules: - # Rules which allow discovery.kubernetes to function. - - apiGroups: - - "" - - "discovery.k8s.io" - - "networking.k8s.io" - resources: - - endpoints - - endpointslices - - ingresses - - nodes - - nodes/proxy - - nodes/metrics - - pods - - services - verbs: - - get - - list - - watch - # Rules which allow loki.source.kubernetes and loki.source.podlogs to work. - - apiGroups: - - "" - resources: - - pods - - pods/log - - namespaces - verbs: - - get - - list - - watch - - apiGroups: - - "monitoring.grafana.com" - resources: - - podlogs - verbs: - - get - - list - - watch - # Rules which allow mimir.rules.kubernetes to work. - - apiGroups: ["monitoring.coreos.com"] - resources: - - prometheusrules - verbs: - - get - - list - - watch - - nonResourceURLs: - - /metrics - verbs: - - get - # Rules for prometheus.kubernetes.* - - apiGroups: ["monitoring.coreos.com"] - resources: - - podmonitors - - servicemonitors - - probes - verbs: - - get - - list - - watch - # Rules which allow eventhandler to work. - - apiGroups: - - "" - resources: - - events - verbs: - - get - - list - - watch - # needed for remote.kubernetes.* - - apiGroups: [""] - resources: - - "configmaps" - - "secrets" - verbs: - - get - - list - - watch - # needed for otelcol.processor.k8sattributes - - apiGroups: ["apps"] - resources: ["replicasets"] - verbs: ["get", "list", "watch"] - - apiGroups: ["extensions"] - resources: ["replicasets"] - verbs: ["get", "list", "watch"] ---- -# Source: grafana-agent/templates/rbac.yaml -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: grafana-agent -subjects: - - kind: ServiceAccount - name: grafana-agent - namespace: default diff --git a/operations/helm/tests/local-image-registry/grafana-agent/templates/service.yaml b/operations/helm/tests/local-image-registry/grafana-agent/templates/service.yaml deleted file mode 100644 index c98f79428b..0000000000 --- a/operations/helm/tests/local-image-registry/grafana-agent/templates/service.yaml +++ /dev/null @@ -1,23 +0,0 @@ ---- -# Source: grafana-agent/templates/service.yaml -apiVersion: v1 -kind: Service -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -spec: - type: ClusterIP - selector: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - internalTrafficPolicy: Cluster - ports: - - name: http-metrics - port: 80 - targetPort: 80 - protocol: "TCP" diff --git a/operations/helm/tests/local-image-registry/grafana-agent/templates/serviceaccount.yaml b/operations/helm/tests/local-image-registry/grafana-agent/templates/serviceaccount.yaml deleted file mode 100644 index 65d7e0df38..0000000000 --- a/operations/helm/tests/local-image-registry/grafana-agent/templates/serviceaccount.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -# Source: grafana-agent/templates/serviceaccount.yaml -apiVersion: v1 -kind: ServiceAccount -metadata: - name: grafana-agent - namespace: default - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm diff --git a/operations/helm/tests/nodeselectors-and-tolerations/alloy/templates/configmap.yaml b/operations/helm/tests/nodeselectors-and-tolerations/alloy/templates/configmap.yaml new file mode 100644 index 0000000000..c9ae77aa1e --- /dev/null +++ b/operations/helm/tests/nodeselectors-and-tolerations/alloy/templates/configmap.yaml @@ -0,0 +1,42 @@ +--- +# Source: alloy/templates/configmap.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +data: + config.river: |- + logging { + level = "info" + format = "logfmt" + } + + discovery.kubernetes "pods" { + role = "pod" + } + + discovery.kubernetes "nodes" { + role = "node" + } + + discovery.kubernetes "services" { + role = "service" + } + + discovery.kubernetes "endpoints" { + role = "endpoints" + } + + discovery.kubernetes "endpointslices" { + role = "endpointslice" + } + + discovery.kubernetes "ingresses" { + role = "ingress" + } diff --git a/operations/helm/tests/nodeselectors-and-tolerations/grafana-agent/templates/controllers/daemonset.yaml b/operations/helm/tests/nodeselectors-and-tolerations/alloy/templates/controllers/daemonset.yaml similarity index 65% rename from operations/helm/tests/nodeselectors-and-tolerations/grafana-agent/templates/controllers/daemonset.yaml rename to operations/helm/tests/nodeselectors-and-tolerations/alloy/templates/controllers/daemonset.yaml index 544681c5aa..308fa65407 100644 --- a/operations/helm/tests/nodeselectors-and-tolerations/grafana-agent/templates/controllers/daemonset.yaml +++ b/operations/helm/tests/nodeselectors-and-tolerations/alloy/templates/controllers/daemonset.yaml @@ -1,43 +1,41 @@ --- -# Source: grafana-agent/templates/controllers/daemonset.yaml +# Source: alloy/templates/controllers/daemonset.yaml apiVersion: apps/v1 kind: DaemonSet metadata: - name: grafana-agent + name: alloy labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy app.kubernetes.io/version: "vX.Y.Z" app.kubernetes.io/managed-by: Helm spec: minReadySeconds: 10 selector: matchLabels: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy template: metadata: annotations: - kubectl.kubernetes.io/default-container: grafana-agent + kubectl.kubernetes.io/default-container: alloy labels: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy spec: - serviceAccountName: grafana-agent + serviceAccountName: alloy containers: - - name: grafana-agent - image: docker.io/grafana/agent:v0.40.2 + - name: alloy + image: docker.io/grafana/alloy:v1.0.0 imagePullPolicy: IfNotPresent args: - run - - /etc/agent/config.river - - --storage.path=/tmp/agent + - /etc/alloy/config.river + - --storage.path=/tmp/alloy - --server.http.listen-addr=0.0.0.0:80 - --server.http.ui-path-prefix=/ env: - - name: AGENT_MODE - value: flow - name: AGENT_DEPLOY_MODE value: "helm" - name: HOSTNAME @@ -56,15 +54,15 @@ spec: timeoutSeconds: 1 volumeMounts: - name: config - mountPath: /etc/agent + mountPath: /etc/alloy - name: config-reloader image: ghcr.io/jimmidyson/configmap-reload:v0.12.0 args: - - --volume-dir=/etc/agent + - --volume-dir=/etc/alloy - --webhook-url=http://localhost:80/-/reload volumeMounts: - name: config - mountPath: /etc/agent + mountPath: /etc/alloy resources: requests: cpu: 1m @@ -83,4 +81,4 @@ spec: volumes: - name: config configMap: - name: grafana-agent + name: alloy diff --git a/operations/helm/tests/nodeselectors-and-tolerations/alloy/templates/rbac.yaml b/operations/helm/tests/nodeselectors-and-tolerations/alloy/templates/rbac.yaml new file mode 100644 index 0000000000..53ca27544f --- /dev/null +++ b/operations/helm/tests/nodeselectors-and-tolerations/alloy/templates/rbac.yaml @@ -0,0 +1,117 @@ +--- +# Source: alloy/templates/rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +rules: + # Rules which allow discovery.kubernetes to function. + - apiGroups: + - "" + - "discovery.k8s.io" + - "networking.k8s.io" + resources: + - endpoints + - endpointslices + - ingresses + - nodes + - nodes/proxy + - nodes/metrics + - pods + - services + verbs: + - get + - list + - watch + # Rules which allow loki.source.kubernetes and loki.source.podlogs to work. + - apiGroups: + - "" + resources: + - pods + - pods/log + - namespaces + verbs: + - get + - list + - watch + - apiGroups: + - "monitoring.grafana.com" + resources: + - podlogs + verbs: + - get + - list + - watch + # Rules which allow mimir.rules.kubernetes to work. + - apiGroups: ["monitoring.coreos.com"] + resources: + - prometheusrules + verbs: + - get + - list + - watch + - nonResourceURLs: + - /metrics + verbs: + - get + # Rules for prometheus.kubernetes.* + - apiGroups: ["monitoring.coreos.com"] + resources: + - podmonitors + - servicemonitors + - probes + verbs: + - get + - list + - watch + # Rules which allow eventhandler to work. + - apiGroups: + - "" + resources: + - events + verbs: + - get + - list + - watch + # needed for remote.kubernetes.* + - apiGroups: [""] + resources: + - "configmaps" + - "secrets" + verbs: + - get + - list + - watch + # needed for otelcol.processor.k8sattributes + - apiGroups: ["apps"] + resources: ["replicasets"] + verbs: ["get", "list", "watch"] + - apiGroups: ["extensions"] + resources: ["replicasets"] + verbs: ["get", "list", "watch"] +--- +# Source: alloy/templates/rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: alloy +subjects: + - kind: ServiceAccount + name: alloy + namespace: default diff --git a/operations/helm/tests/nodeselectors-and-tolerations/alloy/templates/service.yaml b/operations/helm/tests/nodeselectors-and-tolerations/alloy/templates/service.yaml new file mode 100644 index 0000000000..34c0608fd3 --- /dev/null +++ b/operations/helm/tests/nodeselectors-and-tolerations/alloy/templates/service.yaml @@ -0,0 +1,23 @@ +--- +# Source: alloy/templates/service.yaml +apiVersion: v1 +kind: Service +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +spec: + type: ClusterIP + selector: + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + internalTrafficPolicy: Cluster + ports: + - name: http-metrics + port: 80 + targetPort: 80 + protocol: "TCP" diff --git a/operations/helm/tests/nodeselectors-and-tolerations/alloy/templates/serviceaccount.yaml b/operations/helm/tests/nodeselectors-and-tolerations/alloy/templates/serviceaccount.yaml new file mode 100644 index 0000000000..46df991efb --- /dev/null +++ b/operations/helm/tests/nodeselectors-and-tolerations/alloy/templates/serviceaccount.yaml @@ -0,0 +1,13 @@ +--- +# Source: alloy/templates/serviceaccount.yaml +apiVersion: v1 +kind: ServiceAccount +metadata: + name: alloy + namespace: default + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm diff --git a/operations/helm/tests/nodeselectors-and-tolerations/grafana-agent/templates/configmap.yaml b/operations/helm/tests/nodeselectors-and-tolerations/grafana-agent/templates/configmap.yaml deleted file mode 100644 index 2fdc6f0117..0000000000 --- a/operations/helm/tests/nodeselectors-and-tolerations/grafana-agent/templates/configmap.yaml +++ /dev/null @@ -1,42 +0,0 @@ ---- -# Source: grafana-agent/templates/configmap.yaml -apiVersion: v1 -kind: ConfigMap -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -data: - config.river: |- - logging { - level = "info" - format = "logfmt" - } - - discovery.kubernetes "pods" { - role = "pod" - } - - discovery.kubernetes "nodes" { - role = "node" - } - - discovery.kubernetes "services" { - role = "service" - } - - discovery.kubernetes "endpoints" { - role = "endpoints" - } - - discovery.kubernetes "endpointslices" { - role = "endpointslice" - } - - discovery.kubernetes "ingresses" { - role = "ingress" - } diff --git a/operations/helm/tests/nodeselectors-and-tolerations/grafana-agent/templates/rbac.yaml b/operations/helm/tests/nodeselectors-and-tolerations/grafana-agent/templates/rbac.yaml deleted file mode 100644 index 3765583fb6..0000000000 --- a/operations/helm/tests/nodeselectors-and-tolerations/grafana-agent/templates/rbac.yaml +++ /dev/null @@ -1,117 +0,0 @@ ---- -# Source: grafana-agent/templates/rbac.yaml -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -rules: - # Rules which allow discovery.kubernetes to function. - - apiGroups: - - "" - - "discovery.k8s.io" - - "networking.k8s.io" - resources: - - endpoints - - endpointslices - - ingresses - - nodes - - nodes/proxy - - nodes/metrics - - pods - - services - verbs: - - get - - list - - watch - # Rules which allow loki.source.kubernetes and loki.source.podlogs to work. - - apiGroups: - - "" - resources: - - pods - - pods/log - - namespaces - verbs: - - get - - list - - watch - - apiGroups: - - "monitoring.grafana.com" - resources: - - podlogs - verbs: - - get - - list - - watch - # Rules which allow mimir.rules.kubernetes to work. - - apiGroups: ["monitoring.coreos.com"] - resources: - - prometheusrules - verbs: - - get - - list - - watch - - nonResourceURLs: - - /metrics - verbs: - - get - # Rules for prometheus.kubernetes.* - - apiGroups: ["monitoring.coreos.com"] - resources: - - podmonitors - - servicemonitors - - probes - verbs: - - get - - list - - watch - # Rules which allow eventhandler to work. - - apiGroups: - - "" - resources: - - events - verbs: - - get - - list - - watch - # needed for remote.kubernetes.* - - apiGroups: [""] - resources: - - "configmaps" - - "secrets" - verbs: - - get - - list - - watch - # needed for otelcol.processor.k8sattributes - - apiGroups: ["apps"] - resources: ["replicasets"] - verbs: ["get", "list", "watch"] - - apiGroups: ["extensions"] - resources: ["replicasets"] - verbs: ["get", "list", "watch"] ---- -# Source: grafana-agent/templates/rbac.yaml -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: grafana-agent -subjects: - - kind: ServiceAccount - name: grafana-agent - namespace: default diff --git a/operations/helm/tests/nodeselectors-and-tolerations/grafana-agent/templates/service.yaml b/operations/helm/tests/nodeselectors-and-tolerations/grafana-agent/templates/service.yaml deleted file mode 100644 index c98f79428b..0000000000 --- a/operations/helm/tests/nodeselectors-and-tolerations/grafana-agent/templates/service.yaml +++ /dev/null @@ -1,23 +0,0 @@ ---- -# Source: grafana-agent/templates/service.yaml -apiVersion: v1 -kind: Service -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -spec: - type: ClusterIP - selector: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - internalTrafficPolicy: Cluster - ports: - - name: http-metrics - port: 80 - targetPort: 80 - protocol: "TCP" diff --git a/operations/helm/tests/nodeselectors-and-tolerations/grafana-agent/templates/serviceaccount.yaml b/operations/helm/tests/nodeselectors-and-tolerations/grafana-agent/templates/serviceaccount.yaml deleted file mode 100644 index 65d7e0df38..0000000000 --- a/operations/helm/tests/nodeselectors-and-tolerations/grafana-agent/templates/serviceaccount.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -# Source: grafana-agent/templates/serviceaccount.yaml -apiVersion: v1 -kind: ServiceAccount -metadata: - name: grafana-agent - namespace: default - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm diff --git a/operations/helm/tests/pod_annotations/alloy/templates/configmap.yaml b/operations/helm/tests/pod_annotations/alloy/templates/configmap.yaml new file mode 100644 index 0000000000..c9ae77aa1e --- /dev/null +++ b/operations/helm/tests/pod_annotations/alloy/templates/configmap.yaml @@ -0,0 +1,42 @@ +--- +# Source: alloy/templates/configmap.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +data: + config.river: |- + logging { + level = "info" + format = "logfmt" + } + + discovery.kubernetes "pods" { + role = "pod" + } + + discovery.kubernetes "nodes" { + role = "node" + } + + discovery.kubernetes "services" { + role = "service" + } + + discovery.kubernetes "endpoints" { + role = "endpoints" + } + + discovery.kubernetes "endpointslices" { + role = "endpointslice" + } + + discovery.kubernetes "ingresses" { + role = "ingress" + } diff --git a/operations/helm/tests/pod_annotations/grafana-agent/templates/controllers/daemonset.yaml b/operations/helm/tests/pod_annotations/alloy/templates/controllers/daemonset.yaml similarity index 62% rename from operations/helm/tests/pod_annotations/grafana-agent/templates/controllers/daemonset.yaml rename to operations/helm/tests/pod_annotations/alloy/templates/controllers/daemonset.yaml index 34e0be4da1..c8e328b3d9 100644 --- a/operations/helm/tests/pod_annotations/grafana-agent/templates/controllers/daemonset.yaml +++ b/operations/helm/tests/pod_annotations/alloy/templates/controllers/daemonset.yaml @@ -1,44 +1,42 @@ --- -# Source: grafana-agent/templates/controllers/daemonset.yaml +# Source: alloy/templates/controllers/daemonset.yaml apiVersion: apps/v1 kind: DaemonSet metadata: - name: grafana-agent + name: alloy labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy app.kubernetes.io/version: "vX.Y.Z" app.kubernetes.io/managed-by: Helm spec: minReadySeconds: 10 selector: matchLabels: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy template: metadata: annotations: - kubectl.kubernetes.io/default-container: grafana-agent + kubectl.kubernetes.io/default-container: alloy testAnnotationKey: testAnnotationValue labels: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy spec: - serviceAccountName: grafana-agent + serviceAccountName: alloy containers: - - name: grafana-agent - image: docker.io/grafana/agent:v0.40.2 + - name: alloy + image: docker.io/grafana/alloy:v1.0.0 imagePullPolicy: IfNotPresent args: - run - - /etc/agent/config.river - - --storage.path=/tmp/agent + - /etc/alloy/config.river + - --storage.path=/tmp/alloy - --server.http.listen-addr=0.0.0.0:80 - --server.http.ui-path-prefix=/ env: - - name: AGENT_MODE - value: flow - name: AGENT_DEPLOY_MODE value: "helm" - name: HOSTNAME @@ -57,15 +55,15 @@ spec: timeoutSeconds: 1 volumeMounts: - name: config - mountPath: /etc/agent + mountPath: /etc/alloy - name: config-reloader image: ghcr.io/jimmidyson/configmap-reload:v0.12.0 args: - - --volume-dir=/etc/agent + - --volume-dir=/etc/alloy - --webhook-url=http://localhost:80/-/reload volumeMounts: - name: config - mountPath: /etc/agent + mountPath: /etc/alloy resources: requests: cpu: 1m @@ -74,4 +72,4 @@ spec: volumes: - name: config configMap: - name: grafana-agent + name: alloy diff --git a/operations/helm/tests/pod_annotations/alloy/templates/rbac.yaml b/operations/helm/tests/pod_annotations/alloy/templates/rbac.yaml new file mode 100644 index 0000000000..53ca27544f --- /dev/null +++ b/operations/helm/tests/pod_annotations/alloy/templates/rbac.yaml @@ -0,0 +1,117 @@ +--- +# Source: alloy/templates/rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +rules: + # Rules which allow discovery.kubernetes to function. + - apiGroups: + - "" + - "discovery.k8s.io" + - "networking.k8s.io" + resources: + - endpoints + - endpointslices + - ingresses + - nodes + - nodes/proxy + - nodes/metrics + - pods + - services + verbs: + - get + - list + - watch + # Rules which allow loki.source.kubernetes and loki.source.podlogs to work. + - apiGroups: + - "" + resources: + - pods + - pods/log + - namespaces + verbs: + - get + - list + - watch + - apiGroups: + - "monitoring.grafana.com" + resources: + - podlogs + verbs: + - get + - list + - watch + # Rules which allow mimir.rules.kubernetes to work. + - apiGroups: ["monitoring.coreos.com"] + resources: + - prometheusrules + verbs: + - get + - list + - watch + - nonResourceURLs: + - /metrics + verbs: + - get + # Rules for prometheus.kubernetes.* + - apiGroups: ["monitoring.coreos.com"] + resources: + - podmonitors + - servicemonitors + - probes + verbs: + - get + - list + - watch + # Rules which allow eventhandler to work. + - apiGroups: + - "" + resources: + - events + verbs: + - get + - list + - watch + # needed for remote.kubernetes.* + - apiGroups: [""] + resources: + - "configmaps" + - "secrets" + verbs: + - get + - list + - watch + # needed for otelcol.processor.k8sattributes + - apiGroups: ["apps"] + resources: ["replicasets"] + verbs: ["get", "list", "watch"] + - apiGroups: ["extensions"] + resources: ["replicasets"] + verbs: ["get", "list", "watch"] +--- +# Source: alloy/templates/rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: alloy +subjects: + - kind: ServiceAccount + name: alloy + namespace: default diff --git a/operations/helm/tests/pod_annotations/alloy/templates/service.yaml b/operations/helm/tests/pod_annotations/alloy/templates/service.yaml new file mode 100644 index 0000000000..34c0608fd3 --- /dev/null +++ b/operations/helm/tests/pod_annotations/alloy/templates/service.yaml @@ -0,0 +1,23 @@ +--- +# Source: alloy/templates/service.yaml +apiVersion: v1 +kind: Service +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +spec: + type: ClusterIP + selector: + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + internalTrafficPolicy: Cluster + ports: + - name: http-metrics + port: 80 + targetPort: 80 + protocol: "TCP" diff --git a/operations/helm/tests/pod_annotations/alloy/templates/serviceaccount.yaml b/operations/helm/tests/pod_annotations/alloy/templates/serviceaccount.yaml new file mode 100644 index 0000000000..46df991efb --- /dev/null +++ b/operations/helm/tests/pod_annotations/alloy/templates/serviceaccount.yaml @@ -0,0 +1,13 @@ +--- +# Source: alloy/templates/serviceaccount.yaml +apiVersion: v1 +kind: ServiceAccount +metadata: + name: alloy + namespace: default + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm diff --git a/operations/helm/tests/pod_annotations/grafana-agent/templates/configmap.yaml b/operations/helm/tests/pod_annotations/grafana-agent/templates/configmap.yaml deleted file mode 100644 index 2fdc6f0117..0000000000 --- a/operations/helm/tests/pod_annotations/grafana-agent/templates/configmap.yaml +++ /dev/null @@ -1,42 +0,0 @@ ---- -# Source: grafana-agent/templates/configmap.yaml -apiVersion: v1 -kind: ConfigMap -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -data: - config.river: |- - logging { - level = "info" - format = "logfmt" - } - - discovery.kubernetes "pods" { - role = "pod" - } - - discovery.kubernetes "nodes" { - role = "node" - } - - discovery.kubernetes "services" { - role = "service" - } - - discovery.kubernetes "endpoints" { - role = "endpoints" - } - - discovery.kubernetes "endpointslices" { - role = "endpointslice" - } - - discovery.kubernetes "ingresses" { - role = "ingress" - } diff --git a/operations/helm/tests/pod_annotations/grafana-agent/templates/rbac.yaml b/operations/helm/tests/pod_annotations/grafana-agent/templates/rbac.yaml deleted file mode 100644 index 3765583fb6..0000000000 --- a/operations/helm/tests/pod_annotations/grafana-agent/templates/rbac.yaml +++ /dev/null @@ -1,117 +0,0 @@ ---- -# Source: grafana-agent/templates/rbac.yaml -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -rules: - # Rules which allow discovery.kubernetes to function. - - apiGroups: - - "" - - "discovery.k8s.io" - - "networking.k8s.io" - resources: - - endpoints - - endpointslices - - ingresses - - nodes - - nodes/proxy - - nodes/metrics - - pods - - services - verbs: - - get - - list - - watch - # Rules which allow loki.source.kubernetes and loki.source.podlogs to work. - - apiGroups: - - "" - resources: - - pods - - pods/log - - namespaces - verbs: - - get - - list - - watch - - apiGroups: - - "monitoring.grafana.com" - resources: - - podlogs - verbs: - - get - - list - - watch - # Rules which allow mimir.rules.kubernetes to work. - - apiGroups: ["monitoring.coreos.com"] - resources: - - prometheusrules - verbs: - - get - - list - - watch - - nonResourceURLs: - - /metrics - verbs: - - get - # Rules for prometheus.kubernetes.* - - apiGroups: ["monitoring.coreos.com"] - resources: - - podmonitors - - servicemonitors - - probes - verbs: - - get - - list - - watch - # Rules which allow eventhandler to work. - - apiGroups: - - "" - resources: - - events - verbs: - - get - - list - - watch - # needed for remote.kubernetes.* - - apiGroups: [""] - resources: - - "configmaps" - - "secrets" - verbs: - - get - - list - - watch - # needed for otelcol.processor.k8sattributes - - apiGroups: ["apps"] - resources: ["replicasets"] - verbs: ["get", "list", "watch"] - - apiGroups: ["extensions"] - resources: ["replicasets"] - verbs: ["get", "list", "watch"] ---- -# Source: grafana-agent/templates/rbac.yaml -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: grafana-agent -subjects: - - kind: ServiceAccount - name: grafana-agent - namespace: default diff --git a/operations/helm/tests/pod_annotations/grafana-agent/templates/service.yaml b/operations/helm/tests/pod_annotations/grafana-agent/templates/service.yaml deleted file mode 100644 index c98f79428b..0000000000 --- a/operations/helm/tests/pod_annotations/grafana-agent/templates/service.yaml +++ /dev/null @@ -1,23 +0,0 @@ ---- -# Source: grafana-agent/templates/service.yaml -apiVersion: v1 -kind: Service -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -spec: - type: ClusterIP - selector: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - internalTrafficPolicy: Cluster - ports: - - name: http-metrics - port: 80 - targetPort: 80 - protocol: "TCP" diff --git a/operations/helm/tests/pod_annotations/grafana-agent/templates/serviceaccount.yaml b/operations/helm/tests/pod_annotations/grafana-agent/templates/serviceaccount.yaml deleted file mode 100644 index 65d7e0df38..0000000000 --- a/operations/helm/tests/pod_annotations/grafana-agent/templates/serviceaccount.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -# Source: grafana-agent/templates/serviceaccount.yaml -apiVersion: v1 -kind: ServiceAccount -metadata: - name: grafana-agent - namespace: default - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm diff --git a/operations/helm/tests/sidecars/alloy/templates/configmap.yaml b/operations/helm/tests/sidecars/alloy/templates/configmap.yaml new file mode 100644 index 0000000000..c9ae77aa1e --- /dev/null +++ b/operations/helm/tests/sidecars/alloy/templates/configmap.yaml @@ -0,0 +1,42 @@ +--- +# Source: alloy/templates/configmap.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +data: + config.river: |- + logging { + level = "info" + format = "logfmt" + } + + discovery.kubernetes "pods" { + role = "pod" + } + + discovery.kubernetes "nodes" { + role = "node" + } + + discovery.kubernetes "services" { + role = "service" + } + + discovery.kubernetes "endpoints" { + role = "endpoints" + } + + discovery.kubernetes "endpointslices" { + role = "endpointslice" + } + + discovery.kubernetes "ingresses" { + role = "ingress" + } diff --git a/operations/helm/tests/sidecars/grafana-agent/templates/controllers/daemonset.yaml b/operations/helm/tests/sidecars/alloy/templates/controllers/daemonset.yaml similarity index 71% rename from operations/helm/tests/sidecars/grafana-agent/templates/controllers/daemonset.yaml rename to operations/helm/tests/sidecars/alloy/templates/controllers/daemonset.yaml index 426f1f9072..20629a6661 100644 --- a/operations/helm/tests/sidecars/grafana-agent/templates/controllers/daemonset.yaml +++ b/operations/helm/tests/sidecars/alloy/templates/controllers/daemonset.yaml @@ -1,43 +1,41 @@ --- -# Source: grafana-agent/templates/controllers/daemonset.yaml +# Source: alloy/templates/controllers/daemonset.yaml apiVersion: apps/v1 kind: DaemonSet metadata: - name: grafana-agent + name: alloy labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy app.kubernetes.io/version: "vX.Y.Z" app.kubernetes.io/managed-by: Helm spec: minReadySeconds: 10 selector: matchLabels: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy template: metadata: annotations: - kubectl.kubernetes.io/default-container: grafana-agent + kubectl.kubernetes.io/default-container: alloy labels: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy spec: - serviceAccountName: grafana-agent + serviceAccountName: alloy containers: - - name: grafana-agent - image: docker.io/grafana/agent:v0.40.2 + - name: alloy + image: docker.io/grafana/alloy:v1.0.0 imagePullPolicy: IfNotPresent args: - run - - /etc/agent/config.river - - --storage.path=/tmp/agent + - /etc/alloy/config.river + - --storage.path=/tmp/alloy - --server.http.listen-addr=0.0.0.0:80 - --server.http.ui-path-prefix=/ env: - - name: AGENT_MODE - value: flow - name: AGENT_DEPLOY_MODE value: "helm" - name: HOSTNAME @@ -56,18 +54,18 @@ spec: timeoutSeconds: 1 volumeMounts: - name: config - mountPath: /etc/agent + mountPath: /etc/alloy - mountPath: /etc/geoip name: geoip - name: config-reloader image: ghcr.io/jimmidyson/configmap-reload:v0.12.0 args: - - --volume-dir=/etc/agent + - --volume-dir=/etc/alloy - --webhook-url=http://localhost:80/-/reload volumeMounts: - name: config - mountPath: /etc/agent + mountPath: /etc/alloy resources: requests: cpu: 1m @@ -93,6 +91,6 @@ spec: volumes: - name: config configMap: - name: grafana-agent + name: alloy - mountPath: /etc/geoip name: geoip diff --git a/operations/helm/tests/sidecars/alloy/templates/rbac.yaml b/operations/helm/tests/sidecars/alloy/templates/rbac.yaml new file mode 100644 index 0000000000..53ca27544f --- /dev/null +++ b/operations/helm/tests/sidecars/alloy/templates/rbac.yaml @@ -0,0 +1,117 @@ +--- +# Source: alloy/templates/rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +rules: + # Rules which allow discovery.kubernetes to function. + - apiGroups: + - "" + - "discovery.k8s.io" + - "networking.k8s.io" + resources: + - endpoints + - endpointslices + - ingresses + - nodes + - nodes/proxy + - nodes/metrics + - pods + - services + verbs: + - get + - list + - watch + # Rules which allow loki.source.kubernetes and loki.source.podlogs to work. + - apiGroups: + - "" + resources: + - pods + - pods/log + - namespaces + verbs: + - get + - list + - watch + - apiGroups: + - "monitoring.grafana.com" + resources: + - podlogs + verbs: + - get + - list + - watch + # Rules which allow mimir.rules.kubernetes to work. + - apiGroups: ["monitoring.coreos.com"] + resources: + - prometheusrules + verbs: + - get + - list + - watch + - nonResourceURLs: + - /metrics + verbs: + - get + # Rules for prometheus.kubernetes.* + - apiGroups: ["monitoring.coreos.com"] + resources: + - podmonitors + - servicemonitors + - probes + verbs: + - get + - list + - watch + # Rules which allow eventhandler to work. + - apiGroups: + - "" + resources: + - events + verbs: + - get + - list + - watch + # needed for remote.kubernetes.* + - apiGroups: [""] + resources: + - "configmaps" + - "secrets" + verbs: + - get + - list + - watch + # needed for otelcol.processor.k8sattributes + - apiGroups: ["apps"] + resources: ["replicasets"] + verbs: ["get", "list", "watch"] + - apiGroups: ["extensions"] + resources: ["replicasets"] + verbs: ["get", "list", "watch"] +--- +# Source: alloy/templates/rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: alloy +subjects: + - kind: ServiceAccount + name: alloy + namespace: default diff --git a/operations/helm/tests/sidecars/alloy/templates/service.yaml b/operations/helm/tests/sidecars/alloy/templates/service.yaml new file mode 100644 index 0000000000..34c0608fd3 --- /dev/null +++ b/operations/helm/tests/sidecars/alloy/templates/service.yaml @@ -0,0 +1,23 @@ +--- +# Source: alloy/templates/service.yaml +apiVersion: v1 +kind: Service +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +spec: + type: ClusterIP + selector: + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + internalTrafficPolicy: Cluster + ports: + - name: http-metrics + port: 80 + targetPort: 80 + protocol: "TCP" diff --git a/operations/helm/tests/sidecars/alloy/templates/serviceaccount.yaml b/operations/helm/tests/sidecars/alloy/templates/serviceaccount.yaml new file mode 100644 index 0000000000..46df991efb --- /dev/null +++ b/operations/helm/tests/sidecars/alloy/templates/serviceaccount.yaml @@ -0,0 +1,13 @@ +--- +# Source: alloy/templates/serviceaccount.yaml +apiVersion: v1 +kind: ServiceAccount +metadata: + name: alloy + namespace: default + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm diff --git a/operations/helm/tests/sidecars/grafana-agent/templates/configmap.yaml b/operations/helm/tests/sidecars/grafana-agent/templates/configmap.yaml deleted file mode 100644 index 2fdc6f0117..0000000000 --- a/operations/helm/tests/sidecars/grafana-agent/templates/configmap.yaml +++ /dev/null @@ -1,42 +0,0 @@ ---- -# Source: grafana-agent/templates/configmap.yaml -apiVersion: v1 -kind: ConfigMap -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -data: - config.river: |- - logging { - level = "info" - format = "logfmt" - } - - discovery.kubernetes "pods" { - role = "pod" - } - - discovery.kubernetes "nodes" { - role = "node" - } - - discovery.kubernetes "services" { - role = "service" - } - - discovery.kubernetes "endpoints" { - role = "endpoints" - } - - discovery.kubernetes "endpointslices" { - role = "endpointslice" - } - - discovery.kubernetes "ingresses" { - role = "ingress" - } diff --git a/operations/helm/tests/sidecars/grafana-agent/templates/rbac.yaml b/operations/helm/tests/sidecars/grafana-agent/templates/rbac.yaml deleted file mode 100644 index 3765583fb6..0000000000 --- a/operations/helm/tests/sidecars/grafana-agent/templates/rbac.yaml +++ /dev/null @@ -1,117 +0,0 @@ ---- -# Source: grafana-agent/templates/rbac.yaml -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -rules: - # Rules which allow discovery.kubernetes to function. - - apiGroups: - - "" - - "discovery.k8s.io" - - "networking.k8s.io" - resources: - - endpoints - - endpointslices - - ingresses - - nodes - - nodes/proxy - - nodes/metrics - - pods - - services - verbs: - - get - - list - - watch - # Rules which allow loki.source.kubernetes and loki.source.podlogs to work. - - apiGroups: - - "" - resources: - - pods - - pods/log - - namespaces - verbs: - - get - - list - - watch - - apiGroups: - - "monitoring.grafana.com" - resources: - - podlogs - verbs: - - get - - list - - watch - # Rules which allow mimir.rules.kubernetes to work. - - apiGroups: ["monitoring.coreos.com"] - resources: - - prometheusrules - verbs: - - get - - list - - watch - - nonResourceURLs: - - /metrics - verbs: - - get - # Rules for prometheus.kubernetes.* - - apiGroups: ["monitoring.coreos.com"] - resources: - - podmonitors - - servicemonitors - - probes - verbs: - - get - - list - - watch - # Rules which allow eventhandler to work. - - apiGroups: - - "" - resources: - - events - verbs: - - get - - list - - watch - # needed for remote.kubernetes.* - - apiGroups: [""] - resources: - - "configmaps" - - "secrets" - verbs: - - get - - list - - watch - # needed for otelcol.processor.k8sattributes - - apiGroups: ["apps"] - resources: ["replicasets"] - verbs: ["get", "list", "watch"] - - apiGroups: ["extensions"] - resources: ["replicasets"] - verbs: ["get", "list", "watch"] ---- -# Source: grafana-agent/templates/rbac.yaml -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: grafana-agent -subjects: - - kind: ServiceAccount - name: grafana-agent - namespace: default diff --git a/operations/helm/tests/sidecars/grafana-agent/templates/service.yaml b/operations/helm/tests/sidecars/grafana-agent/templates/service.yaml deleted file mode 100644 index c98f79428b..0000000000 --- a/operations/helm/tests/sidecars/grafana-agent/templates/service.yaml +++ /dev/null @@ -1,23 +0,0 @@ ---- -# Source: grafana-agent/templates/service.yaml -apiVersion: v1 -kind: Service -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -spec: - type: ClusterIP - selector: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - internalTrafficPolicy: Cluster - ports: - - name: http-metrics - port: 80 - targetPort: 80 - protocol: "TCP" diff --git a/operations/helm/tests/sidecars/grafana-agent/templates/serviceaccount.yaml b/operations/helm/tests/sidecars/grafana-agent/templates/serviceaccount.yaml deleted file mode 100644 index 65d7e0df38..0000000000 --- a/operations/helm/tests/sidecars/grafana-agent/templates/serviceaccount.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -# Source: grafana-agent/templates/serviceaccount.yaml -apiVersion: v1 -kind: ServiceAccount -metadata: - name: grafana-agent - namespace: default - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm diff --git a/operations/helm/tests/static-mode/grafana-agent/templates/configmap.yaml b/operations/helm/tests/static-mode/grafana-agent/templates/configmap.yaml deleted file mode 100644 index 3290febf92..0000000000 --- a/operations/helm/tests/static-mode/grafana-agent/templates/configmap.yaml +++ /dev/null @@ -1,17 +0,0 @@ ---- -# Source: grafana-agent/templates/configmap.yaml -apiVersion: v1 -kind: ConfigMap -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -data: - config.yaml: |- - server: - log_level: info - log_format: logfmt diff --git a/operations/helm/tests/static-mode/grafana-agent/templates/controllers/daemonset.yaml b/operations/helm/tests/static-mode/grafana-agent/templates/controllers/daemonset.yaml deleted file mode 100644 index 6cc6602fa2..0000000000 --- a/operations/helm/tests/static-mode/grafana-agent/templates/controllers/daemonset.yaml +++ /dev/null @@ -1,73 +0,0 @@ ---- -# Source: grafana-agent/templates/controllers/daemonset.yaml -apiVersion: apps/v1 -kind: DaemonSet -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -spec: - minReadySeconds: 10 - selector: - matchLabels: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - template: - metadata: - annotations: - kubectl.kubernetes.io/default-container: grafana-agent - labels: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - spec: - serviceAccountName: grafana-agent - containers: - - name: grafana-agent - image: docker.io/grafana/agent:v0.40.2 - imagePullPolicy: IfNotPresent - args: - - -config.file=/etc/agent/config.yaml - - -server.http.address=0.0.0.0:80 - env: - - name: AGENT_MODE - value: static - - name: AGENT_DEPLOY_MODE - value: "helm" - - name: HOSTNAME - valueFrom: - fieldRef: - fieldPath: spec.nodeName - ports: - - containerPort: 80 - name: http-metrics - readinessProbe: - httpGet: - path: /-/ready - port: 80 - scheme: HTTP - initialDelaySeconds: 10 - timeoutSeconds: 1 - volumeMounts: - - name: config - mountPath: /etc/agent - - name: config-reloader - image: ghcr.io/jimmidyson/configmap-reload:v0.12.0 - args: - - --volume-dir=/etc/agent - - --webhook-url=http://localhost:80/-/reload - volumeMounts: - - name: config - mountPath: /etc/agent - resources: - requests: - cpu: 1m - memory: 5Mi - dnsPolicy: ClusterFirst - volumes: - - name: config - configMap: - name: grafana-agent diff --git a/operations/helm/tests/static-mode/grafana-agent/templates/rbac.yaml b/operations/helm/tests/static-mode/grafana-agent/templates/rbac.yaml deleted file mode 100644 index 3765583fb6..0000000000 --- a/operations/helm/tests/static-mode/grafana-agent/templates/rbac.yaml +++ /dev/null @@ -1,117 +0,0 @@ ---- -# Source: grafana-agent/templates/rbac.yaml -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -rules: - # Rules which allow discovery.kubernetes to function. - - apiGroups: - - "" - - "discovery.k8s.io" - - "networking.k8s.io" - resources: - - endpoints - - endpointslices - - ingresses - - nodes - - nodes/proxy - - nodes/metrics - - pods - - services - verbs: - - get - - list - - watch - # Rules which allow loki.source.kubernetes and loki.source.podlogs to work. - - apiGroups: - - "" - resources: - - pods - - pods/log - - namespaces - verbs: - - get - - list - - watch - - apiGroups: - - "monitoring.grafana.com" - resources: - - podlogs - verbs: - - get - - list - - watch - # Rules which allow mimir.rules.kubernetes to work. - - apiGroups: ["monitoring.coreos.com"] - resources: - - prometheusrules - verbs: - - get - - list - - watch - - nonResourceURLs: - - /metrics - verbs: - - get - # Rules for prometheus.kubernetes.* - - apiGroups: ["monitoring.coreos.com"] - resources: - - podmonitors - - servicemonitors - - probes - verbs: - - get - - list - - watch - # Rules which allow eventhandler to work. - - apiGroups: - - "" - resources: - - events - verbs: - - get - - list - - watch - # needed for remote.kubernetes.* - - apiGroups: [""] - resources: - - "configmaps" - - "secrets" - verbs: - - get - - list - - watch - # needed for otelcol.processor.k8sattributes - - apiGroups: ["apps"] - resources: ["replicasets"] - verbs: ["get", "list", "watch"] - - apiGroups: ["extensions"] - resources: ["replicasets"] - verbs: ["get", "list", "watch"] ---- -# Source: grafana-agent/templates/rbac.yaml -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: grafana-agent -subjects: - - kind: ServiceAccount - name: grafana-agent - namespace: default diff --git a/operations/helm/tests/static-mode/grafana-agent/templates/service.yaml b/operations/helm/tests/static-mode/grafana-agent/templates/service.yaml deleted file mode 100644 index c98f79428b..0000000000 --- a/operations/helm/tests/static-mode/grafana-agent/templates/service.yaml +++ /dev/null @@ -1,23 +0,0 @@ ---- -# Source: grafana-agent/templates/service.yaml -apiVersion: v1 -kind: Service -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -spec: - type: ClusterIP - selector: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - internalTrafficPolicy: Cluster - ports: - - name: http-metrics - port: 80 - targetPort: 80 - protocol: "TCP" diff --git a/operations/helm/tests/static-mode/grafana-agent/templates/serviceaccount.yaml b/operations/helm/tests/static-mode/grafana-agent/templates/serviceaccount.yaml deleted file mode 100644 index 65d7e0df38..0000000000 --- a/operations/helm/tests/static-mode/grafana-agent/templates/serviceaccount.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -# Source: grafana-agent/templates/serviceaccount.yaml -apiVersion: v1 -kind: ServiceAccount -metadata: - name: grafana-agent - namespace: default - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm diff --git a/operations/helm/tests/topologyspreadconstraints/alloy/templates/configmap.yaml b/operations/helm/tests/topologyspreadconstraints/alloy/templates/configmap.yaml new file mode 100644 index 0000000000..c9ae77aa1e --- /dev/null +++ b/operations/helm/tests/topologyspreadconstraints/alloy/templates/configmap.yaml @@ -0,0 +1,42 @@ +--- +# Source: alloy/templates/configmap.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +data: + config.river: |- + logging { + level = "info" + format = "logfmt" + } + + discovery.kubernetes "pods" { + role = "pod" + } + + discovery.kubernetes "nodes" { + role = "node" + } + + discovery.kubernetes "services" { + role = "service" + } + + discovery.kubernetes "endpoints" { + role = "endpoints" + } + + discovery.kubernetes "endpointslices" { + role = "endpointslice" + } + + discovery.kubernetes "ingresses" { + role = "ingress" + } diff --git a/operations/helm/tests/topologyspreadconstraints/grafana-agent/templates/controllers/deployment.yaml b/operations/helm/tests/topologyspreadconstraints/alloy/templates/controllers/deployment.yaml similarity index 66% rename from operations/helm/tests/topologyspreadconstraints/grafana-agent/templates/controllers/deployment.yaml rename to operations/helm/tests/topologyspreadconstraints/alloy/templates/controllers/deployment.yaml index cb482e7f9f..7cd624885e 100644 --- a/operations/helm/tests/topologyspreadconstraints/grafana-agent/templates/controllers/deployment.yaml +++ b/operations/helm/tests/topologyspreadconstraints/alloy/templates/controllers/deployment.yaml @@ -1,13 +1,13 @@ --- -# Source: grafana-agent/templates/controllers/deployment.yaml +# Source: alloy/templates/controllers/deployment.yaml apiVersion: apps/v1 kind: Deployment metadata: - name: grafana-agent + name: alloy labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy app.kubernetes.io/version: "vX.Y.Z" app.kubernetes.io/managed-by: Helm spec: @@ -15,30 +15,28 @@ spec: minReadySeconds: 10 selector: matchLabels: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy template: metadata: annotations: - kubectl.kubernetes.io/default-container: grafana-agent + kubectl.kubernetes.io/default-container: alloy labels: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy spec: - serviceAccountName: grafana-agent + serviceAccountName: alloy containers: - - name: grafana-agent - image: docker.io/grafana/agent:v0.40.2 + - name: alloy + image: docker.io/grafana/alloy:v1.0.0 imagePullPolicy: IfNotPresent args: - run - - /etc/agent/config.river - - --storage.path=/tmp/agent + - /etc/alloy/config.river + - --storage.path=/tmp/alloy - --server.http.listen-addr=0.0.0.0:80 - --server.http.ui-path-prefix=/ env: - - name: AGENT_MODE - value: flow - name: AGENT_DEPLOY_MODE value: "helm" - name: HOSTNAME @@ -57,15 +55,15 @@ spec: timeoutSeconds: 1 volumeMounts: - name: config - mountPath: /etc/agent + mountPath: /etc/alloy - name: config-reloader image: ghcr.io/jimmidyson/configmap-reload:v0.12.0 args: - - --volume-dir=/etc/agent + - --volume-dir=/etc/alloy - --webhook-url=http://localhost:80/-/reload volumeMounts: - name: config - mountPath: /etc/agent + mountPath: /etc/alloy resources: requests: cpu: 1m @@ -82,4 +80,4 @@ spec: volumes: - name: config configMap: - name: grafana-agent + name: alloy diff --git a/operations/helm/tests/topologyspreadconstraints/alloy/templates/rbac.yaml b/operations/helm/tests/topologyspreadconstraints/alloy/templates/rbac.yaml new file mode 100644 index 0000000000..53ca27544f --- /dev/null +++ b/operations/helm/tests/topologyspreadconstraints/alloy/templates/rbac.yaml @@ -0,0 +1,117 @@ +--- +# Source: alloy/templates/rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +rules: + # Rules which allow discovery.kubernetes to function. + - apiGroups: + - "" + - "discovery.k8s.io" + - "networking.k8s.io" + resources: + - endpoints + - endpointslices + - ingresses + - nodes + - nodes/proxy + - nodes/metrics + - pods + - services + verbs: + - get + - list + - watch + # Rules which allow loki.source.kubernetes and loki.source.podlogs to work. + - apiGroups: + - "" + resources: + - pods + - pods/log + - namespaces + verbs: + - get + - list + - watch + - apiGroups: + - "monitoring.grafana.com" + resources: + - podlogs + verbs: + - get + - list + - watch + # Rules which allow mimir.rules.kubernetes to work. + - apiGroups: ["monitoring.coreos.com"] + resources: + - prometheusrules + verbs: + - get + - list + - watch + - nonResourceURLs: + - /metrics + verbs: + - get + # Rules for prometheus.kubernetes.* + - apiGroups: ["monitoring.coreos.com"] + resources: + - podmonitors + - servicemonitors + - probes + verbs: + - get + - list + - watch + # Rules which allow eventhandler to work. + - apiGroups: + - "" + resources: + - events + verbs: + - get + - list + - watch + # needed for remote.kubernetes.* + - apiGroups: [""] + resources: + - "configmaps" + - "secrets" + verbs: + - get + - list + - watch + # needed for otelcol.processor.k8sattributes + - apiGroups: ["apps"] + resources: ["replicasets"] + verbs: ["get", "list", "watch"] + - apiGroups: ["extensions"] + resources: ["replicasets"] + verbs: ["get", "list", "watch"] +--- +# Source: alloy/templates/rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: alloy +subjects: + - kind: ServiceAccount + name: alloy + namespace: default diff --git a/operations/helm/tests/topologyspreadconstraints/alloy/templates/service.yaml b/operations/helm/tests/topologyspreadconstraints/alloy/templates/service.yaml new file mode 100644 index 0000000000..34c0608fd3 --- /dev/null +++ b/operations/helm/tests/topologyspreadconstraints/alloy/templates/service.yaml @@ -0,0 +1,23 @@ +--- +# Source: alloy/templates/service.yaml +apiVersion: v1 +kind: Service +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +spec: + type: ClusterIP + selector: + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + internalTrafficPolicy: Cluster + ports: + - name: http-metrics + port: 80 + targetPort: 80 + protocol: "TCP" diff --git a/operations/helm/tests/topologyspreadconstraints/alloy/templates/serviceaccount.yaml b/operations/helm/tests/topologyspreadconstraints/alloy/templates/serviceaccount.yaml new file mode 100644 index 0000000000..46df991efb --- /dev/null +++ b/operations/helm/tests/topologyspreadconstraints/alloy/templates/serviceaccount.yaml @@ -0,0 +1,13 @@ +--- +# Source: alloy/templates/serviceaccount.yaml +apiVersion: v1 +kind: ServiceAccount +metadata: + name: alloy + namespace: default + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm diff --git a/operations/helm/tests/topologyspreadconstraints/grafana-agent/templates/configmap.yaml b/operations/helm/tests/topologyspreadconstraints/grafana-agent/templates/configmap.yaml deleted file mode 100644 index 2fdc6f0117..0000000000 --- a/operations/helm/tests/topologyspreadconstraints/grafana-agent/templates/configmap.yaml +++ /dev/null @@ -1,42 +0,0 @@ ---- -# Source: grafana-agent/templates/configmap.yaml -apiVersion: v1 -kind: ConfigMap -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -data: - config.river: |- - logging { - level = "info" - format = "logfmt" - } - - discovery.kubernetes "pods" { - role = "pod" - } - - discovery.kubernetes "nodes" { - role = "node" - } - - discovery.kubernetes "services" { - role = "service" - } - - discovery.kubernetes "endpoints" { - role = "endpoints" - } - - discovery.kubernetes "endpointslices" { - role = "endpointslice" - } - - discovery.kubernetes "ingresses" { - role = "ingress" - } diff --git a/operations/helm/tests/topologyspreadconstraints/grafana-agent/templates/rbac.yaml b/operations/helm/tests/topologyspreadconstraints/grafana-agent/templates/rbac.yaml deleted file mode 100644 index 3765583fb6..0000000000 --- a/operations/helm/tests/topologyspreadconstraints/grafana-agent/templates/rbac.yaml +++ /dev/null @@ -1,117 +0,0 @@ ---- -# Source: grafana-agent/templates/rbac.yaml -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -rules: - # Rules which allow discovery.kubernetes to function. - - apiGroups: - - "" - - "discovery.k8s.io" - - "networking.k8s.io" - resources: - - endpoints - - endpointslices - - ingresses - - nodes - - nodes/proxy - - nodes/metrics - - pods - - services - verbs: - - get - - list - - watch - # Rules which allow loki.source.kubernetes and loki.source.podlogs to work. - - apiGroups: - - "" - resources: - - pods - - pods/log - - namespaces - verbs: - - get - - list - - watch - - apiGroups: - - "monitoring.grafana.com" - resources: - - podlogs - verbs: - - get - - list - - watch - # Rules which allow mimir.rules.kubernetes to work. - - apiGroups: ["monitoring.coreos.com"] - resources: - - prometheusrules - verbs: - - get - - list - - watch - - nonResourceURLs: - - /metrics - verbs: - - get - # Rules for prometheus.kubernetes.* - - apiGroups: ["monitoring.coreos.com"] - resources: - - podmonitors - - servicemonitors - - probes - verbs: - - get - - list - - watch - # Rules which allow eventhandler to work. - - apiGroups: - - "" - resources: - - events - verbs: - - get - - list - - watch - # needed for remote.kubernetes.* - - apiGroups: [""] - resources: - - "configmaps" - - "secrets" - verbs: - - get - - list - - watch - # needed for otelcol.processor.k8sattributes - - apiGroups: ["apps"] - resources: ["replicasets"] - verbs: ["get", "list", "watch"] - - apiGroups: ["extensions"] - resources: ["replicasets"] - verbs: ["get", "list", "watch"] ---- -# Source: grafana-agent/templates/rbac.yaml -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: grafana-agent -subjects: - - kind: ServiceAccount - name: grafana-agent - namespace: default diff --git a/operations/helm/tests/topologyspreadconstraints/grafana-agent/templates/service.yaml b/operations/helm/tests/topologyspreadconstraints/grafana-agent/templates/service.yaml deleted file mode 100644 index c98f79428b..0000000000 --- a/operations/helm/tests/topologyspreadconstraints/grafana-agent/templates/service.yaml +++ /dev/null @@ -1,23 +0,0 @@ ---- -# Source: grafana-agent/templates/service.yaml -apiVersion: v1 -kind: Service -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -spec: - type: ClusterIP - selector: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - internalTrafficPolicy: Cluster - ports: - - name: http-metrics - port: 80 - targetPort: 80 - protocol: "TCP" diff --git a/operations/helm/tests/topologyspreadconstraints/grafana-agent/templates/serviceaccount.yaml b/operations/helm/tests/topologyspreadconstraints/grafana-agent/templates/serviceaccount.yaml deleted file mode 100644 index 65d7e0df38..0000000000 --- a/operations/helm/tests/topologyspreadconstraints/grafana-agent/templates/serviceaccount.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -# Source: grafana-agent/templates/serviceaccount.yaml -apiVersion: v1 -kind: ServiceAccount -metadata: - name: grafana-agent - namespace: default - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm diff --git a/operations/helm/tests/with-digests/alloy/templates/configmap.yaml b/operations/helm/tests/with-digests/alloy/templates/configmap.yaml new file mode 100644 index 0000000000..c9ae77aa1e --- /dev/null +++ b/operations/helm/tests/with-digests/alloy/templates/configmap.yaml @@ -0,0 +1,42 @@ +--- +# Source: alloy/templates/configmap.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +data: + config.river: |- + logging { + level = "info" + format = "logfmt" + } + + discovery.kubernetes "pods" { + role = "pod" + } + + discovery.kubernetes "nodes" { + role = "node" + } + + discovery.kubernetes "services" { + role = "service" + } + + discovery.kubernetes "endpoints" { + role = "endpoints" + } + + discovery.kubernetes "endpointslices" { + role = "endpointslice" + } + + discovery.kubernetes "ingresses" { + role = "ingress" + } diff --git a/operations/helm/tests/with-digests/grafana-agent/templates/controllers/daemonset.yaml b/operations/helm/tests/with-digests/alloy/templates/controllers/daemonset.yaml similarity index 66% rename from operations/helm/tests/with-digests/grafana-agent/templates/controllers/daemonset.yaml rename to operations/helm/tests/with-digests/alloy/templates/controllers/daemonset.yaml index d52c502d3c..4418f7f17a 100644 --- a/operations/helm/tests/with-digests/grafana-agent/templates/controllers/daemonset.yaml +++ b/operations/helm/tests/with-digests/alloy/templates/controllers/daemonset.yaml @@ -1,43 +1,41 @@ --- -# Source: grafana-agent/templates/controllers/daemonset.yaml +# Source: alloy/templates/controllers/daemonset.yaml apiVersion: apps/v1 kind: DaemonSet metadata: - name: grafana-agent + name: alloy labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy app.kubernetes.io/version: "vX.Y.Z" app.kubernetes.io/managed-by: Helm spec: minReadySeconds: 10 selector: matchLabels: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy template: metadata: annotations: - kubectl.kubernetes.io/default-container: grafana-agent + kubectl.kubernetes.io/default-container: alloy labels: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy spec: - serviceAccountName: grafana-agent + serviceAccountName: alloy containers: - - name: grafana-agent + - name: alloy image: docker.io/grafana/agent@sha256:82575a7be3e4770e53f620298e58bcc4cdb0fd0338e01c4b206cae9e3ca46ebf imagePullPolicy: IfNotPresent args: - run - - /etc/agent/config.river - - --storage.path=/tmp/agent + - /etc/alloy/config.river + - --storage.path=/tmp/alloy - --server.http.listen-addr=0.0.0.0:80 - --server.http.ui-path-prefix=/ env: - - name: AGENT_MODE - value: flow - name: AGENT_DEPLOY_MODE value: "helm" - name: HOSTNAME @@ -56,15 +54,15 @@ spec: timeoutSeconds: 1 volumeMounts: - name: config - mountPath: /etc/agent + mountPath: /etc/alloy - name: config-reloader image: docker.io/jimmidyson/configmap-reload@sha256:5af9d3041d12a3e63f115125f89b66d2ba981fe82e64302ac370c5496055059c args: - - --volume-dir=/etc/agent + - --volume-dir=/etc/alloy - --webhook-url=http://localhost:80/-/reload volumeMounts: - name: config - mountPath: /etc/agent + mountPath: /etc/alloy resources: requests: cpu: 1m @@ -73,4 +71,4 @@ spec: volumes: - name: config configMap: - name: grafana-agent + name: alloy diff --git a/operations/helm/tests/with-digests/alloy/templates/rbac.yaml b/operations/helm/tests/with-digests/alloy/templates/rbac.yaml new file mode 100644 index 0000000000..53ca27544f --- /dev/null +++ b/operations/helm/tests/with-digests/alloy/templates/rbac.yaml @@ -0,0 +1,117 @@ +--- +# Source: alloy/templates/rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +rules: + # Rules which allow discovery.kubernetes to function. + - apiGroups: + - "" + - "discovery.k8s.io" + - "networking.k8s.io" + resources: + - endpoints + - endpointslices + - ingresses + - nodes + - nodes/proxy + - nodes/metrics + - pods + - services + verbs: + - get + - list + - watch + # Rules which allow loki.source.kubernetes and loki.source.podlogs to work. + - apiGroups: + - "" + resources: + - pods + - pods/log + - namespaces + verbs: + - get + - list + - watch + - apiGroups: + - "monitoring.grafana.com" + resources: + - podlogs + verbs: + - get + - list + - watch + # Rules which allow mimir.rules.kubernetes to work. + - apiGroups: ["monitoring.coreos.com"] + resources: + - prometheusrules + verbs: + - get + - list + - watch + - nonResourceURLs: + - /metrics + verbs: + - get + # Rules for prometheus.kubernetes.* + - apiGroups: ["monitoring.coreos.com"] + resources: + - podmonitors + - servicemonitors + - probes + verbs: + - get + - list + - watch + # Rules which allow eventhandler to work. + - apiGroups: + - "" + resources: + - events + verbs: + - get + - list + - watch + # needed for remote.kubernetes.* + - apiGroups: [""] + resources: + - "configmaps" + - "secrets" + verbs: + - get + - list + - watch + # needed for otelcol.processor.k8sattributes + - apiGroups: ["apps"] + resources: ["replicasets"] + verbs: ["get", "list", "watch"] + - apiGroups: ["extensions"] + resources: ["replicasets"] + verbs: ["get", "list", "watch"] +--- +# Source: alloy/templates/rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: alloy +subjects: + - kind: ServiceAccount + name: alloy + namespace: default diff --git a/operations/helm/tests/with-digests/alloy/templates/service.yaml b/operations/helm/tests/with-digests/alloy/templates/service.yaml new file mode 100644 index 0000000000..34c0608fd3 --- /dev/null +++ b/operations/helm/tests/with-digests/alloy/templates/service.yaml @@ -0,0 +1,23 @@ +--- +# Source: alloy/templates/service.yaml +apiVersion: v1 +kind: Service +metadata: + name: alloy + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm +spec: + type: ClusterIP + selector: + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + internalTrafficPolicy: Cluster + ports: + - name: http-metrics + port: 80 + targetPort: 80 + protocol: "TCP" diff --git a/operations/helm/tests/with-digests/alloy/templates/serviceaccount.yaml b/operations/helm/tests/with-digests/alloy/templates/serviceaccount.yaml new file mode 100644 index 0000000000..46df991efb --- /dev/null +++ b/operations/helm/tests/with-digests/alloy/templates/serviceaccount.yaml @@ -0,0 +1,13 @@ +--- +# Source: alloy/templates/serviceaccount.yaml +apiVersion: v1 +kind: ServiceAccount +metadata: + name: alloy + namespace: default + labels: + helm.sh/chart: alloy + app.kubernetes.io/name: alloy + app.kubernetes.io/instance: alloy + app.kubernetes.io/version: "vX.Y.Z" + app.kubernetes.io/managed-by: Helm diff --git a/operations/helm/tests/with-digests/grafana-agent/templates/configmap.yaml b/operations/helm/tests/with-digests/grafana-agent/templates/configmap.yaml deleted file mode 100644 index 2fdc6f0117..0000000000 --- a/operations/helm/tests/with-digests/grafana-agent/templates/configmap.yaml +++ /dev/null @@ -1,42 +0,0 @@ ---- -# Source: grafana-agent/templates/configmap.yaml -apiVersion: v1 -kind: ConfigMap -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -data: - config.river: |- - logging { - level = "info" - format = "logfmt" - } - - discovery.kubernetes "pods" { - role = "pod" - } - - discovery.kubernetes "nodes" { - role = "node" - } - - discovery.kubernetes "services" { - role = "service" - } - - discovery.kubernetes "endpoints" { - role = "endpoints" - } - - discovery.kubernetes "endpointslices" { - role = "endpointslice" - } - - discovery.kubernetes "ingresses" { - role = "ingress" - } diff --git a/operations/helm/tests/with-digests/grafana-agent/templates/rbac.yaml b/operations/helm/tests/with-digests/grafana-agent/templates/rbac.yaml deleted file mode 100644 index 3765583fb6..0000000000 --- a/operations/helm/tests/with-digests/grafana-agent/templates/rbac.yaml +++ /dev/null @@ -1,117 +0,0 @@ ---- -# Source: grafana-agent/templates/rbac.yaml -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -rules: - # Rules which allow discovery.kubernetes to function. - - apiGroups: - - "" - - "discovery.k8s.io" - - "networking.k8s.io" - resources: - - endpoints - - endpointslices - - ingresses - - nodes - - nodes/proxy - - nodes/metrics - - pods - - services - verbs: - - get - - list - - watch - # Rules which allow loki.source.kubernetes and loki.source.podlogs to work. - - apiGroups: - - "" - resources: - - pods - - pods/log - - namespaces - verbs: - - get - - list - - watch - - apiGroups: - - "monitoring.grafana.com" - resources: - - podlogs - verbs: - - get - - list - - watch - # Rules which allow mimir.rules.kubernetes to work. - - apiGroups: ["monitoring.coreos.com"] - resources: - - prometheusrules - verbs: - - get - - list - - watch - - nonResourceURLs: - - /metrics - verbs: - - get - # Rules for prometheus.kubernetes.* - - apiGroups: ["monitoring.coreos.com"] - resources: - - podmonitors - - servicemonitors - - probes - verbs: - - get - - list - - watch - # Rules which allow eventhandler to work. - - apiGroups: - - "" - resources: - - events - verbs: - - get - - list - - watch - # needed for remote.kubernetes.* - - apiGroups: [""] - resources: - - "configmaps" - - "secrets" - verbs: - - get - - list - - watch - # needed for otelcol.processor.k8sattributes - - apiGroups: ["apps"] - resources: ["replicasets"] - verbs: ["get", "list", "watch"] - - apiGroups: ["extensions"] - resources: ["replicasets"] - verbs: ["get", "list", "watch"] ---- -# Source: grafana-agent/templates/rbac.yaml -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: grafana-agent -subjects: - - kind: ServiceAccount - name: grafana-agent - namespace: default diff --git a/operations/helm/tests/with-digests/grafana-agent/templates/service.yaml b/operations/helm/tests/with-digests/grafana-agent/templates/service.yaml deleted file mode 100644 index c98f79428b..0000000000 --- a/operations/helm/tests/with-digests/grafana-agent/templates/service.yaml +++ /dev/null @@ -1,23 +0,0 @@ ---- -# Source: grafana-agent/templates/service.yaml -apiVersion: v1 -kind: Service -metadata: - name: grafana-agent - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm -spec: - type: ClusterIP - selector: - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - internalTrafficPolicy: Cluster - ports: - - name: http-metrics - port: 80 - targetPort: 80 - protocol: "TCP" diff --git a/operations/helm/tests/with-digests/grafana-agent/templates/serviceaccount.yaml b/operations/helm/tests/with-digests/grafana-agent/templates/serviceaccount.yaml deleted file mode 100644 index 65d7e0df38..0000000000 --- a/operations/helm/tests/with-digests/grafana-agent/templates/serviceaccount.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -# Source: grafana-agent/templates/serviceaccount.yaml -apiVersion: v1 -kind: ServiceAccount -metadata: - name: grafana-agent - namespace: default - labels: - helm.sh/chart: grafana-agent - app.kubernetes.io/name: grafana-agent - app.kubernetes.io/instance: grafana-agent - app.kubernetes.io/version: "vX.Y.Z" - app.kubernetes.io/managed-by: Helm