Parcourir la source

[bitnami/grafana-loki] Replace promtail with alloy (#34338)

* [bitnami/grafana-loki] Replace promtail with alloy

Signed-off-by: David Gomez <david.gomez@broadcom.com>

* Update CHANGELOG.md

Signed-off-by: Bitnami Bot <bitnami.bot@broadcom.com>

* [bitnami/grafana-loki] Use secret for Alloy configuration

Signed-off-by: David Gomez <david.gomez@broadcom.com>

* Update README.md with readme-generator-for-helm

Signed-off-by: Bitnami Bot <bitnami.bot@broadcom.com>

* [grafana-loki] Fix typo in VIB tests

Signed-off-by: David Gomez <david.gomez@broadcom.com>

* [grafana-loki] Add alloy GOSS tests

Signed-off-by: David Gomez <david.gomez@broadcom.com>

* [grafana-loki] Update Alloy subchart

Signed-off-by: David Gomez <david.gomez@broadcom.com>

* Update .vib/grafana-loki/goss/alloy/goss.yaml

Co-authored-by: Juan Ariza Toledano <juan.ariza@broadcom.com>
Signed-off-by: David Gomez <david.gomez@broadcom.com>

* [bitnami/grafana-alloy] Apply feedback

Signed-off-by: David Gomez <david.gomez@broadcom.com>

* Update README.md with readme-generator-for-helm

Signed-off-by: Bitnami Bot <bitnami.bot@broadcom.com>

* Update bitnami/grafana-loki/templates/_helpers.tpl

Co-authored-by: Juan Ariza Toledano <juan.ariza@broadcom.com>
Signed-off-by: David Gomez <david.gomez@broadcom.com>

* Update bitnami/grafana-loki/templates/_helpers.tpl

Co-authored-by: Juan Ariza Toledano <juan.ariza@broadcom.com>
Signed-off-by: David Gomez <david.gomez@broadcom.com>

* Update bitnami/grafana-loki/templates/NOTES.txt

Co-authored-by: Juan Ariza Toledano <juan.ariza@broadcom.com>
Signed-off-by: David Gomez <david.gomez@broadcom.com>

* [bitnami/grafana-loki] Remove unnecessary

Signed-off-by: David Gomez <david.gomez@broadcom.com>

* [bitnami/grafana-loki] Reduce grafanaalloy exposed prameters

Signed-off-by: David Gomez <david.gomez@broadcom.com>

* [bitnami/grafana-loki] Remove  from gateway secret

Signed-off-by: David Gomez <david.gomez@broadcom.com>

* [bitnami/grafana-loki] Fix GOSS tests

Signed-off-by: David Gomez <david.gomez@broadcom.com>

* [bitnami/grafana-loki] Apply feedback

Signed-off-by: David Gomez <david.gomez@broadcom.com>

* Update CHANGELOG.md

Signed-off-by: Bitnami Bot <bitnami.bot@broadcom.com>

* Update README.md with readme-generator-for-helm

Signed-off-by: Bitnami Bot <bitnami.bot@broadcom.com>

* Update bitnami/grafana-loki/templates/alloy/secret.yaml

Co-authored-by: Juan Ariza Toledano <juan.ariza@broadcom.com>
Signed-off-by: David Gomez <david.gomez@broadcom.com>

* Update CHANGELOG.md

Signed-off-by: Bitnami Bot <bitnami.bot@broadcom.com>

---------

Signed-off-by: David Gomez <david.gomez@broadcom.com>
Signed-off-by: Bitnami Bot <bitnami.bot@broadcom.com>
Co-authored-by: Bitnami Bot <bitnami.bot@broadcom.com>
Co-authored-by: Juan Ariza Toledano <juan.ariza@broadcom.com>
David Gomez il y a 3 mois
Parent
commit
be47a45923
28 fichiers modifiés avec 276 ajouts et 1287 suppressions
  1. 20 14
      .vib/grafana-loki/goss/alloy/goss.yaml
  2. 9 10
      .vib/grafana-loki/runtime-parameters.yaml
  3. 2 2
      .vib/grafana-loki/vib-verify.json
  4. 6 2
      bitnami/grafana-loki/CHANGELOG.md
  5. 10 7
      bitnami/grafana-loki/Chart.lock
  6. 6 3
      bitnami/grafana-loki/Chart.yaml
  7. 36 114
      bitnami/grafana-loki/README.md
  8. 6 5
      bitnami/grafana-loki/templates/NOTES.txt
  9. 5 35
      bitnami/grafana-loki/templates/_helpers.tpl
  10. 116 0
      bitnami/grafana-loki/templates/alloy/secret.yaml
  11. 1 2
      bitnami/grafana-loki/templates/compactor/servicemonitor.yaml
  12. 1 2
      bitnami/grafana-loki/templates/distributor/servicemonitor.yaml
  13. 1 3
      bitnami/grafana-loki/templates/gateway/secret.yaml
  14. 1 2
      bitnami/grafana-loki/templates/index-gateway/servicemonitor.yaml
  15. 1 2
      bitnami/grafana-loki/templates/ingester/servicemonitor.yaml
  16. 0 32
      bitnami/grafana-loki/templates/promtail/clusterrole.yaml
  17. 0 27
      bitnami/grafana-loki/templates/promtail/clusterrolebinding.yaml
  18. 0 206
      bitnami/grafana-loki/templates/promtail/daemonset.yaml
  19. 0 140
      bitnami/grafana-loki/templates/promtail/networkpolicy.yaml
  20. 0 23
      bitnami/grafana-loki/templates/promtail/secret.yaml
  21. 0 22
      bitnami/grafana-loki/templates/promtail/service-account.yaml
  22. 0 67
      bitnami/grafana-loki/templates/promtail/service.yaml
  23. 0 52
      bitnami/grafana-loki/templates/promtail/servicemonitor.yaml
  24. 1 2
      bitnami/grafana-loki/templates/querier/servicemonitor.yaml
  25. 1 2
      bitnami/grafana-loki/templates/query-frontend/servicemonitor.yaml
  26. 1 2
      bitnami/grafana-loki/templates/ruler/servicemonitor.yaml
  27. 1 2
      bitnami/grafana-loki/templates/table-manager/servicemonitor.yaml
  28. 51 507
      bitnami/grafana-loki/values.yaml

+ 20 - 14
.vib/grafana-loki/goss/promtail/goss.yaml → .vib/grafana-loki/goss/alloy/goss.yaml

@@ -1,31 +1,37 @@
 # Copyright Broadcom, Inc. All Rights Reserved.
 # SPDX-License-Identifier: APACHE-2.0
 
-file:
-  /bitnami/promtail/conf/promtail.yaml:
-    mode: "0644"
-    filetype: file
-    exists: true
-    owner: root
-    contents:
-    - /http_listen_port.*{{ .Vars.promtail.containerPorts.http }}/
 http:
-  http://grafana-loki-promtail:{{ .Vars.promtail.service.ports.http }}/config:
+  http://grafana-loki-grafanaalloy:{{ .Vars.grafanaalloy.service.ports.http }}/-/healthy:
+    status: 200
+    body:
+      - 'All Alloy components are healthy.'
+  http://grafana-loki-grafanaalloy:{{ .Vars.grafanaalloy.service.ports.http }}/metrics:
     status: 200
     body:
-    - /log_level.*{{ .Vars.promtail.logLevel }}/
+      - 'alloy_build_info'
+      - 'loki_write_sent_bytes_total'
+file:
+  /opt/bitnami/grafana-alloy/config/config.alloy:
+    exists: true
+    filetype: symlink
+    contents:
+    - 'http://grafana-loki-gateway'
+  /var/log:
+    exists: true
+    filetype: directory
 command:
-  {{- $uid := .Vars.promtail.containerSecurityContext.runAsUser }}
-  {{- $gid := .Vars.promtail.podSecurityContext.fsGroup }}
+  {{- $uid := .Vars.grafanaalloy.alloy.containerSecurityContext.runAsUser }}
+  {{- $gid := .Vars.grafanaalloy.podSecurityContext.fsGroup }}
   check-user-info:
     # The UID and GID should always be either the one specified as vars (always a bigger number that the default)
     # or the one randomly defined by openshift (larger values). Otherwise, the chart is still using the default value.
     exec: if [ $(id -u) -lt {{ $uid }} ] || [ $(id -G | awk '{print $2}') -lt {{ $gid }} ]; then exit 1; fi
     exit-status: 0
-  {{ if .Vars.promtail.serviceAccount.automountServiceAccountToken }}
+  {{ if .Vars.grafanaalloy.serviceAccount.automountServiceAccountToken }}
   check-sa:
     exec: cat /var/run/secrets/kubernetes.io/serviceaccount/token | cut -d '.' -f 2 | xargs -I '{}' echo '{}====' | fold -w 4 | sed '$ d' | tr -d '\n' | base64 -d
     exit-status: 0
     stdout:
-    - /serviceaccount.*name.*{{.Env.BITNAMI_APP_NAME }}/
+    - /serviceaccount.*name.*grafana-loki-grafanaalloy/
   {{ end }}

+ 9 - 10
.vib/grafana-loki/runtime-parameters.yaml

@@ -44,21 +44,20 @@ queryScheduler:
   service:
     ports:
       http: 3100
-promtail:
+grafanaalloy:
   enabled: true
-  containerPorts:
-    http: 8081
   podSecurityContext:
     enabled: true
     fsGroup: 0
-  containerSecurityContext:
-    enabled: true
-    runAsUser: 0
-  logLevel: debug
+  alloy:
+    containerPorts:
+      http: 8081
+    containerSecurityContext:
+      enabled: true
+      runAsUser: 1002
   service:
-    type: ClusterIP
     ports:
-      http: 3101
+      http: 8081
   rbac:
     create: true
   serviceAccount:
@@ -78,4 +77,4 @@ memcachedindexqueries:
   enabled: true
   service:
     ports:
-      memcached: 11212 
+      memcached: 11212

+ 2 - 2
.vib/grafana-loki/vib-verify.json

@@ -45,11 +45,11 @@
             "resources": {
               "path": "/.vib"
             },
-            "tests_file": "grafana-loki/goss/promtail/goss.yaml",
+            "tests_file": "grafana-loki/goss/alloy/goss.yaml",
             "vars_file": "grafana-loki/runtime-parameters.yaml",
             "remote": {
               "pod": {
-                "workload": "ds-grafana-loki-promtail"
+                "workload": "ds-grafana-loki-grafanaalloy"
               }
             }
           }

+ 6 - 2
bitnami/grafana-loki/CHANGELOG.md

@@ -1,8 +1,12 @@
 # Changelog
 
-## 4.8.15 (2025-06-10)
+## 5.0.0 (2025-06-13)
 
-* [bitnami/grafana-loki] :zap: :arrow_up: Update dependency references ([#34323](https://github.com/bitnami/charts/pull/34323))
+* [bitnami/grafana-loki] Replace promtail with alloy ([#34338](https://github.com/bitnami/charts/pull/34338))
+
+## <small>4.8.15 (2025-06-10)</small>
+
+* [bitnami/grafana-loki] :zap: :arrow_up: Update dependency references (#34323) ([efeaa1b](https://github.com/bitnami/charts/commit/efeaa1b851fb106475612293f0def90ecd8860f9)), closes [#34323](https://github.com/bitnami/charts/issues/34323)
 
 ## <small>4.8.14 (2025-06-06)</small>
 

+ 10 - 7
bitnami/grafana-loki/Chart.lock

@@ -1,18 +1,21 @@
 dependencies:
+- name: grafana-alloy
+  repository: oci://registry-1.docker.io/bitnamicharts
+  version: 0.2.1
 - name: memcached
   repository: oci://registry-1.docker.io/bitnamicharts
-  version: 7.8.1
+  version: 7.8.5
 - name: memcached
   repository: oci://registry-1.docker.io/bitnamicharts
-  version: 7.8.1
+  version: 7.8.5
 - name: memcached
   repository: oci://registry-1.docker.io/bitnamicharts
-  version: 7.8.1
+  version: 7.8.5
 - name: memcached
   repository: oci://registry-1.docker.io/bitnamicharts
-  version: 7.8.1
+  version: 7.8.5
 - name: common
   repository: oci://registry-1.docker.io/bitnamicharts
-  version: 2.31.0
-digest: sha256:0312bce29b111de7f20dce7ff94982ee396abbfcb8cf8c4f8ac00cdc35463768
-generated: "2025-05-06T10:15:24.566828533+02:00"
+  version: 2.31.1
+digest: sha256:723979019bf323373130482740874a78a9794126818948d9079d1415ff1d8b1e
+generated: "2025-06-12T12:59:56.140636+02:00"

+ 6 - 3
bitnami/grafana-loki/Chart.yaml

@@ -10,13 +10,16 @@ annotations:
       image: docker.io/bitnami/nginx:1.28.0-debian-12-r3
     - name: os-shell
       image: docker.io/bitnami/os-shell:12-debian-12-r46
-    - name: promtail
-      image: docker.io/bitnami/promtail:3.5.1-debian-12-r3
   licenses: Apache-2.0
   tanzuCategory: application
 apiVersion: v2
 appVersion: 3.5.1
 dependencies:
+- alias: grafanaalloy
+  condition: grafanaalloy.enabled
+  name: grafana-alloy
+  repository: oci://registry-1.docker.io/bitnamicharts
+  version: 0.x.x
 - alias: memcachedchunks
   condition: memcachedchunks.enabled
   name: memcached
@@ -58,4 +61,4 @@ maintainers:
 name: grafana-loki
 sources:
 - https://github.com/bitnami/charts/tree/main/bitnami/grafana-loki
-version: 4.8.15
+version: 5.0.0

+ 36 - 114
bitnami/grafana-loki/README.md

@@ -1354,120 +1354,32 @@ The [Bitnami grafana-loki](https://github.com/bitnami/containers/tree/main/bitna
 | `tableManager.networkPolicy.ingressNSMatchLabels`    | Labels to match to allow traffic from other namespaces. Ignored if `tableManager.networkPolicy.allowExternal` is true.     | `{}`        |
 | `tableManager.networkPolicy.ingressNSPodMatchLabels` | Pod labels to match to allow traffic from other namespaces. Ignored if `tableManager.networkPolicy.allowExternal` is true. | `{}`        |
 
-### Promtail Deployment Parameters
-
-| Name                                                         | Description                                                                                                                                                                                                                         | Value                      |
-| ------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------- |
-| `promtail.enabled`                                           | Deploy promtail                                                                                                                                                                                                                     | `true`                     |
-| `promtail.image.registry`                                    | Grafana Promtail image registry                                                                                                                                                                                                     | `REGISTRY_NAME`            |
-| `promtail.image.repository`                                  | Grafana Promtail image repository                                                                                                                                                                                                   | `REPOSITORY_NAME/promtail` |
-| `promtail.image.digest`                                      | Grafana Promtail image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag                                                                                                                    | `""`                       |
-| `promtail.image.pullPolicy`                                  | Grafana Promtail image pull policy                                                                                                                                                                                                  | `IfNotPresent`             |
-| `promtail.image.pullSecrets`                                 | Grafana Promtail image pull secrets                                                                                                                                                                                                 | `[]`                       |
-| `promtail.extraEnvVars`                                      | Array with extra environment variables to add to promtail nodes                                                                                                                                                                     | `[]`                       |
-| `promtail.extraEnvVarsCM`                                    | Name of existing ConfigMap containing extra env vars for promtail nodes                                                                                                                                                             | `""`                       |
-| `promtail.extraEnvVarsSecret`                                | Name of existing Secret containing extra env vars for promtail nodes                                                                                                                                                                | `""`                       |
-| `promtail.command`                                           | Override default container command (useful when using custom images)                                                                                                                                                                | `[]`                       |
-| `promtail.args`                                              | Override default container args (useful when using custom images)                                                                                                                                                                   | `[]`                       |
-| `promtail.extraArgs`                                         | Additional container args (will be concatenated to args, unless diagnosticMode is enabled)                                                                                                                                          | `[]`                       |
-| `promtail.containerPorts.http`                               | Promtail HTTP port                                                                                                                                                                                                                  | `8080`                     |
-| `promtail.containerPorts.grpc`                               | Promtail HTTP port                                                                                                                                                                                                                  | `9095`                     |
-| `promtail.livenessProbe.enabled`                             | Enable livenessProbe on Promtail nodes                                                                                                                                                                                              | `true`                     |
-| `promtail.livenessProbe.initialDelaySeconds`                 | Initial delay seconds for livenessProbe                                                                                                                                                                                             | `10`                       |
-| `promtail.livenessProbe.periodSeconds`                       | Period seconds for livenessProbe                                                                                                                                                                                                    | `10`                       |
-| `promtail.livenessProbe.timeoutSeconds`                      | Timeout seconds for livenessProbe                                                                                                                                                                                                   | `1`                        |
-| `promtail.livenessProbe.failureThreshold`                    | Failure threshold for livenessProbe                                                                                                                                                                                                 | `3`                        |
-| `promtail.livenessProbe.successThreshold`                    | Success threshold for livenessProbe                                                                                                                                                                                                 | `1`                        |
-| `promtail.readinessProbe.enabled`                            | Enable readinessProbe on Promtail nodes                                                                                                                                                                                             | `true`                     |
-| `promtail.readinessProbe.initialDelaySeconds`                | Initial delay seconds for readinessProbe                                                                                                                                                                                            | `10`                       |
-| `promtail.readinessProbe.periodSeconds`                      | Period seconds for readinessProbe                                                                                                                                                                                                   | `10`                       |
-| `promtail.readinessProbe.timeoutSeconds`                     | Timeout seconds for readinessProbe                                                                                                                                                                                                  | `1`                        |
-| `promtail.readinessProbe.failureThreshold`                   | Failure threshold for readinessProbe                                                                                                                                                                                                | `3`                        |
-| `promtail.readinessProbe.successThreshold`                   | Success threshold for readinessProbe                                                                                                                                                                                                | `1`                        |
-| `promtail.startupProbe.enabled`                              | Enable startupProbe on Promtail containers                                                                                                                                                                                          | `false`                    |
-| `promtail.startupProbe.initialDelaySeconds`                  | Initial delay seconds for startupProbe                                                                                                                                                                                              | `30`                       |
-| `promtail.startupProbe.periodSeconds`                        | Period seconds for startupProbe                                                                                                                                                                                                     | `10`                       |
-| `promtail.startupProbe.timeoutSeconds`                       | Timeout seconds for startupProbe                                                                                                                                                                                                    | `1`                        |
-| `promtail.startupProbe.failureThreshold`                     | Failure threshold for startupProbe                                                                                                                                                                                                  | `15`                       |
-| `promtail.startupProbe.successThreshold`                     | Success threshold for startupProbe                                                                                                                                                                                                  | `1`                        |
-| `promtail.customLivenessProbe`                               | Custom livenessProbe that overrides the default one                                                                                                                                                                                 | `{}`                       |
-| `promtail.customReadinessProbe`                              | Custom readinessProbe that overrides the default one                                                                                                                                                                                | `{}`                       |
-| `promtail.customStartupProbe`                                | Custom startupProbe that overrides the default one                                                                                                                                                                                  | `{}`                       |
-| `promtail.lifecycleHooks`                                    | for the promtail container(s) to automate configuration before or after startup                                                                                                                                                     | `{}`                       |
-| `promtail.resourcesPreset`                                   | Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if promtail.resources is set (promtail.resources is recommended for production). | `nano`                     |
-| `promtail.resources`                                         | Set container requests and limits for different resources like CPU or memory (essential for production workloads)                                                                                                                   | `{}`                       |
-| `promtail.podSecurityContext.enabled`                        | Enabled Promtail pods' Security Context                                                                                                                                                                                             | `true`                     |
-| `promtail.podSecurityContext.fsGroupChangePolicy`            | Set filesystem group change policy                                                                                                                                                                                                  | `Always`                   |
-| `promtail.podSecurityContext.sysctls`                        | Set kernel settings using the sysctl interface                                                                                                                                                                                      | `[]`                       |
-| `promtail.podSecurityContext.supplementalGroups`             | Set filesystem extra groups                                                                                                                                                                                                         | `[]`                       |
-| `promtail.podSecurityContext.fsGroup`                        | Set Promtail pod's Security Context fsGroup                                                                                                                                                                                         | `0`                        |
-| `promtail.containerSecurityContext.enabled`                  | Enabled containers' Security Context                                                                                                                                                                                                | `true`                     |
-| `promtail.containerSecurityContext.seLinuxOptions`           | Set SELinux options in container                                                                                                                                                                                                    | `{}`                       |
-| `promtail.containerSecurityContext.runAsUser`                | Set containers' Security Context runAsUser                                                                                                                                                                                          | `0`                        |
-| `promtail.containerSecurityContext.runAsGroup`               | Set containers' Security Context runAsGroup                                                                                                                                                                                         | `0`                        |
-| `promtail.containerSecurityContext.runAsNonRoot`             | Set container's Security Context runAsNonRoot                                                                                                                                                                                       | `false`                    |
-| `promtail.containerSecurityContext.privileged`               | Set container's Security Context privileged                                                                                                                                                                                         | `false`                    |
-| `promtail.containerSecurityContext.readOnlyRootFilesystem`   | Set container's Security Context readOnlyRootFilesystem                                                                                                                                                                             | `true`                     |
-| `promtail.containerSecurityContext.allowPrivilegeEscalation` | Set container's Security Context allowPrivilegeEscalation                                                                                                                                                                           | `false`                    |
-| `promtail.containerSecurityContext.capabilities.drop`        | List of capabilities to be dropped                                                                                                                                                                                                  | `["ALL"]`                  |
-| `promtail.containerSecurityContext.seccompProfile.type`      | Set container's Security Context seccomp profile                                                                                                                                                                                    | `RuntimeDefault`           |
-| `promtail.automountServiceAccountToken`                      | Mount Service Account token in pod                                                                                                                                                                                                  | `true`                     |
-| `promtail.hostAliases`                                       | promtail pods host aliases                                                                                                                                                                                                          | `[]`                       |
-| `promtail.podLabels`                                         | Extra labels for promtail pods                                                                                                                                                                                                      | `{}`                       |
-| `promtail.podAnnotations`                                    | Annotations for promtail pods                                                                                                                                                                                                       | `{}`                       |
-| `promtail.podAffinityPreset`                                 | Pod affinity preset. Ignored if `promtail.affinity` is set. Allowed values: `soft` or `hard`                                                                                                                                        | `""`                       |
-| `promtail.podAntiAffinityPreset`                             | Pod anti-affinity preset. Ignored if `promtail.affinity` is set. Allowed values: `soft` or `hard`                                                                                                                                   | `soft`                     |
-| `promtail.nodeAffinityPreset.type`                           | Node affinity preset type. Ignored if `promtail.affinity` is set. Allowed values: `soft` or `hard`                                                                                                                                  | `""`                       |
-| `promtail.nodeAffinityPreset.key`                            | Node label key to match. Ignored if `promtail.affinity` is set                                                                                                                                                                      | `""`                       |
-| `promtail.nodeAffinityPreset.values`                         | Node label values to match. Ignored if `promtail.affinity` is set                                                                                                                                                                   | `[]`                       |
-| `promtail.affinity`                                          | Affinity for promtail pods assignment                                                                                                                                                                                               | `{}`                       |
-| `promtail.nodeSelector`                                      | Node labels for Promtail pods assignment                                                                                                                                                                                            | `{}`                       |
-| `promtail.tolerations`                                       | Tolerations for Promtail pods assignment                                                                                                                                                                                            | `[]`                       |
-| `promtail.topologySpreadConstraints`                         | Topology Spread Constraints for pod assignment spread across your cluster among failure-domains                                                                                                                                     | `[]`                       |
-| `promtail.priorityClassName`                                 | Promtail pods' priorityClassName                                                                                                                                                                                                    | `""`                       |
-| `promtail.schedulerName`                                     | Kubernetes pod scheduler registry                                                                                                                                                                                                   | `""`                       |
-| `promtail.updateStrategy.type`                               | Promtail statefulset strategy type                                                                                                                                                                                                  | `RollingUpdate`            |
-| `promtail.updateStrategy.rollingUpdate`                      | Promtail statefulset rolling update configuration parameters                                                                                                                                                                        | `nil`                      |
-| `promtail.extraVolumes`                                      | Optionally specify extra list of additional volumes for the Promtail pod(s)                                                                                                                                                         | `[]`                       |
-| `promtail.extraVolumeMounts`                                 | Optionally specify extra list of additional volumeMounts for the promtail container(s)                                                                                                                                              | `[]`                       |
-| `promtail.sidecars`                                          | Add additional sidecar containers to the Promtail pod(s)                                                                                                                                                                            | `[]`                       |
-| `promtail.initContainers`                                    | Add additional init containers to the Promtail pod(s)                                                                                                                                                                               | `[]`                       |
-| `promtail.enableServiceLinks`                                | Whether information about services should be injected into pod's environment variable                                                                                                                                               | `true`                     |
-| `promtail.configuration`                                     | Promtail configuration                                                                                                                                                                                                              | `""`                       |
-| `promtail.existingSecret`                                    | Name of a Secret that contains the Promtail configuration                                                                                                                                                                           | `""`                       |
-| `promtail.logLevel`                                          | Promtail logging level                                                                                                                                                                                                              | `info`                     |
-
-### Promtail Traffic Exposure Parameters
-
-| Name                                                   | Description                                                                                                            | Value       |
-| ------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------- | ----------- |
-| `promtail.service.type`                                | Promtail service type                                                                                                  | `ClusterIP` |
-| `promtail.service.ports.http`                          | Promtail HTTP service port                                                                                             | `3100`      |
-| `promtail.service.ports.grpc`                          | Promtail gRPC service port                                                                                             | `9095`      |
-| `promtail.service.nodePorts.http`                      | Node port for HTTP                                                                                                     | `""`        |
-| `promtail.service.sessionAffinityConfig`               | Additional settings for the sessionAffinity                                                                            | `{}`        |
-| `promtail.service.sessionAffinity`                     | Control where client requests go, to the same pod or round-robin                                                       | `None`      |
-| `promtail.service.clusterIP`                           | Promtail service Cluster IP                                                                                            | `""`        |
-| `promtail.service.loadBalancerIP`                      | Promtail service Load Balancer IP                                                                                      | `""`        |
-| `promtail.service.loadBalancerSourceRanges`            | Promtail service Load Balancer sources                                                                                 | `[]`        |
-| `promtail.service.externalTrafficPolicy`               | Promtail service external traffic policy                                                                               | `Cluster`   |
-| `promtail.service.annotations`                         | Additional custom annotations for Promtail service                                                                     | `{}`        |
-| `promtail.service.extraPorts`                          | Extra ports to expose in the Promtail service                                                                          | `[]`        |
-| `promtail.networkPolicy.enabled`                       | Specifies whether a NetworkPolicy should be created                                                                    | `true`      |
-| `promtail.networkPolicy.allowExternal`                 | Don't require server label for connections                                                                             | `true`      |
-| `promtail.networkPolicy.allowExternalEgress`           | Allow the pod to access any range of port and all destinations.                                                        | `true`      |
-| `promtail.networkPolicy.addExternalClientAccess`       | Allow access from pods with client label set to "true". Ignored if `promtail.networkPolicy.allowExternal` is true.     | `true`      |
-| `promtail.networkPolicy.kubeAPIServerPorts`            | List of possible endpoints to kube-apiserver (limit to your cluster settings to increase security)                     | `[]`        |
-| `promtail.networkPolicy.extraIngress`                  | Add extra ingress rules to the NetworkPolicy                                                                           | `[]`        |
-| `promtail.networkPolicy.extraEgress`                   | Add extra ingress rules to the NetworkPolicy                                                                           | `[]`        |
-| `promtail.networkPolicy.ingressPodMatchLabels`         | Labels to match to allow traffic from other pods. Ignored if `promtail.networkPolicy.allowExternal` is true.           | `{}`        |
-| `promtail.networkPolicy.ingressNSMatchLabels`          | Labels to match to allow traffic from other namespaces. Ignored if `promtail.networkPolicy.allowExternal` is true.     | `{}`        |
-| `promtail.networkPolicy.ingressNSPodMatchLabels`       | Pod labels to match to allow traffic from other namespaces. Ignored if `promtail.networkPolicy.allowExternal` is true. | `{}`        |
-| `promtail.rbac.create`                                 | Create RBAC rules                                                                                                      | `true`      |
-| `promtail.serviceAccount.create`                       | Enable creation of ServiceAccount for Promtail pods                                                                    | `true`      |
-| `promtail.serviceAccount.name`                         | The name of the ServiceAccount to use                                                                                  | `""`        |
-| `promtail.serviceAccount.automountServiceAccountToken` | Allows auto mount of ServiceAccountToken on the promtail.serviceAccount.created                                        | `false`     |
-| `promtail.serviceAccount.annotations`                  | Additional custom annotations for the ServiceAccount                                                                   | `{}`        |
+### Grafana Alloy Deployment Parameters
+
+| Name                        | Description                                                                      | Value       |
+| --------------------------- | -------------------------------------------------------------------------------- | ----------- |
+| `grafanaalloy.enabled`      | Deploy Grafana Alloy                                                             | `true`      |
+| `grafanaalloy.resourceType` | Type of controller to use for deploying Grafana Alloy in the cluster.            | `daemonset` |
+| `grafanaalloy.replicaCount` | Number of pods to deploy. Ignored when grafanaalloy.resourceType is 'daemonset'. | `1`         |
+
+### Alloy container specific parameters
+
+| Name                                         | Description                                                                                                                                                             | Value                                                                                   |
+| -------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
+| `grafanaalloy.alloy.stabilityLevel`          | Minimum stability level of components and behavior to enable. Must be                                                                                                   | `generally-available`                                                                   |
+| `grafanaalloy.alloy.listenAddr`              | Address to listen for traffic on. 0.0.0.0 exposes the UI to other containers.                                                                                           | `0.0.0.0`                                                                               |
+| `grafanaalloy.alloy.uiPathPrefix`            | Base path where the UI is exposed.                                                                                                                                      | `/`                                                                                     |
+| `grafanaalloy.alloy.storagePath`             | Path to where Grafana Alloy stores data (for example, the Write-Ahead Log).                                                                                             | `/tmp/alloy`                                                                            |
+| `grafanaalloy.alloy.enableReporting`         | Enables sending Grafana Labs anonymous usage stats to help improve Grafana grafanaalloy.alloy.                                                                          | `true`                                                                                  |
+| `grafanaalloy.alloy.mounts.varlog`           | Mount /var/log from the host into the container for log collection.                                                                                                     | `true`                                                                                  |
+| `grafanaalloy.alloy.mounts.dockercontainers` | Mount /var/lib/docker/containers from the host into the container for log                                                                                               | `true`                                                                                  |
+| `grafanaalloy.alloy.clustering.enabled`      | Deploy Grafana Alloy in a cluster to allow for load distribution.                                                                                                       | `false`                                                                                 |
+| `grafanaalloy.alloy.clustering.name`         | Name for the Grafana Alloy cluster. Used for differentiating between clusters.                                                                                          | `""`                                                                                    |
+| `grafanaalloy.alloy.clustering.portName`     | Name for the port used for clustering, useful if running inside an Istio Mesh                                                                                           | `http`                                                                                  |
+| `grafanaalloy.alloy.createSecret`            | Create a Secret with the default configuration for Grafana Alloy to send logs to Loki.                                                                                  | `true`                                                                                  |
+| `grafanaalloy.alloy.existingSecret`          | The name of an existing Secret with your custom configuration for Grafana Alloy. If the grafanaalloy.alloy.createSecret is set, it will create a Secret with this name. | `{{ ternary (printf "%s-alloy" (lower .Release.Name)) "" .Values.alloy.createSecret }}` |
+| `grafanaalloy.alloy.configuration`           | Specify content for Grafana Alloy config file. Omitted if grafanaalloy.alloy.existingSecret is provided.                                                                | `""`                                                                                    |
+| `grafanaalloy.alloy.extraConfig`             | Append extra configuration to the default config file                                                                                                                   | `""`                                                                                    |
 
 ### Init Container Parameters
 
@@ -1613,6 +1525,16 @@ Find more information about how to deal with common errors related to Bitnami's
 
 ## Upgrading
 
+### To 5.0.0
+
+This major replaces Promtail image with Alloy subchart. It is possible to convert configuration files from Promtail to Alloy using the following command:
+
+```console
+alloy convert -f promtail PROMTAIL_FILE
+```
+
+You can find more information about the Alloy conversion process in [this documentation](https://grafana.com/docs/alloy/latest/set-up/migrate/from-promtail/).
+
 ### To 4.7.0
 
 This version introduces image verification for security purposes. To disable it, set `global.security.allowInsecureImages` to `true`. More details at [GitHub issue](https://github.com/bitnami/charts/issues/30850).

+ 6 - 5
bitnami/grafana-loki/templates/NOTES.txt

@@ -32,8 +32,8 @@ Installed components:
   * distributor
   * querier
   * query-frontend
-  {{- if .Values.promtail.enabled }}
-  * promtail
+  {{- if .Values.grafanaalloy.enabled }}
+  * alloy
   {{- end }}
   {{- if .Values.compactor.enabled }}
   * compactor
@@ -102,8 +102,9 @@ Installed components:
 {{- end }}
 {{- end }}
 
+
 {{- include "grafana-loki.checkRollingTags" . }}
 {{- include "grafana-loki.validateValues" . }}
-{{- include "common.warnings.resources" (dict "sections" (list "compactor" "distributor" "gateway" "indexGateway" "ingester" "promtail" "querier" "queryFrontend" "queryScheduler" "ruler" "tableManager" "volumePermissions") "context" $) }}
-{{- include "common.warnings.modifiedImages" (dict "images" (list .Values.loki.image .Values.gateway.image .Values.promtail.image .Values.volumePermissions.image) "context" $) }}
-{{- include "common.errors.insecureImages" (dict "images" (list .Values.loki.image .Values.gateway.image .Values.promtail.image .Values.volumePermissions.image) "context" $) }}
+{{- include "common.warnings.resources" (dict "sections" (list "compactor" "distributor" "gateway" "indexGateway" "ingester" "querier" "queryFrontend" "queryScheduler" "ruler" "tableManager" "volumePermissions") "context" $) }}
+{{- include "common.warnings.modifiedImages" (dict "images" (list .Values.loki.image .Values.gateway.image .Values.volumePermissions.image) "context" $) }}
+{{- include "common.errors.insecureImages" (dict "images" (list .Values.loki.image .Values.gateway.image .Values.volumePermissions.image) "context" $) }}

+ 5 - 35
bitnami/grafana-loki/templates/_helpers.tpl

@@ -87,17 +87,10 @@ Return the proper Grafana Loki gossip-ring fullname
 {{- end -}}
 
 {{/*
-Return the proper Grafana Loki promtail fullname
+Return the proper Grafana Loki alloy fullname
 */}}
-{{- define "grafana-loki.promtail.fullname" -}}
-{{- printf "%s-%s" (include "common.names.fullname" .) "promtail" | trunc 63 | trimSuffix "-" -}}
-{{- end -}}
-
-{{/*
-Return the proper Grafana Loki image name
-*/}}
-{{- define "grafana-loki.promtail.image" -}}
-{{ include "common.images.image" (dict "imageRoot" .Values.promtail.image "global" .Values.global) }}
+{{- define "grafana-loki.grafana-alloy.fullname" -}}
+{{- printf "%s-%s" (include "common.names.fullname" .) "grafanaalloy" | trunc 63 | trimSuffix "-" -}}
 {{- end -}}
 
 {{/*
@@ -118,7 +111,7 @@ Return the proper Grafana Loki image name
 Return the proper Docker Image Registry Secret Names
 */}}
 {{- define "grafana-loki.imagePullSecrets" -}}
-{{- include "common.images.renderPullSecrets" (dict "images" (list .Values.loki.image .Values.gateway.image .Values.promtail.image .Values.volumePermissions.image) "context" $) -}}
+{{- include "common.images.renderPullSecrets" (dict "images" (list .Values.loki.image .Values.gateway.image .Values.volumePermissions.image) "context" $) -}}
 {{- end -}}
 
 {{/*
@@ -144,18 +137,7 @@ Get the Loki configuration configmap.
 {{- end -}}
 
 {{/*
-Get the promtail configuration configmap.
-*/}}
-{{- define "grafana-loki.promtail.secretName" -}}
-{{- if .Values.promtail.existingSecret -}}
-    {{- .Values.promtail.existingSecret -}}
-{{- else }}
-    {{- include "grafana-loki.promtail.fullname" .  -}}
-{{- end -}}
-{{- end -}}
-
-{{/*
-Get the promtail configuration configmap.
+Get the gateway configuration secret.
 */}}
 {{- define "grafana-loki.gateway.secretName" -}}
 {{- if .Values.gateway.auth.existingSecret -}}
@@ -165,17 +147,6 @@ Get the promtail configuration configmap.
 {{- end -}}
 {{- end -}}
 
-{{/*
-Create the name of the service account to use
-*/}}
-{{- define "grafana-loki.promtail.serviceAccountName" -}}
-{{- if .Values.promtail.serviceAccount.create -}}
-    {{ default (printf "%s" (include "grafana-loki.promtail.fullname" .)) .Values.promtail.serviceAccount.name }}
-{{- else -}}
-    {{ default "default" .Values.promtail.serviceAccount.name }}
-{{- end -}}
-{{- end -}}
-
 {{/*
 Create a default fully qualified memcached (chunks) name.
 We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
@@ -285,7 +256,6 @@ Check if there are rolling tags in the images
 */}}
 {{- define "grafana-loki.checkRollingTags" -}}
 {{- include "common.warnings.rollingTag" .Values.loki.image }}
-{{- include "common.warnings.rollingTag" .Values.promtail.image }}
 {{- include "common.warnings.rollingTag" .Values.gateway.image }}
 {{- include "common.warnings.rollingTag" .Values.volumePermissions.image }}
 {{- end -}}

+ 116 - 0
bitnami/grafana-loki/templates/alloy/secret.yaml

@@ -0,0 +1,116 @@
+{{- /*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+
+{{- if and .Values.grafanaalloy.enabled .Values.grafanaalloy.alloy.createSecret }}
+apiVersion: v1
+kind: Secret
+metadata:
+  name: {{ printf "%s-alloy" (lower .Release.Name) }}
+  namespace: {{ include "common.names.namespace" . | quote }}
+  labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
+    app.kubernetes.io/component: alloy
+    app.kubernetes.io/part-of: grafana-alloy
+  {{- if .Values.commonAnnotations }}
+  annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
+  {{- end }}
+stringData:
+  config.alloy: |
+      discovery.kubernetes "kubernetes_pods" {
+              role = "pod"
+      }
+
+      discovery.relabel "kubernetes_pods" {
+              targets = discovery.kubernetes.kubernetes_pods.targets
+
+              rule {
+                      source_labels = ["__meta_kubernetes_pod_controller_name"]
+                      regex         = "([0-9a-z-.]+?)(-[0-9a-f]{8,10})?"
+                      target_label  = "__tmp_controller_name"
+              }
+
+              rule {
+                      source_labels = ["__meta_kubernetes_pod_label_app_kubernetes_io_name", "__meta_kubernetes_pod_label_app", "__tmp_controller_name", "__meta_kubernetes_pod_name"]
+                      regex         = "^;*([^;]+)(;.*)?$"
+                      target_label  = "app"
+              }
+
+              rule {
+                      source_labels = ["__meta_kubernetes_pod_label_app_kubernetes_io_component", "__meta_kubernetes_pod_label_component"]
+                      regex         = "^;*([^;]+)(;.*)?$"
+                      target_label  = "component"
+              }
+
+              rule {
+                      source_labels = ["__meta_kubernetes_pod_node_name"]
+                      target_label  = "node_name"
+              }
+
+              rule {
+                      source_labels = ["__meta_kubernetes_namespace"]
+                      target_label  = "namespace"
+              }
+
+              rule {
+                      source_labels = ["namespace", "app"]
+                      separator     = "/"
+                      target_label  = "job"
+              }
+
+              rule {
+                      source_labels = ["__meta_kubernetes_pod_name"]
+                      target_label  = "pod"
+              }
+
+              rule {
+                      source_labels = ["__meta_kubernetes_pod_container_name"]
+                      target_label  = "container"
+              }
+
+              rule {
+                      source_labels = ["__meta_kubernetes_pod_uid", "__meta_kubernetes_pod_container_name"]
+                      separator     = "/"
+                      target_label  = "__path__"
+                      replacement   = "/var/log/pods/*$1/*.log"
+              }
+
+              rule {
+                      source_labels = ["__meta_kubernetes_pod_annotationpresent_kubernetes_io_config_hash", "__meta_kubernetes_pod_annotation_kubernetes_io_config_hash", "__meta_kubernetes_pod_container_name"]
+                      separator     = "/"
+                      regex         = "true/(.*)"
+                      target_label  = "__path__"
+                      replacement   = "/var/log/pods/*$1/*.log"
+              }
+      }
+
+      local.file_match "kubernetes_pods" {
+              path_targets = discovery.relabel.kubernetes_pods.output
+      }
+
+      loki.process "kubernetes_pods" {
+              forward_to = [loki.write.default.receiver]
+
+              stage.cri { }
+      }
+
+      loki.source.file "kubernetes_pods" {
+              targets               = local.file_match.kubernetes_pods.targets
+              forward_to            = [loki.process.kubernetes_pods.receiver]
+              legacy_positions_file = "/run/promtail/positions.yaml"
+      }
+
+      loki.write "default" {
+              endpoint {
+                      url = "http://{{ include "grafana-loki.gateway.fullname" . }}:{{ .Values.gateway.service.ports.http }}/loki/api/v1/push"
+                      {{- if .Values.gateway.auth.enabled }}
+                      basic_auth {
+                        username      = "{{ .Values.gateway.auth.username }}"
+                        password      = "{{ .Values.gateway.auth.password }}"
+                      }
+                      {{- end }}
+              }
+              external_labels = {}
+      }
+{{- end }}

+ 1 - 2
bitnami/grafana-loki/templates/compactor/servicemonitor.yaml

@@ -9,8 +9,7 @@ kind: ServiceMonitor
 metadata:
   name: {{ template "grafana-loki.compactor.fullname" . }}
   namespace: {{ default .Release.Namespace .Values.metrics.serviceMonitor.namespace | quote }}
-  {{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.promtail.image "chart" .Chart ) ) }}
-  {{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.metrics.serviceMonitor.labels .Values.commonLabels $versionLabel ) "context" . ) }}
+  {{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.metrics.serviceMonitor.labels .Values.commonLabels ) "context" . ) }}
   labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
     app.kubernetes.io/part-of: grafana-loki
     app.kubernetes.io/component: compactor

+ 1 - 2
bitnami/grafana-loki/templates/distributor/servicemonitor.yaml

@@ -9,8 +9,7 @@ kind: ServiceMonitor
 metadata:
   name: {{ template "grafana-loki.distributor.fullname" . }}
   namespace: {{ default .Release.Namespace .Values.metrics.serviceMonitor.namespace | quote }}
-  {{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.promtail.image "chart" .Chart ) ) }}
-  {{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.metrics.serviceMonitor.labels .Values.commonLabels $versionLabel ) "context" . ) }}
+  {{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.metrics.serviceMonitor.labels .Values.commonLabels ) "context" . ) }}
   labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
     app.kubernetes.io/part-of: grafana-loki
     app.kubernetes.io/component: distributor

+ 1 - 3
bitnami/grafana-loki/templates/gateway/secret.yaml

@@ -19,7 +19,5 @@ metadata:
   {{- end }}
 type: Opaque
 data:
-  {{- $password := (include "common.secrets.passwords.manage" (dict "secret" (include "grafana-loki.gateway.fullname" .) "key" "password" "providedValues" (list "gateway.auth.password") "context" $)) }}
-  password: {{ $password | quote }}
-  htpasswd: {{ htpasswd .Values.gateway.auth.username (b64dec $password) | b64enc | quote }}
+  htpasswd: {{ htpasswd .Values.gateway.auth.username .Values.gateway.auth.password | b64enc | quote }}
 {{- end }}

+ 1 - 2
bitnami/grafana-loki/templates/index-gateway/servicemonitor.yaml

@@ -9,8 +9,7 @@ kind: ServiceMonitor
 metadata:
   name: {{ template "grafana-loki.index-gateway.fullname" . }}
   namespace: {{ default .Release.Namespace .Values.metrics.serviceMonitor.namespace | quote }}
-  {{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.promtail.image "chart" .Chart ) ) }}
-  {{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.metrics.serviceMonitor.labels .Values.commonLabels $versionLabel ) "context" . ) }}
+  {{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.metrics.serviceMonitor.labels .Values.commonLabels ) "context" . ) }}
   labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
     app.kubernetes.io/part-of: grafana-loki
     app.kubernetes.io/component: index-gateway

+ 1 - 2
bitnami/grafana-loki/templates/ingester/servicemonitor.yaml

@@ -9,8 +9,7 @@ kind: ServiceMonitor
 metadata:
   name: {{ template "grafana-loki.ingester.fullname" . }}
   namespace: {{ default .Release.Namespace .Values.metrics.serviceMonitor.namespace | quote }}
-  {{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.promtail.image "chart" .Chart ) ) }}
-  {{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.metrics.serviceMonitor.labels .Values.commonLabels $versionLabel ) "context" . ) }}
+  {{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.metrics.serviceMonitor.labels .Values.commonLabels ) "context" . ) }}
   labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
     app.kubernetes.io/part-of: grafana-loki
     app.kubernetes.io/component: ingester

+ 0 - 32
bitnami/grafana-loki/templates/promtail/clusterrole.yaml

@@ -1,32 +0,0 @@
-{{- /*
-Copyright Broadcom, Inc. All Rights Reserved.
-SPDX-License-Identifier: APACHE-2.0
-*/}}
-
-{{- if and .Values.promtail.enabled .Values.promtail.rbac.create }}
-apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
-kind: ClusterRole
-metadata:
-  {{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.promtail.image "chart" .Chart ) ) }}  
-  {{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
-  labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
-    app.kubernetes.io/part-of: grafana-loki
-    app.kubernetes.io/component: promtail
-  name: {{ printf "%s-%s" (include "common.names.fullname.namespace" .) "promtail" }}
-  {{- if .Values.commonAnnotations }}
-  annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
-  {{- end }}
-rules:
-  - apiGroups:
-      - ""
-    resources:
-      - nodes
-      - nodes/proxy
-      - services
-      - endpoints
-      - pods
-    verbs:
-      - get
-      - watch
-      - list
-{{- end }}

+ 0 - 27
bitnami/grafana-loki/templates/promtail/clusterrolebinding.yaml

@@ -1,27 +0,0 @@
-{{- /*
-Copyright Broadcom, Inc. All Rights Reserved.
-SPDX-License-Identifier: APACHE-2.0
-*/}}
-
-{{- if and .Values.promtail.enabled .Values.promtail.rbac.create }}
-apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
-kind: ClusterRoleBinding
-metadata:
-  {{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.promtail.image "chart" .Chart ) ) }}  
-  {{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
-  labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
-    app.kubernetes.io/part-of: grafana-loki
-    app.kubernetes.io/component: promtail
-  name: {{ printf "%s-%s" (include "common.names.fullname.namespace" .) "promtail" }}
-  {{- if .Values.commonAnnotations }}
-  annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
-  {{- end }}
-roleRef:
-  apiGroup: rbac.authorization.k8s.io
-  kind: ClusterRole
-  name: {{ printf "%s-%s" (include "common.names.fullname.namespace" .) "promtail" }}
-subjects:
-  - kind: ServiceAccount
-    name: {{ template "grafana-loki.promtail.serviceAccountName" . }}
-    namespace: {{ include "common.names.namespace" . | quote }}
-{{- end }}

+ 0 - 206
bitnami/grafana-loki/templates/promtail/daemonset.yaml

@@ -1,206 +0,0 @@
-{{- /*
-Copyright Broadcom, Inc. All Rights Reserved.
-SPDX-License-Identifier: APACHE-2.0
-*/}}
-
-{{- if .Values.promtail.enabled }}
-apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }}
-kind: DaemonSet
-metadata:
-  name: {{ template "grafana-loki.promtail.fullname" . }}
-  namespace: {{ .Release.Namespace | quote }}
-  {{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.promtail.image "chart" .Chart ) ) }}
-  {{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
-  labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
-    app.kubernetes.io/part-of: grafana-loki
-    app.kubernetes.io/component: promtail
-  {{- if .Values.commonAnnotations }}
-  annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
-  {{- end }}
-spec:
-  {{- if .Values.promtail.updateStrategy }}
-  updateStrategy: {{- toYaml .Values.promtail.updateStrategy | nindent 4 }}
-  {{- end }}
-  {{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.promtail.podLabels .Values.commonLabels $versionLabel ) "context" . ) }}
-  selector:
-    matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
-      app.kubernetes.io/part-of: grafana-loki
-      app.kubernetes.io/component: promtail
-  template:
-    metadata:
-      annotations:
-        checksum/config: {{ include (print $.Template.BasePath "/loki-configmap.yaml") . | sha256sum }}
-        {{- if .Values.promtail.podAnnotations }}
-        {{- include "common.tplvalues.render" (dict "value" .Values.promtail.podAnnotations "context" $) | nindent 8 }}
-        {{- end }}
-      labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }}
-        app.kubernetes.io/part-of: grafana-loki
-        app.kubernetes.io/component: promtail
-    spec:
-      serviceAccountName: {{ template "grafana-loki.promtail.serviceAccountName" . }}
-      {{- include "grafana-loki.imagePullSecrets" . | nindent 6 }}
-      automountServiceAccountToken: {{ .Values.promtail.automountServiceAccountToken }}
-      {{- if .Values.promtail.hostAliases }}
-      hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.promtail.hostAliases "context" $) | nindent 8 }}
-      {{- end }}
-      {{- if .Values.promtail.affinity }}
-      affinity: {{- include "common.tplvalues.render" ( dict "value" .Values.promtail.affinity "context" $) | nindent 8 }}
-      {{- else }}
-      affinity:
-        podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.promtail.podAffinityPreset "component" "promtail" "customLabels" $podLabels "context" $) | nindent 10 }}
-        podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.promtail.podAntiAffinityPreset "component" "promtail" "customLabels" $podLabels "context" $) | nindent 10 }}
-        nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.promtail.nodeAffinityPreset.type "key" .Values.promtail.nodeAffinityPreset.key "values" .Values.promtail.nodeAffinityPreset.values) | nindent 10 }}
-      {{- end }}
-      {{- if .Values.promtail.nodeSelector }}
-      nodeSelector: {{- include "common.tplvalues.render" ( dict "value" .Values.promtail.nodeSelector "context" $) | nindent 8 }}
-      {{- end }}
-      {{- if .Values.promtail.tolerations }}
-      tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.promtail.tolerations "context" .) | nindent 8 }}
-      {{- end }}
-      {{- if .Values.promtail.topologySpreadConstraints }}
-      topologySpreadConstraints: {{- include "common.tplvalues.render" (dict "value" .Values.promtail.topologySpreadConstraints "context" .) | nindent 8 }}
-      {{- end }}
-      {{- if .Values.promtail.priorityClassName }}
-      priorityClassName: {{ .Values.promtail.priorityClassName | quote }}
-      {{- end }}
-      {{- if .Values.promtail.schedulerName }}
-      schedulerName: {{ .Values.promtail.schedulerName }}
-      {{- end }}
-      {{- if .Values.promtail.podSecurityContext.enabled }}
-      securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.promtail.podSecurityContext "context" $) | nindent 8 }}
-      {{- end }}
-      enableServiceLinks: {{ .Values.promtail.enableServiceLinks }}
-      initContainers:
-        {{- if .Values.promtail.initContainers }}
-          {{- include "common.tplvalues.render" (dict "value" .Values.promtail.initContainers "context" $) | nindent 8 }}
-        {{- end }}
-      containers:
-        - name: promtail
-          image: {{ template "grafana-loki.promtail.image" . }}
-          imagePullPolicy: {{ .Values.loki.image.pullPolicy }}
-          {{- if .Values.promtail.containerSecurityContext.enabled }}
-          securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.promtail.containerSecurityContext "context" $) | nindent 12 }}
-          {{- end }}
-          {{- if .Values.diagnosticMode.enabled }}
-          command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 12 }}
-          {{- else if .Values.promtail.command }}
-          command: {{- include "common.tplvalues.render" (dict "value" .Values.promtail.command "context" $) | nindent 12 }}
-          {{- end }}
-          {{- if .Values.diagnosticMode.enabled }}
-          args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 12 }}
-          {{- else if .Values.promtail.args }}
-          args: {{- include "common.tplvalues.render" (dict "value" .Values.promtail.args "context" $) | nindent 12 }}
-          {{- else }}
-          args:
-            - -config.file=/bitnami/promtail/conf/promtail.yaml
-          {{- if .Values.promtail.extraArgs }}
-          {{- include "common.tplvalues.render" (dict "value" .Values.promtail.extraArgs "context" $) | nindent 12 }}
-          {{- end }}
-          {{- end }}
-          env:
-            - name: HOSTNAME
-              valueFrom:
-                fieldRef:
-                  fieldPath: spec.nodeName
-            {{- if .Values.promtail.extraEnvVars }}
-            {{- include "common.tplvalues.render" (dict "value" .Values.promtail.extraEnvVars "context" $) | nindent 12 }}
-            {{- end }}
-          envFrom:
-            {{- if .Values.promtail.extraEnvVarsCM }}
-            - configMapRef:
-                name: {{ include "common.tplvalues.render" (dict "value" .Values.promtail.extraEnvVarsCM "context" $) }}
-            {{- end }}
-            {{- if .Values.promtail.extraEnvVarsSecret }}
-            - secretRef:
-                name: {{ include "common.tplvalues.render" (dict "value" .Values.promtail.extraEnvVarsSecret "context" $) }}
-            {{- end }}
-          ports:
-            - containerPort: {{ .Values.promtail.containerPorts.http }}
-              name: http
-            - containerPort: {{ .Values.promtail.containerPorts.grpc }}
-              name: grpc
-          {{- if .Values.promtail.resources }}
-          resources: {{- include "common.tplvalues.render" (dict "value" .Values.promtail.resources "context" $) | nindent 12 }}
-          {{- else if ne .Values.promtail.resourcesPreset "none" }}
-          resources: {{- include "common.resources.preset" (dict "type" .Values.promtail.resourcesPreset) | nindent 12 }}
-          {{- end }}
-          {{- if not .Values.diagnosticMode.enabled }}
-          {{- if .Values.promtail.customLivenessProbe }}
-          livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.promtail.customLivenessProbe "context" $) | nindent 12 }}
-          {{- else if .Values.promtail.livenessProbe.enabled }}
-          livenessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.promtail.livenessProbe "enabled") "context" $) | nindent 12 }}
-            tcpSocket:
-              port: http
-          {{- end }}
-          {{- if .Values.promtail.customReadinessProbe }}
-          readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.promtail.customReadinessProbe "context" $) | nindent 12 }}
-          {{- else if .Values.promtail.readinessProbe.enabled }}
-          readinessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.promtail.readinessProbe "enabled") "context" $) | nindent 12 }}
-            httpGet:
-              path: /ready
-              port: http
-          {{- end }}
-          {{- if .Values.promtail.customStartupProbe }}
-          startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.promtail.customStartupProbe "context" $) | nindent 12 }}
-          {{- else if .Values.promtail.startupProbe.enabled }}
-          startupProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.promtail.startupProbe "enabled") "context" $) | nindent 12 }}
-            httpGet:
-              path: /ready
-              port: http
-          {{- end }}
-          {{- end }}
-          {{- if .Values.promtail.lifecycleHooks }}
-          lifecycle: {{- include "common.tplvalues.render" (dict "value" .Values.promtail.lifecycleHooks "context" $) | nindent 12 }}
-          {{- end }}
-          volumeMounts:
-            - name: empty-dir
-              mountPath: /tmp
-              subPath: tmp-dir
-            - name: loki-config
-              mountPath: /bitnami/promtail/conf/promtail.yaml
-              subPath: promtail.yaml
-            - name: containers
-              mountPath: /var/lib/docker/containers
-              readOnly: true
-            - name: pods
-              mountPath: /var/log/pods
-              readOnly: true
-            - name: run
-              mountPath: /run/promtail
-          {{- if .Values.gateway.auth.enabled }}
-            - name: gateway-password
-              mountPath: /bitnami/promtail/conf/secrets
-          {{- end }}
-          {{- if .Values.promtail.extraVolumeMounts }}
-          {{- include "common.tplvalues.render" (dict "value" .Values.promtail.extraVolumeMounts "context" $) | nindent 12 }}
-          {{- end }}
-        {{- if .Values.promtail.sidecars }}
-        {{- include "common.tplvalues.render" ( dict "value" .Values.promtail.sidecars "context" $) | nindent 8 }}
-        {{- end }}
-      volumes:
-        - name: empty-dir
-          emptyDir: {}
-        - name: loki-config
-          secret:
-            secretName: {{ template "grafana-loki.promtail.secretName" . }}
-        - name: containers
-          hostPath:
-            path: /var/lib/docker/containers
-        - name: pods
-          hostPath:
-            path: /var/log/pods
-        - name: run
-          hostPath:
-            path: /run/promtail
-      {{- if .Values.gateway.auth.enabled }}
-        - name: gateway-password
-          secret:
-            secretName: {{ include "grafana-loki.gateway.secretName" . }}
-            items:
-              - key: password
-                path: password
-      {{- end }}
-        {{- if .Values.promtail.extraVolumes }}
-        {{- include "common.tplvalues.render" (dict "value" .Values.promtail.extraVolumes "context" $) | nindent 8 }}
-        {{- end }}
-{{- end }}

+ 0 - 140
bitnami/grafana-loki/templates/promtail/networkpolicy.yaml

@@ -1,140 +0,0 @@
-{{- /*
-Copyright Broadcom, Inc. All Rights Reserved.
-SPDX-License-Identifier: APACHE-2.0
-*/}}
-
-{{- if and .Values.promtail.enabled .Values.promtail.networkPolicy.enabled }}
-kind: NetworkPolicy
-apiVersion: {{ include "common.capabilities.networkPolicy.apiVersion" . }}
-metadata:
-  name: {{ template "grafana-loki.promtail.fullname" . }}
-  namespace: {{ include "common.names.namespace" . | quote }}
-  labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
-    app.kubernetes.io/part-of: grafana-loki
-    app.kubernetes.io/component: promtail
-  {{- if .Values.commonAnnotations }}
-  annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
-  {{- end }}
-spec:
-  {{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.promtail.podLabels .Values.commonLabels ) "context" . ) }}
-  podSelector:
-    matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
-      app.kubernetes.io/part-of: grafana-loki
-      app.kubernetes.io/component: promtail
-  policyTypes:
-    - Ingress
-    - Egress
-  {{- if .Values.promtail.networkPolicy.allowExternalEgress }}
-  egress:
-    - {}
-  {{- else }}
-  egress:
-    # Allow dns resolution
-    - ports:
-        - port: 53
-          protocol: UDP
-        - port: 53
-          protocol: TCP
-        {{- range $port := .Values.promtail.networkPolicy.kubeAPIServerPorts }}
-        - port: {{ $port }}
-        {{- end }}
-    # Allow outbound connections to loki cluster
-    - ports:
-        - port: {{ .Values.loki.containerPorts.http }}
-        - port: {{ .Values.loki.containerPorts.gossipRing }}
-        - port: {{ .Values.loki.containerPorts.grpc }}
-      to:
-        - podSelector:
-            matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 14 }}
-              app.kubernetes.io/part-of: grafana-loki
-    # Allow outbound connections to gateway
-    - ports:
-        - port: {{ .Values.gateway.containerPorts.http }}
-      to:
-        - podSelector:
-            matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 14 }}
-              app.kubernetes.io/part-of: grafana-loki
-              app.kubernetes.io/component: gateway
-    # Allow outbound connections to Memcached Chunks
-    - ports:
-      {{- if .Values.memcachedchunks.enabled }}
-        - port: {{ .Values.memcachedchunks.containerPorts.memcached }}
-      to:
-        - podSelector:
-            matchLabels:
-              app.kubernetes.io/name: memcachedchunks
-              app.kubernetes.io/instance: {{ .Release.Name }}              
-      {{- else }}
-        - port: {{ .Values.externalMemcachedChunks.port }}
-      {{- end }}
-    # Allow outbound connections to Memcached Metadata
-    - ports:
-      {{- if .Values.memcachedindexqueries.enabled }}
-        - port: {{ .Values.memcachedindexqueries.containerPorts.memcached }}
-      to:
-        - podSelector:
-            matchLabels:
-              app.kubernetes.io/name: memcachedindexqueries
-              app.kubernetes.io/instance: {{ .Release.Name }}              
-      {{- else }}
-        - port: {{ .Values.externalMemcachedIndexQueries.port }}
-      {{- end }}
-    # Allow outbound connections to Memcached Frontend
-    - ports:
-      {{- if .Values.memcachedfrontend.enabled }}
-        - port: {{ .Values.memcachedfrontend.containerPorts.memcached }}
-      to:
-        - podSelector:
-            matchLabels:
-              app.kubernetes.io/name: memcachedfrontend
-              app.kubernetes.io/instance: {{ .Release.Name }}              
-      {{- else }}
-        - port: {{ .Values.externalMemcachedFrontend.port }}
-      {{- end }}
-    # Allow outbound connections to Memcached Metadata
-    - ports:
-      {{- if .Values.memcachedindexwrites.enabled }}
-        - port: {{ .Values.memcachedindexwrites.containerPorts.memcached }}
-      to:
-        - podSelector:
-            matchLabels:
-              app.kubernetes.io/name: memcachedindexwrites
-              app.kubernetes.io/instance: {{ .Release.Name }}              
-      {{- else }}
-        - port: {{ .Values.externalMemcachedIndexWrites.port }}
-      {{- end }}
-    {{- if .Values.promtail.networkPolicy.extraEgress }}
-    {{- include "common.tplvalues.render" ( dict "value" .Values.promtail.networkPolicy.extraEgress "context" $ ) | nindent 4 }}
-    {{- end }}
-  {{- end }}
-  ingress:
-    - ports:
-        - port: {{ .Values.promtail.containerPorts.http }}
-        - port: {{ .Values.promtail.containerPorts.grpc }}
-      {{- if not .Values.promtail.networkPolicy.allowExternal }}
-      from:
-        - podSelector:
-            matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 14 }}
-              app.kubernetes.io/part-of: grafana-loki
-        {{- if .Values.promtail.networkPolicy.addExternalClientAccess }}
-        - podSelector:
-            matchLabels:
-              {{ template "grafana-loki.promtail.fullname" . }}-promtail: "true"
-        {{- end }}
-        {{- if .Values.promtail.networkPolicy.ingressPodMatchLabels }}
-        - podSelector:
-            matchLabels: {{- include "common.tplvalues.render" (dict "value" .Values.promtail.networkPolicy.ingressPodMatchLabels "context" $ ) | nindent 14 }}
-        {{- end }}
-        {{- if .Values.promtail.networkPolicy.ingressNSMatchLabels }}
-        - namespaceSelector:
-            matchLabels: {{- include "common.tplvalues.render" (dict "value" .Values.promtail.networkPolicy.ingressNSMatchLabels "context" $ ) | nindent 14 }}
-          {{- if .Values.promtail.networkPolicy.ingressNSPodMatchLabels }}
-          podSelector:
-            matchLabels: {{- include "common.tplvalues.render" (dict "value" .Values.promtail.networkPolicy.ingressNSPodMatchLabels "context" $ ) | nindent 14 }}
-          {{- end }}
-        {{- end }}
-      {{- end }}
-    {{- if .Values.promtail.networkPolicy.extraIngress }}
-    {{- include "common.tplvalues.render" ( dict "value" .Values.promtail.networkPolicy.extraIngress "context" $ ) | nindent 4 }}
-    {{- end }}
-{{- end }}

+ 0 - 23
bitnami/grafana-loki/templates/promtail/secret.yaml

@@ -1,23 +0,0 @@
-{{- /*
-Copyright Broadcom, Inc. All Rights Reserved.
-SPDX-License-Identifier: APACHE-2.0
-*/}}
-
-{{- if and .Values.promtail.enabled (not .Values.promtail.existingSecret) }}
-apiVersion: v1
-kind: Secret
-metadata:
-  name: {{ template "grafana-loki.promtail.fullname" . }}
-  namespace: {{ .Release.Namespace | quote }}
-  {{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.promtail.image "chart" .Chart ) ) }}  
-  {{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
-  labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
-    app.kubernetes.io/part-of: grafana-loki
-    app.kubernetes.io/component: loki
-  {{- if .Values.commonAnnotations }}
-  annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
-  {{- end }}
-stringData:
-  promtail.yaml: |-
-    {{- include "common.tplvalues.render" (dict "value" .Values.promtail.configuration "context" $) | nindent 4 }}
-{{- end }}

+ 0 - 22
bitnami/grafana-loki/templates/promtail/service-account.yaml

@@ -1,22 +0,0 @@
-{{- /*
-Copyright Broadcom, Inc. All Rights Reserved.
-SPDX-License-Identifier: APACHE-2.0
-*/}}
-
-{{- if and .Values.promtail.enabled .Values.promtail.serviceAccount.create }}
-apiVersion: v1
-kind: ServiceAccount
-metadata:
-  name: {{ template "grafana-loki.promtail.serviceAccountName" . }}
-  namespace: {{ .Release.Namespace | quote }}
-  {{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.promtail.image "chart" .Chart ) ) }}  
-  {{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
-  labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
-    app.kubernetes.io/part-of: grafana-loki
-    app.kubernetes.io/component: loki
-  {{- if or .Values.promtail.serviceAccount.annotations .Values.commonAnnotations }}
-  {{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.promtail.serviceAccount.annotations .Values.commonAnnotations ) "context" . ) }}
-  annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
-  {{- end }}
-automountServiceAccountToken: {{ .Values.promtail.serviceAccount.automountServiceAccountToken }}
-{{- end }}

+ 0 - 67
bitnami/grafana-loki/templates/promtail/service.yaml

@@ -1,67 +0,0 @@
-{{- /*
-Copyright Broadcom, Inc. All Rights Reserved.
-SPDX-License-Identifier: APACHE-2.0
-*/}}
-
-{{- if .Values.promtail.enabled }}
-apiVersion: v1
-kind: Service
-metadata:
-  name: {{ template "grafana-loki.promtail.fullname" . }}
-  namespace: {{ .Release.Namespace | quote }}
-  {{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.promtail.image "chart" .Chart ) ) }}  
-  {{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
-  labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
-    app.kubernetes.io/part-of: grafana-loki
-    app.kubernetes.io/component: promtail
-  {{- if or .Values.commonAnnotations .Values.promtail.service.annotations }}
-  {{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.promtail.service.annotations .Values.commonAnnotations ) "context" . ) }}
-  annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
-  {{- end }}
-spec:
-  type: {{ .Values.promtail.service.type }}
-  {{- if .Values.promtail.service.sessionAffinity }}
-  sessionAffinity: {{ .Values.promtail.service.sessionAffinity }}
-  {{- end }}
-  {{- if .Values.promtail.service.sessionAffinityConfig }}
-  sessionAffinityConfig: {{- include "common.tplvalues.render" (dict "value" .Values.promtail.service.sessionAffinityConfig "context" $) | nindent 4 }}
-  {{- end }}
-  {{- if .Values.promtail.service.clusterIP }}
-  clusterIP: {{ .Values.promtail.service.clusterIP }}
-  {{- end }}
-  {{- if (or (eq .Values.promtail.service.type "LoadBalancer") (eq .Values.promtail.service.type "NodePort")) }}
-  externalTrafficPolicy: {{ .Values.promtail.service.externalTrafficPolicy | quote }}
-  {{- end }}
-  {{ if eq .Values.promtail.service.type "LoadBalancer" }}
-  loadBalancerSourceRanges: {{ .Values.promtail.service.loadBalancerSourceRanges }}
-  {{ end }}
-  {{- if (and (eq .Values.promtail.service.type "LoadBalancer") (not (empty .Values.promtail.service.loadBalancerIP))) }}
-  loadBalancerIP: {{ .Values.promtail.service.loadBalancerIP }}
-  {{- end }}
-  ports:
-    - name: http
-      port: {{ .Values.promtail.service.ports.http }}
-      targetPort: http
-      protocol: TCP
-      {{- if (and (or (eq .Values.promtail.service.type "NodePort") (eq .Values.promtail.service.type "LoadBalancer")) (not (empty .Values.promtail.service.nodePorts.http))) }}
-      nodePort: {{ .Values.promtail.service.nodePorts.http }}
-      {{- else if eq .Values.promtail.service.type "ClusterIP" }}
-      nodePort: null
-      {{- end }}
-    - name: grpc
-      port: {{ .Values.promtail.service.ports.grpc }}
-      targetPort: grpc
-      protocol: TCP
-      {{- if (and (or (eq .Values.promtail.service.type "NodePort") (eq .Values.promtail.service.type "LoadBalancer")) (not (empty .Values.promtail.service.nodePorts.grpc))) }}
-      nodePort: {{ .Values.promtail.service.nodePorts.grpc }}
-      {{- else if eq .Values.promtail.service.type "ClusterIP" }}
-      nodePort: null
-      {{- end }}
-    {{- if .Values.promtail.service.extraPorts }}
-    {{- include "common.tplvalues.render" (dict "value" .Values.promtail.service.extraPorts "context" $) | nindent 4 }}
-    {{- end }}
-  {{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.promtail.podLabels .Values.commonLabels ) "context" . ) }}
-  selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }}
-    app.kubernetes.io/part-of: grafana-loki
-    app.kubernetes.io/component: promtail
-{{- end }}

+ 0 - 52
bitnami/grafana-loki/templates/promtail/servicemonitor.yaml

@@ -1,52 +0,0 @@
-{{- /*
-Copyright Broadcom, Inc. All Rights Reserved.
-SPDX-License-Identifier: APACHE-2.0
-*/}}
-
-{{- if and .Values.promtail.enabled .Values.metrics.enabled .Values.metrics.serviceMonitor.enabled }}
-apiVersion: monitoring.coreos.com/v1
-kind: ServiceMonitor
-metadata:
-  name: {{ template "grafana-loki.promtail.fullname" . }}
-  namespace: {{ default .Release.Namespace .Values.metrics.serviceMonitor.namespace | quote }}
-  {{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.promtail.image "chart" .Chart ) ) }}  
-  {{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.metrics.serviceMonitor.labels .Values.commonLabels $versionLabel ) "context" . ) }}
-  labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
-    app.kubernetes.io/part-of: grafana-loki
-    app.kubernetes.io/component: promtail
-   {{- if or .Values.commonAnnotations .Values.metrics.serviceMonitor.annotations }}
-   {{- $annotations := merge.Values.metrics.serviceMonitor.annotations .Values.commonAnnotations }}
-  annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
-  {{- end }}
-spec:
-  {{- if .Values.metrics.serviceMonitor.jobLabel }}
-  jobLabel: {{ .Values.metrics.serviceMonitor.jobLabel }}
-  {{- end }}
-  selector:
-    matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 6 }}
-      {{- if .Values.metrics.serviceMonitor.selector }}
-      {{- include "common.tplvalues.render" (dict "value" .Values.metrics.serviceMonitor.selector "context" $) | nindent 6 }}
-      {{- end }}
-      app.kubernetes.io/part-of: grafana-loki
-      app.kubernetes.io/component: promtail
-  endpoints:
-    - port: http
-      {{- if .Values.metrics.serviceMonitor.interval }}
-      interval: {{ .Values.metrics.serviceMonitor.interval }}
-      {{- end }}
-      {{- if .Values.metrics.serviceMonitor.scrapeTimeout }}
-      scrapeTimeout: {{ .Values.metrics.serviceMonitor.scrapeTimeout }}
-      {{- end }}
-      {{- if .Values.metrics.serviceMonitor.honorLabels }}
-      honorLabels: {{ .Values.metrics.serviceMonitor.honorLabels }}
-      {{- end }}
-      {{- if .Values.metrics.serviceMonitor.metricRelabelings }}
-      metricRelabelings: {{- toYaml .Values.metrics.serviceMonitor.metricRelabelings | nindent 6 }}
-      {{- end }}
-      {{- if .Values.metrics.serviceMonitor.relabelings }}
-      relabelings: {{- toYaml .Values.metrics.serviceMonitor.relabelings | nindent 6 }}
-      {{- end }}
-  namespaceSelector:
-    matchNames:
-      - {{ .Release.Namespace | quote }}
-{{- end }}

+ 1 - 2
bitnami/grafana-loki/templates/querier/servicemonitor.yaml

@@ -9,8 +9,7 @@ kind: ServiceMonitor
 metadata:
   name: {{ template "grafana-loki.querier.fullname" . }}
   namespace: {{ default .Release.Namespace .Values.metrics.serviceMonitor.namespace | quote }}
-  {{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.promtail.image "chart" .Chart ) ) }}
-  {{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.metrics.serviceMonitor.labels .Values.commonLabels $versionLabel ) "context" . ) }}
+  {{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.metrics.serviceMonitor.labels .Values.commonLabels ) "context" . ) }}
   labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
     app.kubernetes.io/part-of: grafana-loki
     app.kubernetes.io/component: querier

+ 1 - 2
bitnami/grafana-loki/templates/query-frontend/servicemonitor.yaml

@@ -9,8 +9,7 @@ kind: ServiceMonitor
 metadata:
   name: {{ template "grafana-loki.query-frontend.fullname" . }}
   namespace: {{ default .Release.Namespace .Values.metrics.serviceMonitor.namespace | quote }}
-  {{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.promtail.image "chart" .Chart ) ) }}
-  {{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.metrics.serviceMonitor.labels .Values.commonLabels $versionLabel ) "context" . ) }}
+  {{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.metrics.serviceMonitor.labels .Values.commonLabels ) "context" . ) }}
   labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
     app.kubernetes.io/part-of: grafana-loki
     app.kubernetes.io/component: query-frontend

+ 1 - 2
bitnami/grafana-loki/templates/ruler/servicemonitor.yaml

@@ -9,8 +9,7 @@ kind: ServiceMonitor
 metadata:
   name: {{ template "grafana-loki.ruler.fullname" . }}
   namespace: {{ default .Release.Namespace .Values.metrics.serviceMonitor.namespace | quote }}
-  {{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.promtail.image "chart" .Chart ) ) }}
-  {{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.metrics.serviceMonitor.labels .Values.commonLabels $versionLabel ) "context" . ) }}
+  {{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.metrics.serviceMonitor.labels .Values.commonLabels ) "context" . ) }}
   labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
     app.kubernetes.io/part-of: grafana-loki
     app.kubernetes.io/component: ruler

+ 1 - 2
bitnami/grafana-loki/templates/table-manager/servicemonitor.yaml

@@ -9,8 +9,7 @@ kind: ServiceMonitor
 metadata:
   name: {{ template "grafana-loki.table-manager.fullname" . }}
   namespace: {{ default .Release.Namespace .Values.metrics.serviceMonitor.namespace | quote }}
-  {{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.promtail.image "chart" .Chart ) ) }}
-  {{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.metrics.serviceMonitor.labels .Values.commonLabels $versionLabel ) "context" . ) }}
+  {{- $labels := include "common.tplvalues.merge" (dict "values" (list .Values.metrics.serviceMonitor.labels .Values.commonLabels) "context" . ) }}
   labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
     app.kubernetes.io/part-of: grafana-loki
     app.kubernetes.io/component: table-manager

+ 51 - 507
bitnami/grafana-loki/values.yaml

@@ -73,6 +73,7 @@ diagnosticMode:
   ##
   args:
     - infinity
+
 ## @section Common Grafana Loki Parameters
 ##
 loki:
@@ -4462,521 +4463,64 @@ tableManager:
     ##
     ingressNSMatchLabels: {}
     ingressNSPodMatchLabels: {}
-## @section Promtail Deployment Parameters
+
+## @section Grafana Alloy Deployment Parameters
 ##
-promtail:
-  ## @param promtail.enabled Deploy promtail
+grafanaalloy:
+  ## @param grafanaalloy.enabled Deploy Grafana Alloy
   ##
   enabled: true
-  ## Bitnami Promtail image
-  ## ref: https://hub.docker.com/r/bitnami/grafana-promtail/tags/
-  ## @param promtail.image.registry [default: REGISTRY_NAME] Grafana Promtail image registry
-  ## @param promtail.image.repository [default: REPOSITORY_NAME/promtail] Grafana Promtail image repository
-  ## @skip promtail.image.tag Grafana Promtail image tag (immutable tags are recommended)
-  ## @param promtail.image.digest Grafana Promtail image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag
-  ## @param promtail.image.pullPolicy Grafana Promtail image pull policy
-  ## @param promtail.image.pullSecrets Grafana Promtail image pull secrets
-  ##
-  image:
-    registry: docker.io
-    repository: bitnami/promtail
-    tag: 3.5.1-debian-12-r3
-    digest: ""
-    ## Specify a imagePullPolicy
-    ## ref: https://kubernetes.io/docs/concepts/containers/images/#pre-pulled-images
-    ##
-    pullPolicy: IfNotPresent
-    ## Optionally specify an array of imagePullSecrets.
-    ## Secrets must be manually created in the namespace.
-    ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
-    ## e.g:
-    ## pullSecrets:
-    ##   - myRegistryKeySecretName
-    ##
-    pullSecrets: []
-  ## @param promtail.extraEnvVars Array with extra environment variables to add to promtail nodes
-  ## e.g:
-  ## extraEnvVars:
-  ##   - name: FOO
-  ##     value: "bar"
-  ##
-  extraEnvVars: []
-  ## @param promtail.extraEnvVarsCM Name of existing ConfigMap containing extra env vars for promtail nodes
+  ## @param grafanaalloy.resourceType Type of controller to use for deploying Grafana Alloy in the cluster.
+  ## Must be one of 'daemonset', 'deployment', or 'statefulset'.
   ##
-  extraEnvVarsCM: ""
-  ## @param promtail.extraEnvVarsSecret Name of existing Secret containing extra env vars for promtail nodes
-  ##
-  extraEnvVarsSecret: ""
-  ## @param promtail.command Override default container command (useful when using custom images)
-  ##
-  command: []
-  ## @param promtail.args Override default container args (useful when using custom images)
-  ##
-  args: []
-  ## @param promtail.extraArgs Additional container args (will be concatenated to args, unless diagnosticMode is enabled)
-  ##
-  extraArgs: []
-  ## @param promtail.containerPorts.http Promtail HTTP port
-  ## @param promtail.containerPorts.grpc Promtail HTTP port
-  ##
-  containerPorts:
-    http: 8080
-    grpc: 9095
-  ## Configure extra options for Promtail containers' liveness, readiness and startup probes
-  ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes
-  ## @param promtail.livenessProbe.enabled Enable livenessProbe on Promtail nodes
-  ## @param promtail.livenessProbe.initialDelaySeconds Initial delay seconds for livenessProbe
-  ## @param promtail.livenessProbe.periodSeconds Period seconds for livenessProbe
-  ## @param promtail.livenessProbe.timeoutSeconds Timeout seconds for livenessProbe
-  ## @param promtail.livenessProbe.failureThreshold Failure threshold for livenessProbe
-  ## @param promtail.livenessProbe.successThreshold Success threshold for livenessProbe
+  resourceType: 'daemonset'
+  ## @param grafanaalloy.replicaCount Number of pods to deploy. Ignored when grafanaalloy.resourceType is 'daemonset'.
   ##
-  livenessProbe:
-    enabled: true
-    failureThreshold: 3
-    initialDelaySeconds: 10
-    periodSeconds: 10
-    successThreshold: 1
-    timeoutSeconds: 1
-  ## @param promtail.readinessProbe.enabled Enable readinessProbe on Promtail nodes
-  ## @param promtail.readinessProbe.initialDelaySeconds Initial delay seconds for readinessProbe
-  ## @param promtail.readinessProbe.periodSeconds Period seconds for readinessProbe
-  ## @param promtail.readinessProbe.timeoutSeconds Timeout seconds for readinessProbe
-  ## @param promtail.readinessProbe.failureThreshold Failure threshold for readinessProbe
-  ## @param promtail.readinessProbe.successThreshold Success threshold for readinessProbe
-  ##
-  readinessProbe:
-    enabled: true
-    failureThreshold: 3
-    initialDelaySeconds: 10
-    periodSeconds: 10
-    successThreshold: 1
-    timeoutSeconds: 1
-  ## @param promtail.startupProbe.enabled Enable startupProbe on Promtail containers
-  ## @param promtail.startupProbe.initialDelaySeconds Initial delay seconds for startupProbe
-  ## @param promtail.startupProbe.periodSeconds Period seconds for startupProbe
-  ## @param promtail.startupProbe.timeoutSeconds Timeout seconds for startupProbe
-  ## @param promtail.startupProbe.failureThreshold Failure threshold for startupProbe
-  ## @param promtail.startupProbe.successThreshold Success threshold for startupProbe
-  ##
-  startupProbe:
-    enabled: false
-    initialDelaySeconds: 30
-    periodSeconds: 10
-    timeoutSeconds: 1
-    failureThreshold: 15
-    successThreshold: 1
-  ## @param promtail.customLivenessProbe Custom livenessProbe that overrides the default one
-  ##
-  customLivenessProbe: {}
-  ## @param promtail.customReadinessProbe Custom readinessProbe that overrides the default one
-  ##
-  customReadinessProbe: {}
-  ## @param promtail.customStartupProbe Custom startupProbe that overrides the default one
-  ##
-  customStartupProbe: {}
-  ## @param promtail.lifecycleHooks for the promtail container(s) to automate configuration before or after startup
-  ##
-  lifecycleHooks: {}
-  ## promtail resource requests and limits
-  ## ref: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
-  ## @param promtail.resourcesPreset Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if promtail.resources is set (promtail.resources is recommended for production).
-  ## More information: https://github.com/bitnami/charts/blob/main/bitnami/common/templates/_resources.tpl#L15
-  ##
-  resourcesPreset: "nano"
-  ## @param promtail.resources Set container requests and limits for different resources like CPU or memory (essential for production workloads)
-  ## Example:
-  ## resources:
-  ##   requests:
-  ##     cpu: 2
-  ##     memory: 512Mi
-  ##   limits:
-  ##     cpu: 3
-  ##     memory: 1024Mi
-  ##
-  resources: {}
-  ## Configure Pods Security Context
-  ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod
-  ## @param promtail.podSecurityContext.enabled Enabled Promtail pods' Security Context
-  ## @param promtail.podSecurityContext.fsGroupChangePolicy Set filesystem group change policy
-  ## @param promtail.podSecurityContext.sysctls Set kernel settings using the sysctl interface
-  ## @param promtail.podSecurityContext.supplementalGroups Set filesystem extra groups
-  ## @param promtail.podSecurityContext.fsGroup Set Promtail pod's Security Context fsGroup
-  ##
-  podSecurityContext:
-    enabled: true
-    fsGroupChangePolicy: Always
-    sysctls: []
-    supplementalGroups: []
-    fsGroup: 0
-  ## Configure Container Security Context
-  ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod
-  ## @param promtail.containerSecurityContext.enabled Enabled containers' Security Context
-  ## @param promtail.containerSecurityContext.seLinuxOptions [object,nullable] Set SELinux options in container
-  ## @param promtail.containerSecurityContext.runAsUser Set containers' Security Context runAsUser
-  ## @param promtail.containerSecurityContext.runAsGroup Set containers' Security Context runAsGroup
-  ## @param promtail.containerSecurityContext.runAsNonRoot Set container's Security Context runAsNonRoot
-  ## @param promtail.containerSecurityContext.privileged Set container's Security Context privileged
-  ## @param promtail.containerSecurityContext.readOnlyRootFilesystem Set container's Security Context readOnlyRootFilesystem
-  ## @param promtail.containerSecurityContext.allowPrivilegeEscalation Set container's Security Context allowPrivilegeEscalation
-  ## @param promtail.containerSecurityContext.capabilities.drop List of capabilities to be dropped
-  ## @param promtail.containerSecurityContext.seccompProfile.type Set container's Security Context seccomp profile
-  ##
-  containerSecurityContext:
-    enabled: true
-    seLinuxOptions: {}
-    runAsUser: 0
-    runAsGroup: 0
-    runAsNonRoot: false
-    privileged: false
-    readOnlyRootFilesystem: true
-    allowPrivilegeEscalation: false
-    capabilities:
-      drop: ["ALL"]
-    seccompProfile:
-      type: "RuntimeDefault"
-  ## @param promtail.automountServiceAccountToken Mount Service Account token in pod
-  ##
-  automountServiceAccountToken: true
-  ## @param promtail.hostAliases promtail pods host aliases
-  ## https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/
-  ##
-  hostAliases: []
-  ## @param promtail.podLabels Extra labels for promtail pods
-  ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
-  ##
-  podLabels: {}
-  ## @param promtail.podAnnotations Annotations for promtail pods
-  ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
-  ##
-  podAnnotations: {}
-  ## @param promtail.podAffinityPreset Pod affinity preset. Ignored if `promtail.affinity` is set. Allowed values: `soft` or `hard`
-  ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity
-  ##
-  podAffinityPreset: ""
-  ## @param promtail.podAntiAffinityPreset Pod anti-affinity preset. Ignored if `promtail.affinity` is set. Allowed values: `soft` or `hard`
-  ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity
-  ##
-  podAntiAffinityPreset: soft
-  ## Node promtail.affinity preset
-  ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity
-  ##
-  nodeAffinityPreset:
-    ## @param promtail.nodeAffinityPreset.type Node affinity preset type. Ignored if `promtail.affinity` is set. Allowed values: `soft` or `hard`
-    ##
-    type: ""
-    ## @param promtail.nodeAffinityPreset.key Node label key to match. Ignored if `promtail.affinity` is set
-    ##
-    key: ""
-    ## @param promtail.nodeAffinityPreset.values Node label values to match. Ignored if `promtail.affinity` is set
-    ## E.g.
-    ## values:
-    ##   - e2e-az1
-    ##   - e2e-az2
-    ##
-    values: []
-  ## @param promtail.affinity Affinity for promtail pods assignment
-  ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
-  ## NOTE: `promtail.podAffinityPreset`, `promtail.podAntiAffinityPreset`, and `promtail.nodeAffinityPreset` will be ignored when it's set
-  ##
-  affinity: {}
-  ## @param promtail.nodeSelector Node labels for Promtail pods assignment
-  ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/
-  ##
-  nodeSelector: {}
-  ## @param promtail.tolerations Tolerations for Promtail pods assignment
-  ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
-  ##
-  tolerations: []
-  ## @param promtail.topologySpreadConstraints Topology Spread Constraints for pod assignment spread across your cluster among failure-domains
-  ## Ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/#spread-constraints-for-pods
-  ##
-  topologySpreadConstraints: []
-  ## @param promtail.priorityClassName Promtail pods' priorityClassName
-  ##
-  priorityClassName: ""
-  ## @param promtail.schedulerName Kubernetes pod scheduler registry
-  ## https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/
-  ##
-  schedulerName: ""
-  ## @param promtail.updateStrategy.type Promtail statefulset strategy type
-  ## @param promtail.updateStrategy.rollingUpdate [object,nullable] Promtail statefulset rolling update configuration parameters
-  ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies
-  ##
-  updateStrategy:
-    type: RollingUpdate
-    rollingUpdate: null
-  ## @param promtail.extraVolumes Optionally specify extra list of additional volumes for the Promtail pod(s)
-  ##
-  extraVolumes: []
-  ## @param promtail.extraVolumeMounts Optionally specify extra list of additional volumeMounts for the promtail container(s)
-  ##
-  extraVolumeMounts: []
-  ## @param promtail.sidecars Add additional sidecar containers to the Promtail pod(s)
-  ## e.g:
-  ## sidecars:
-  ##   - name: your-image-name
-  ##     image: your-image
-  ##     imagePullPolicy: Always
-  ##     ports:
-  ##       - name: portname
-  ##         containerPort: 1234
-  ##
-  sidecars: []
-  ## @param promtail.initContainers Add additional init containers to the Promtail pod(s)
-  ## ref: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/
-  ## e.g:
-  ## initContainers:
-  ##  - name: your-image-name
-  ##    image: your-image
-  ##    imagePullPolicy: Always
-  ##    command: ['sh', '-c', 'echo "hello world"']
-  ##
-  initContainers: []
-  ## @param promtail.enableServiceLinks Whether information about services should be injected into pod's environment variable
-  ## The environment variables injected by service links are not used, but can lead to slow boot times or slow running of the scripts when there are many services in the current namespace.
-  ## If you experience slow pod startups or slow running of the scripts you probably want to set this to `false`.
-  ##
-  enableServiceLinks: true
-  ## @param promtail.configuration [string] Promtail configuration
-  ##
-  configuration: |
-    server:
-      log_level: {{ .Values.promtail.logLevel }}
-      http_listen_port: {{ .Values.promtail.containerPorts.http }}
-      grpc_listen_port: {{ .Values.promtail.containerPorts.grpc }}
-
-    clients:
-      - url: http://{{ include "grafana-loki.gateway.fullname" . }}:{{ .Values.gateway.service.ports.http }}/loki/api/v1/push
-        {{- if .Values.gateway.auth.enabled }}
-        basic_auth:
-          # The username to use for basic auth
-          username: {{ .Values.gateway.auth.username }}
-          password_file: /bitnami/promtail/conf/secrets/password
-        {{- end }}
-    positions:
-      filename: /run/promtail/positions.yaml
-
-    scrape_configs:
-      # See also https://github.com/grafana/loki/blob/master/production/ksonnet/promtail/scrape_config.libsonnet for reference
-      - job_name: kubernetes-pods
-        pipeline_stages:
-          - cri: {}
-        kubernetes_sd_configs:
-          - role: pod
-        relabel_configs:
-          - source_labels:
-              - __meta_kubernetes_pod_controller_name
-            regex: ([0-9a-z-.]+?)(-[0-9a-f]{8,10})?
-            action: replace
-            target_label: __tmp_controller_name
-          - source_labels:
-              - __meta_kubernetes_pod_label_app_kubernetes_io_name
-              - __meta_kubernetes_pod_label_app
-              - __tmp_controller_name
-              - __meta_kubernetes_pod_name
-            regex: ^;*([^;]+)(;.*)?$
-            action: replace
-            target_label: app
-          - source_labels:
-              - __meta_kubernetes_pod_label_app_kubernetes_io_component
-              - __meta_kubernetes_pod_label_component
-            regex: ^;*([^;]+)(;.*)?$
-            action: replace
-            target_label: component
-          - action: replace
-            source_labels:
-            - __meta_kubernetes_pod_node_name
-            target_label: node_name
-          - action: replace
-            source_labels:
-            - __meta_kubernetes_namespace
-            target_label: namespace
-          - action: replace
-            replacement: $1
-            separator: /
-            source_labels:
-            - namespace
-            - app
-            target_label: job
-          - action: replace
-            source_labels:
-            - __meta_kubernetes_pod_name
-            target_label: pod
-          - action: replace
-            source_labels:
-            - __meta_kubernetes_pod_container_name
-            target_label: container
-          - action: replace
-            replacement: /var/log/pods/*$1/*.log
-            separator: /
-            source_labels:
-            - __meta_kubernetes_pod_uid
-            - __meta_kubernetes_pod_container_name
-            target_label: __path__
-          - action: replace
-            regex: true/(.*)
-            replacement: /var/log/pods/*$1/*.log
-            separator: /
-            source_labels:
-            - __meta_kubernetes_pod_annotationpresent_kubernetes_io_config_hash
-            - __meta_kubernetes_pod_annotation_kubernetes_io_config_hash
-            - __meta_kubernetes_pod_container_name
-            target_label: __path__
-  ## @param promtail.existingSecret Name of a Secret that contains the Promtail configuration
-  ##
-  existingSecret: ""
-  ## @param promtail.logLevel Promtail logging level
-  ##
-  logLevel: info
-  ## @section Promtail Traffic Exposure Parameters
-  ##
-
-  ## promtail service parameters
-  ##
-  service:
-    ## @param promtail.service.type Promtail service type
-    ##
-    type: ClusterIP
-    ## @param promtail.service.ports.http Promtail HTTP service port
-    ## @param promtail.service.ports.grpc Promtail gRPC service port
-    ##
-    ports:
-      http: 3100
-      grpc: 9095
-    ## Node ports to expose
-    ## NOTE: choose port between <30000-32767>
-    ## @param promtail.service.nodePorts.http Node port for HTTP
-    ##
-    nodePorts:
-      http: ""
-    ## @param promtail.service.sessionAffinityConfig Additional settings for the sessionAffinity
-    ## sessionAffinityConfig:
-    ##   clientIP:
-    ##     timeoutSeconds: 300
-    ##
-    sessionAffinityConfig: {}
-    ## @param promtail.service.sessionAffinity Control where client requests go, to the same pod or round-robin
-    ## Values: ClientIP or None
-    ## ref: https://kubernetes.io/docs/concepts/services-networking/service/
-    ##
-    sessionAffinity: None
-    ## @param promtail.service.clusterIP Promtail service Cluster IP
-    ## e.g.:
-    ## clusterIP: None
-    ##
-    clusterIP: ""
-    ## @param promtail.service.loadBalancerIP Promtail service Load Balancer IP
-    ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-loadbalancer
-    ##
-    loadBalancerIP: ""
-    ## @param promtail.service.loadBalancerSourceRanges Promtail service Load Balancer sources
-    ## ref: https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/#restrict-access-for-loadbalancer-service
-    ## e.g:
-    ## loadBalancerSourceRanges:
-    ##   - 10.10.10.0/24
-    ##
-    loadBalancerSourceRanges: []
-    ## @param promtail.service.externalTrafficPolicy Promtail service external traffic policy
-    ## ref https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip
-    ##
-    externalTrafficPolicy: Cluster
-    ## @param promtail.service.annotations Additional custom annotations for Promtail service
-    ##
-    annotations: {}
-    ## @param promtail.service.extraPorts Extra ports to expose in the Promtail service
-    ##
-    extraPorts: []
-  ## Network Policies
-  ## Ref: https://kubernetes.io/docs/concepts/services-networking/network-policies/
-  ##
-  networkPolicy:
-    ## @param promtail.networkPolicy.enabled Specifies whether a NetworkPolicy should be created
-    ##
-    enabled: true
-    ## @param promtail.networkPolicy.allowExternal Don't require server label for connections
-    ## The Policy model to apply. When set to false, only pods with the correct
-    ## server label will have network access to the ports server is listening
-    ## on. When true, server will accept connections from any source
-    ## (with the correct destination port).
-    ##
-    allowExternal: true
-    ## @param promtail.networkPolicy.allowExternalEgress Allow the pod to access any range of port and all destinations.
-    ##
-    allowExternalEgress: true
-    ## @param promtail.networkPolicy.addExternalClientAccess Allow access from pods with client label set to "true". Ignored if `promtail.networkPolicy.allowExternal` is true.
-    ##
-    addExternalClientAccess: true
-    ## @param promtail.networkPolicy.kubeAPIServerPorts [array] List of possible endpoints to kube-apiserver (limit to your cluster settings to increase security)
-    ##
-    kubeAPIServerPorts: [443, 6443, 8443]
-    ## @param promtail.networkPolicy.extraIngress [array] Add extra ingress rules to the NetworkPolicy
-    ## e.g:
-    ## extraIngress:
-    ##   - ports:
-    ##       - port: 1234
-    ##     from:
-    ##       - podSelector:
-    ##           - matchLabels:
-    ##               - role: frontend
-    ##       - podSelector:
-    ##           - matchExpressions:
-    ##               - key: role
-    ##                 operator: In
-    ##                 values:
-    ##                   - frontend
-    extraIngress: []
-    ## @param promtail.networkPolicy.extraEgress [array] Add extra ingress rules to the NetworkPolicy
-    ## e.g:
-    ## extraEgress:
-    ##   - ports:
-    ##       - port: 1234
-    ##     to:
-    ##       - podSelector:
-    ##           - matchLabels:
-    ##               - role: frontend
-    ##       - podSelector:
-    ##           - matchExpressions:
-    ##               - key: role
-    ##                 operator: In
-    ##                 values:
-    ##                   - frontend
-    ##
-    extraEgress: []
-    ## @param promtail.networkPolicy.ingressPodMatchLabels [object] Labels to match to allow traffic from other pods. Ignored if `promtail.networkPolicy.allowExternal` is true.
+  replicaCount: 1
+  ## @section Alloy container specific parameters
+  ##
+  alloy:
+    ## @param grafanaalloy.alloy.stabilityLevel Minimum stability level of components and behavior to enable. Must be
+    ##  one of "experimental", "public-preview", or "generally-available".
+    stabilityLevel: "generally-available"
+    ## @param grafanaalloy.alloy.listenAddr Address to listen for traffic on. 0.0.0.0 exposes the UI to other containers.
+    listenAddr: 0.0.0.0
+    ## @param grafanaalloy.alloy.uiPathPrefix Base path where the UI is exposed.
+    uiPathPrefix: /
+    ## @param grafanaalloy.alloy.storagePath Path to where Grafana Alloy stores data (for example, the Write-Ahead Log).
+    storagePath: /tmp/alloy
+    ## @param grafanaalloy.alloy.enableReporting Enables sending Grafana Labs anonymous usage stats to help improve Grafana grafanaalloy.alloy.
+    enableReporting: true
+    ## @param grafanaalloy.alloy.mounts.varlog Mount /var/log from the host into the container for log collection.
+    ## @param grafanaalloy.alloy.mounts.dockercontainers Mount /var/lib/docker/containers from the host into the container for log
+    ##
+    mounts:
+      varlog: true
+      dockercontainers: true
+    ## @param grafanaalloy.alloy.clustering.enabled Deploy Grafana Alloy in a cluster to allow for load distribution.
+    ## @param grafanaalloy.alloy.clustering.name Name for the Grafana Alloy cluster. Used for differentiating between clusters.
+    ## @param grafanaalloy.alloy.clustering.portName Name for the port used for clustering, useful if running inside an Istio Mesh
+    ##
+    clustering:
+      enabled: false
+      name: ""
+      portName: http
+    ## @param grafanaalloy.alloy.createSecret Create a Secret with the default configuration for Grafana Alloy to send logs to Loki.
+    ##
+    createSecret: true
+    ## @param grafanaalloy.alloy.existingSecret The name of an existing Secret with your custom configuration for Grafana Alloy. If the grafanaalloy.alloy.createSecret is set, it will create a Secret with this name.
+    ##
+    existingSecret: "{{ ternary (printf \"%s-alloy\" (lower .Release.Name)) \"\" .Values.alloy.createSecret }}"
+    ## @param grafanaalloy.alloy.configuration Specify content for Grafana Alloy config file. Omitted if grafanaalloy.alloy.existingSecret is provided.
     ## e.g:
-    ## ingressPodMatchLabels:
-    ##   my-client: "true"
-    #
-    ingressPodMatchLabels: {}
-    ## @param promtail.networkPolicy.ingressNSMatchLabels [object] Labels to match to allow traffic from other namespaces. Ignored if `promtail.networkPolicy.allowExternal` is true.
-    ## @param promtail.networkPolicy.ingressNSPodMatchLabels [object] Pod labels to match to allow traffic from other namespaces. Ignored if `promtail.networkPolicy.allowExternal` is true.
-    ##
-    ingressNSMatchLabels: {}
-    ingressNSPodMatchLabels: {}
-  ## Create RBAC
-  ## @param promtail.rbac.create Create RBAC rules
-  ##
-  rbac:
-    create: true
-  ## Service account for Loki to use
-  ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
-  ##
-  serviceAccount:
-    ## @param promtail.serviceAccount.create Enable creation of ServiceAccount for Promtail pods
+    ## configuration: |-
+    ##   ...
     ##
-    create: true
-    ## @param promtail.serviceAccount.name The name of the ServiceAccount to use
-    ## If not set and create is true, a name is generated using the common.names.fullname template
+    configuration: ""
+    ## @param grafanaalloy.alloy.extraConfig Append extra configuration to the default config file
     ##
-    name: ""
-    ## @param promtail.serviceAccount.automountServiceAccountToken Allows auto mount of ServiceAccountToken on the promtail.serviceAccount.created
-    ## Can be set to false if pods using this promtail.serviceAccount.do not need to use K8s API
-    ##
-    automountServiceAccountToken: false
-    ## @param promtail.serviceAccount.annotations Additional custom annotations for the ServiceAccount
-    ##
-    annotations: {}
+    extraConfig: ""
+
 ## @section Init Container Parameters
 ##