mirror of
https://github.com/bitnami/charts.git
synced 2026-08-09 12:55:41 +08:00
[bitnami/grafana-alloy] Add Grafana Alloy chart (#34078)
* [bitnami/grafana-alloy] Add Grafana Alloy chart Signed-off-by: David Gomez <david.gomez@broadcom.com> * Update CHANGELOG.md Signed-off-by: Bitnami Bot <bitnami.bot@broadcom.com> * [bitnami/grafana-alloy] Fix helm lint Signed-off-by: David Gomez <david.gomez@broadcom.com> * [bitnami/grafana-alloy] Add Cypress test Signed-off-by: David Gomez <david.gomez@broadcom.com> * Update CHANGELOG.md Signed-off-by: Bitnami Bot <bitnami.bot@broadcom.com> * [bitnami/grafana-alloy] Fix Goss test Signed-off-by: David Gomez <david.gomez@broadcom.com> * [bitnami/grafana-alloy] Fix Goss test Signed-off-by: David Gomez <david.gomez@broadcom.com> * [bitnami/grafana-alloy] Apply feedback Signed-off-by: David Gomez <david.gomez@broadcom.com> * [bitnami/grafana-alloy] Fix path in Goss test Signed-off-by: David Gomez <david.gomez@broadcom.com> * [bitnami/grafana-alloy] Fix path in Cypress test Signed-off-by: David Gomez <david.gomez@broadcom.com> * [bitnami/grafana-alloy] Apply feedback Signed-off-by: David Gomez <david.gomez@broadcom.com> * Update bitnami/grafana-alloy/templates/servicemonitor.yaml Co-authored-by: Juan Ariza Toledano <juan.ariza@broadcom.com> Signed-off-by: David Gomez <david.gomez@broadcom.com> * Update bitnami/grafana-alloy/templates/rbac.yaml Co-authored-by: Juan Ariza Toledano <juan.ariza@broadcom.com> Signed-off-by: David Gomez <david.gomez@broadcom.com> * Update bitnami/grafana-alloy/values.yaml Co-authored-by: Juan Ariza Toledano <juan.ariza@broadcom.com> Signed-off-by: David Gomez <david.gomez@broadcom.com> * Update bitnami/grafana-alloy/values.yaml Co-authored-by: Juan Ariza Toledano <juan.ariza@broadcom.com> Signed-off-by: David Gomez <david.gomez@broadcom.com> * [bitnami/grafana-alloy] Move extraVolumes to root Signed-off-by: David Gomez <david.gomez@broadcom.com> * Update bitnami/grafana-alloy/templates/application.yaml Co-authored-by: Juan Ariza Toledano <juan.ariza@broadcom.com> Signed-off-by: David Gomez <david.gomez@broadcom.com> * [bitnami/grafana-alloy] Fix some typos Signed-off-by: David Gomez <david.gomez@broadcom.com> * [bitnami/grafana-alloy] Update appVersion to 1.9.0 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-alloy/templates/servicemonitor.yaml Co-authored-by: Juan Ariza Toledano <juan.ariza@broadcom.com> Signed-off-by: David Gomez <david.gomez@broadcom.com> * [bitnami/grafana-alloy] Update part-of Signed-off-by: David Gomez <david.gomez@broadcom.com> * [bitnami/grafana-alloy] Move resourceType and replicaCount to root Signed-off-by: David Gomez <david.gomez@broadcom.com> * [bitnami/grafana-alloy] Unifiy annotations in controllerAnnotations Signed-off-by: David Gomez <david.gomez@broadcom.com> * [bitnami/grafana-alloy] Add startupProbes Signed-off-by: David Gomez <david.gomez@broadcom.com> * [bitnami/grafana-alloy] Reduce start command in NOTES Signed-off-by: David Gomez <david.gomez@broadcom.com> * [bitnami/grafana-alloy] Improve probes Signed-off-by: David Gomez <david.gomez@broadcom.com> * [bitnami/grafana-alloy] Remove secret.yaml Signed-off-by: David Gomez <david.gomez@broadcom.com> * [bitnami/grafana-alloy] Remove typo Signed-off-by: David Gomez <david.gomez@broadcom.com> * [bitnami/grafana-alloy] Fix clustering Signed-off-by: David Gomez <david.gomez@broadcom.com> * [bitnami/grafana-alloy] Make storagePath configurable Signed-off-by: David Gomez <david.gomez@broadcom.com> * [bitnami/grafana-alloy] Change workload name in VIB Signed-off-by: David Gomez <david.gomez@broadcom.com> * [bitnami/grafana-alloy] Fix typo in goss test Signed-off-by: David Gomez <david.gomez@broadcom.com> * [bitnami/grafana-alloy] Fix typo with tmp volume Signed-off-by: David Gomez <david.gomez@broadcom.com> * Update bitnami/grafana-alloy/templates/service.yaml Co-authored-by: Juan Ariza Toledano <juan.ariza@broadcom.com> Signed-off-by: David Gomez <david.gomez@broadcom.com> * Update bitnami/grafana-alloy/templates/cluster_service.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> * Update bitnami/grafana-alloy/templates/_helpers.tpl Co-authored-by: Juan Ariza Toledano <juan.ariza@broadcom.com> Signed-off-by: David Gomez <david.gomez@broadcom.com> * [bitnami/grafana-alloy] Remove worker_nodes_instance_count from vib-verify Signed-off-by: David Gomez <david.gomez@broadcom.com> * [bitnami/grafana-alloy] Lower .Values.resourceType Signed-off-by: David Gomez <david.gomez@broadcom.com> * [bitnami/grafana-alloy] Add configmap checksum Signed-off-by: David Gomez <david.gomez@broadcom.com> * [bitnami/grafana-alloy] Add prometheus.io/scrape for service Signed-off-by: David Gomez <david.gomez@broadcom.com> * [bitnami/grafana-alloy] Apply suggested feedback Signed-off-by: David Gomez <david.gomez@broadcom.com> * [bitnami/grafana-alloy] Add section for alloy configuration Signed-off-by: David Gomez <david.gomez@broadcom.com> * [bitnami/grafana-alloy] Enable mounts Signed-off-by: David Gomez <david.gomez@broadcom.com> * [bitnami/grafana-alloy] Add confimap reload port and probes Signed-off-by: David Gomez <david.gomez@broadcom.com> * [bitnami/grafana-alloy] Add networkpolicy.yaml Signed-off-by: David Gomez <david.gomez@broadcom.com> * [bitnami/grafana-alloy] Apply feedback Signed-off-by: David Gomez <david.gomez@broadcom.com> * [bitnami/grafana-alloy] Remove prometheus.io/scrape label Signed-off-by: David Gomez <david.gomez@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>
This commit is contained in:
co-authored by
Juan Ariza Toledano
Bitnami Bot
parent
a01469568c
commit
60d711d93c
@@ -0,0 +1,12 @@
|
||||
module.exports = {
|
||||
pageLoadTimeout: 150000,
|
||||
defaultCommandTimeout: 90000,
|
||||
chromeWebSecurity: false,
|
||||
env: {
|
||||
replicaCount: '2',
|
||||
},
|
||||
e2e: {
|
||||
setupNodeEvents(on, config) {},
|
||||
baseUrl: 'http://localhost/',
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* Copyright Broadcom, Inc. All Rights Reserved.
|
||||
* SPDX-License-Identifier: APACHE-2.0
|
||||
*/
|
||||
|
||||
/// <reference types="cypress" />
|
||||
|
||||
it('lists all components in a healthy state', () => {
|
||||
cy.visit('/');
|
||||
|
||||
cy.get('span[class*="HealthLabel"]').each((span) => {
|
||||
cy.wrap(span).should('have.text', 'healthy');
|
||||
});
|
||||
|
||||
const members = ['endpointslices', 'pods', 'services', 'ingresses', 'endpoints', 'nodes']
|
||||
members.forEach((e) => {
|
||||
cy.get('span[class*="ComponentList"]').contains(`discovery.kubernetes.${e}`).should('be.visible')
|
||||
})
|
||||
|
||||
// Check graph view
|
||||
cy.get('a[href="/graph"]').click();
|
||||
|
||||
members.forEach((e) => {
|
||||
cy.get(`div[data-nodeid*="discovery.kubernetes.${e}"]`).should('exist').and('be.visible');
|
||||
});
|
||||
});
|
||||
|
||||
it('clustering in a healthy state', () => {
|
||||
cy.visit('/clustering');
|
||||
|
||||
cy.get('tr')
|
||||
.filter(':contains("grafana-alloy-")')
|
||||
.then((rows) => {
|
||||
expect(rows).to.have.length(Cypress.env('replicaCount'));
|
||||
cy.wrap(rows).each((row) => {
|
||||
expect(row).to.contain('participant');
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,19 @@
|
||||
/*
|
||||
* Copyright Broadcom, Inc. All Rights Reserved.
|
||||
* SPDX-License-Identifier: APACHE-2.0
|
||||
*/
|
||||
|
||||
// Added to slow down Cypress test execution without using hardcoded waits. If removed, there will be false positives.
|
||||
const COMMAND_DELAY = 2000;
|
||||
|
||||
for (const command of ['click']) {
|
||||
Cypress.Commands.overwrite(command, (originalFn, ...args) => {
|
||||
const origVal = originalFn(...args);
|
||||
|
||||
return new Promise((resolve) => {
|
||||
setTimeout(() => {
|
||||
resolve(origVal);
|
||||
}, COMMAND_DELAY);
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* Copyright Broadcom, Inc. All Rights Reserved.
|
||||
* SPDX-License-Identifier: APACHE-2.0
|
||||
*/
|
||||
|
||||
// ***********************************************************
|
||||
// This example support/index.js is processed and
|
||||
// loaded automatically before your test files.
|
||||
//
|
||||
// This is a great place to put global configuration and
|
||||
// behavior that modifies Cypress.
|
||||
//
|
||||
// You can change the location of this file or turn off
|
||||
// automatically serving support files with the
|
||||
// 'supportFile' configuration option.
|
||||
//
|
||||
// You can read more here:
|
||||
// https://on.cypress.io/configuration
|
||||
// ***********************************************************
|
||||
|
||||
// Import commands.js using ES2015 syntax:
|
||||
import './commands';
|
||||
|
||||
// Alternatively you can use CommonJS syntax:
|
||||
// require('./commands')
|
||||
@@ -0,0 +1,49 @@
|
||||
# Copyright Broadcom, Inc. All Rights Reserved.
|
||||
# SPDX-License-Identifier: APACHE-2.0
|
||||
|
||||
http:
|
||||
http://127.0.0.1:{{ .Vars.alloy.containerPorts.http }}/-/healthy:
|
||||
status: 200
|
||||
body:
|
||||
- /All Alloy components are healthy./
|
||||
http://grafana-alloy:{{ .Vars.service.ports.http }}/-/healthy:
|
||||
status: 200
|
||||
body:
|
||||
- /All Alloy components are healthy./
|
||||
http://127.0.0.1:{{ .Vars.alloy.containerPorts.http }}/metrics:
|
||||
status: 200
|
||||
body:
|
||||
- /alloy_build_info/
|
||||
http://grafana-alloy:{{ .Vars.service.ports.http }}/metrics:
|
||||
status: 200
|
||||
body:
|
||||
- /alloy_build_info/
|
||||
file:
|
||||
/opt/bitnami/grafana-alloy/config/config.alloy:
|
||||
exists: true
|
||||
filetype: symlink
|
||||
{{ if .Vars.alloy.mounts.varlog }}
|
||||
/var/log:
|
||||
exists: true
|
||||
filetype: directory
|
||||
{{ end }}
|
||||
{{ if .Vars.alloy.mounts.dockercontainers }}
|
||||
/var/lib/docker/containers:
|
||||
exists: true
|
||||
filetype: directory
|
||||
{{ end }}
|
||||
command:
|
||||
{{- $uid := .Vars.alloy.containerSecurityContext.runAsUser }}
|
||||
{{- $gid := .Vars.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.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 }}/
|
||||
{{ end }}
|
||||
@@ -0,0 +1,26 @@
|
||||
resourceType: deployment
|
||||
replicaCount: 2
|
||||
podSecurityContext:
|
||||
enabled: true
|
||||
fsGroup: 1002
|
||||
alloy:
|
||||
clustering:
|
||||
enabled: true
|
||||
mounts:
|
||||
varlog: true
|
||||
dockercontainers: true
|
||||
containerSecurityContext:
|
||||
enabled: true
|
||||
runAsUser: 1002
|
||||
containerPorts:
|
||||
http: 8081
|
||||
configReloader:
|
||||
containerPorts:
|
||||
http: 9999
|
||||
service:
|
||||
ports:
|
||||
http: 8081
|
||||
type: LoadBalancer
|
||||
serviceAccount:
|
||||
create: true
|
||||
automountServiceAccountToken: true
|
||||
@@ -0,0 +1,47 @@
|
||||
{
|
||||
"phases": {
|
||||
"package": {
|
||||
"context": {
|
||||
"credentials": [
|
||||
{
|
||||
"url": "{VIB_ENV_CHARTS_REGISTRY}",
|
||||
"authn": {
|
||||
"username": "{VIB_ENV_CHARTS_REGISTRY_USERNAME}",
|
||||
"password": "{VIB_ENV_CHARTS_REGISTRY_PASSWORD}"
|
||||
}
|
||||
}
|
||||
],
|
||||
"resources": {
|
||||
"url": "{SHA_ARCHIVE}",
|
||||
"path": "/bitnami/grafana-alloy"
|
||||
}
|
||||
},
|
||||
"actions": [
|
||||
{
|
||||
"action_id": "helm-package"
|
||||
},
|
||||
{
|
||||
"action_id": "helm-lint"
|
||||
}
|
||||
]
|
||||
},
|
||||
"publish": {
|
||||
"actions": [
|
||||
{
|
||||
"action_id": "helm-publish",
|
||||
"params": {
|
||||
"repository": {
|
||||
"kind": "S3",
|
||||
"url": "{VIB_ENV_S3_URL}",
|
||||
"authn": {
|
||||
"access_key_id": "{VIB_ENV_S3_ACCESS_KEY_ID}",
|
||||
"secret_access_key": "{VIB_ENV_S3_SECRET_ACCESS_KEY}",
|
||||
"role": "{VIB_ENV_S3_ROLE_ARN}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
{
|
||||
"phases": {
|
||||
"package": {
|
||||
"context": {
|
||||
"credentials": [
|
||||
{
|
||||
"url": "{VIB_ENV_CHARTS_REGISTRY}",
|
||||
"authn": {
|
||||
"username": "{VIB_ENV_CHARTS_REGISTRY_USERNAME}",
|
||||
"password": "{VIB_ENV_CHARTS_REGISTRY_PASSWORD}"
|
||||
}
|
||||
}
|
||||
],
|
||||
"resources": {
|
||||
"url": "{SHA_ARCHIVE}",
|
||||
"path": "/bitnami/grafana-alloy"
|
||||
}
|
||||
},
|
||||
"actions": [
|
||||
{
|
||||
"action_id": "helm-package"
|
||||
},
|
||||
{
|
||||
"action_id": "helm-lint"
|
||||
}
|
||||
]
|
||||
},
|
||||
"verify": {
|
||||
"context": {
|
||||
"resources": {
|
||||
"url": "{SHA_ARCHIVE}",
|
||||
"path": "/bitnami/grafana-alloy"
|
||||
},
|
||||
"target_platform": {
|
||||
"target_platform_id": "{VIB_ENV_TARGET_PLATFORM}",
|
||||
"size": {
|
||||
"name": "S4"
|
||||
}
|
||||
}
|
||||
},
|
||||
"actions": [
|
||||
{
|
||||
"action_id": "goss",
|
||||
"params": {
|
||||
"resources": {
|
||||
"path": "/.vib"
|
||||
},
|
||||
"tests_file": "grafana-alloy/goss/goss.yaml",
|
||||
"vars_file": "grafana-alloy/runtime-parameters.yaml",
|
||||
"remote": {
|
||||
"pod": {
|
||||
"workload": "deploy-grafana-alloy"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"action_id": "cypress",
|
||||
"params": {
|
||||
"resources": {
|
||||
"path": "/.vib/grafana-alloy/cypress"
|
||||
},
|
||||
"endpoint": "lb-grafana-alloy-http",
|
||||
"app_protocol": "HTTP"
|
||||
}
|
||||
},
|
||||
{
|
||||
"action_id": "kubescape",
|
||||
"params": {
|
||||
"threshold": {VIB_ENV_KUBESCAPE_SCORE_THRESHOLD}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
# Changelog
|
||||
|
||||
## 0.1.0 (2025-06-06)
|
||||
|
||||
* [bitnami/grafana-alloy] Add Grafana Alloy chart ([#34078](https://github.com/bitnami/charts/pull/34078))
|
||||
@@ -0,0 +1,6 @@
|
||||
dependencies:
|
||||
- name: common
|
||||
repository: oci://registry-1.docker.io/bitnamicharts
|
||||
version: 2.31.1
|
||||
digest: sha256:38d6de6fd62a10417ff51df8b2c5e0cf294de80fe393c4e9f3247ca6433718fa
|
||||
generated: "2025-05-27T14:57:48.570535+02:00"
|
||||
@@ -0,0 +1,39 @@
|
||||
# Copyright Broadcom, Inc. All Rights Reserved.
|
||||
# SPDX-License-Identifier: APACHE-2.0
|
||||
|
||||
annotations:
|
||||
category: Analytics
|
||||
images: |
|
||||
- name: grafana-alloy
|
||||
image: docker.io/bitnami/grafana-alloy:1.9.0-debian-12-r0
|
||||
- name: configmap-reload
|
||||
image: docker.io/bitnami/configmap-reload:0.15.0-debian-12-r4
|
||||
licenses: Apache-2.0
|
||||
apiVersion: v2
|
||||
appVersion: 1.9.0
|
||||
dependencies:
|
||||
- name: common
|
||||
repository: oci://registry-1.docker.io/bitnamicharts
|
||||
tags:
|
||||
- bitnami-common
|
||||
version: 2.x.x
|
||||
description: Grafana Alloy is an open source OpenTelemetry Collector distribution with built-in
|
||||
Prometheus pipelines and support for metrics, logs, traces, and profiles.
|
||||
home: https://bitnami.com
|
||||
icon: https://dyltqmyl993wv.cloudfront.net/assets/stacks/grafana-alloy/img/grafana-alloy-stack-220x234.png
|
||||
keywords:
|
||||
- grafana
|
||||
- logging
|
||||
- logs
|
||||
- data
|
||||
- collector
|
||||
- tracing
|
||||
- metrics
|
||||
- infrastructure
|
||||
maintainers:
|
||||
- name: Broadcom, Inc. All Rights Reserved.
|
||||
url: https://github.com/bitnami/charts
|
||||
name: grafana-alloy
|
||||
sources:
|
||||
- https://github.com/bitnami/charts/tree/main/bitnami/grafana-alloy
|
||||
version: 0.1.0
|
||||
@@ -0,0 +1,433 @@
|
||||
<!--- app-name: Grafana Alloy -->
|
||||
|
||||
# Bitnami package for Grafana Alloy
|
||||
|
||||
Grafana Alloy is an open source OpenTelemetry Collector distribution with built-in Prometheus pipelines and support for metrics, logs, traces, and profiles.
|
||||
|
||||
[Overview of Grafana Alloy](https://grafana.com/oss/alloy-opentelemetry-collector/)
|
||||
|
||||
Trademarks: This software listing is packaged by Bitnami. The respective trademarks mentioned in the offering are owned by the respective companies, and use of them does not imply any affiliation or endorsement.
|
||||
|
||||
## TL;DR
|
||||
|
||||
```console
|
||||
helm install my-release oci://registry-1.docker.io/bitnamicharts/grafana-alloy
|
||||
```
|
||||
|
||||
Looking to use Grafana Alloy in production? Try [VMware Tanzu Application Catalog](https://bitnami.com/enterprise), the commercial edition of the Bitnami catalog.
|
||||
|
||||
## Introduction
|
||||
|
||||
Bitnami charts for Helm are carefully engineered, actively maintained and are the quickest and easiest way to deploy containers on a Kubernetes cluster that are ready to handle production workloads.
|
||||
|
||||
This chart bootstraps a [Grafana Alloy](https://github.com/grafana/alloy) deployment in a [Kubernetes](https://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- Kubernetes 1.23+
|
||||
- Helm 3.8.0+
|
||||
|
||||
## Installing the Chart
|
||||
|
||||
To install the chart with the release name `my-release`:
|
||||
|
||||
```console
|
||||
helm install my-release oci://REGISTRY_NAME/REPOSITORY_NAME/grafana-alloy
|
||||
```
|
||||
|
||||
> Note: You need to substitute the placeholders `REGISTRY_NAME` and `REPOSITORY_NAME` with a reference to your Helm chart registry and repository. For example, in the case of Bitnami, you need to use `REGISTRY_NAME=registry-1.docker.io` and `REPOSITORY_NAME=bitnamicharts`.
|
||||
|
||||
The command deploys Grafana Alloy on the Kubernetes cluster in the default configuration. The [Parameters](#parameters) section lists the parameters that can be configured during installation.
|
||||
|
||||
> **Tip**: List all releases using `helm list`
|
||||
|
||||
## Configuration and installation details
|
||||
|
||||
### Alloy configuration
|
||||
|
||||
The Bitnami Grafana Alloy chart allows [providing a configuration](https://grafana.com/docs/alloy/latest/get-started/configuration-syntax/) using ConfigMaps. This is done using the `alloy.configuration` parameter. It is also possible to append the provided settings with the default configuration by using the `alloy.extraConfig` parameter. In the example below we add extra configuration parameters:
|
||||
|
||||
```yaml
|
||||
alloy:
|
||||
extraConfig:|
|
||||
loki.write "local_loki" {
|
||||
endpoint {
|
||||
url = "http://loki:3100/loki/api/v1/push"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
It is also possible to use an existing ConfigMap using the `alloy.existingConfigMap` parameter.
|
||||
|
||||
### [Rolling VS Immutable tags](https://docs.vmware.com/en/VMware-Tanzu-Application-Catalog/services/tutorials/GUID-understand-rolling-tags-containers-index.html)
|
||||
|
||||
It is strongly recommended to use immutable tags in a production environment. This ensures your deployment does not change automatically if the same tag is updated with a different image.
|
||||
|
||||
Bitnami will release a new chart updating its containers if a new version of the main container, significant changes, or critical vulnerabilities exist.
|
||||
|
||||
### Additional environment variables
|
||||
|
||||
In case you want to add extra environment variables (useful for advanced operations like custom init scripts), you can use the `extraEnvVars` property.
|
||||
|
||||
```yaml
|
||||
alloy:
|
||||
extraEnvVars:
|
||||
- name: LOG_LEVEL
|
||||
value: error
|
||||
```
|
||||
|
||||
Alternatively, you can use a ConfigMap or a Secret with the environment variables. To do so, use the `extraEnvVarsCM` or the `extraEnvVarsSecret` values.
|
||||
|
||||
### Sidecars
|
||||
|
||||
If additional containers are needed in the same pod as Grafana Alloy (such as additional metrics or logging exporters), they can be defined using the `sidecars` parameter.
|
||||
|
||||
```yaml
|
||||
sidecars:
|
||||
- name: your-image-name
|
||||
image: your-image
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- name: portname
|
||||
containerPort: 1234
|
||||
```
|
||||
|
||||
If these sidecars export extra ports, extra port definitions can be added using the `service.extraPorts` parameter (where available), as shown in the example below:
|
||||
|
||||
```yaml
|
||||
service:
|
||||
extraPorts:
|
||||
- name: extraPort
|
||||
port: 11311
|
||||
targetPort: 11311
|
||||
```
|
||||
|
||||
If additional init containers are needed in the same pod, they can be defined using the `initContainers` parameter. Here is an example:
|
||||
|
||||
```yaml
|
||||
initContainers:
|
||||
- name: your-image-name
|
||||
image: your-image
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- name: portname
|
||||
containerPort: 1234
|
||||
```
|
||||
|
||||
Learn more about [sidecar containers](https://kubernetes.io/docs/concepts/workloads/pods/) and [init containers](https://kubernetes.io/docs/concepts/workloads/pods/init-containers/).
|
||||
|
||||
### Pod affinity
|
||||
|
||||
This chart allows you to set your custom affinity using the `affinity` parameter. Find more information about Pod affinity in the [kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity).
|
||||
|
||||
As an alternative, use one of the preset configurations for pod affinity, pod anti-affinity, and node affinity available at the [bitnami/common](https://github.com/bitnami/charts/tree/main/bitnami/common#affinities) chart. To do so, set the `podAffinityPreset`, `podAntiAffinityPreset`, or `nodeAffinityPreset` parameters.
|
||||
|
||||
### Prometheus metrics
|
||||
|
||||
This chart can be integrated with Prometheus by setting `metrics.enabled` to `true`. This will expose Grafana Alloy native Prometheus endpoint in a metrics service that can be configured under the `metrics.service` section. It will have the necessary annotations to be automatically scraped by Prometheus.
|
||||
|
||||
#### Prometheus requirements
|
||||
|
||||
It is necessary to have a working installation of Prometheus or Prometheus Operator for the integration to work. Install the [Bitnami Prometheus helm chart](https://github.com/bitnami/charts/tree/main/bitnami/prometheus) or the [Bitnami Kube Prometheus helm chart](https://github.com/bitnami/charts/tree/main/bitnami/kube-prometheus) to easily have a working Prometheus in your cluster.
|
||||
|
||||
#### Integration with Prometheus Operator
|
||||
|
||||
The chart can deploy `ServiceMonitor` objects for integration with Prometheus Operator installations. To do so, set the value `metrics.serviceMonitor.enabled=true`. Ensure that the Prometheus Operator `CustomResourceDefinitions` are installed in the cluster or it will fail with the following error:
|
||||
|
||||
```text
|
||||
no matches for kind "ServiceMonitor" in version "monitoring.coreos.com/v1"
|
||||
```
|
||||
|
||||
Install the [Bitnami Kube Prometheus helm chart](https://github.com/bitnami/charts/tree/main/bitnami/kube-prometheus) for having the necessary CRDs and the Prometheus Operator.
|
||||
|
||||
## Parameters
|
||||
|
||||
### Global parameters
|
||||
|
||||
| Name | Description | Value |
|
||||
| ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
|
||||
| `global.imageRegistry` | Global Docker image registry | `""` |
|
||||
| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` |
|
||||
| `global.defaultStorageClass` | Global default StorageClass for Persistent Volume(s) | `""` |
|
||||
| `global.security.allowInsecureImages` | Allows skipping image verification | `false` |
|
||||
| `global.compatibility.openshift.adaptSecurityContext` | Adapt the securityContext sections of the deployment to make them compatible with Openshift restricted-v2 SCC: remove runAsUser, runAsGroup and fsGroup and let the platform use their allowed default IDs. Possible values: auto (apply if the detected running cluster is Openshift), force (perform the adaptation always), disabled (do not perform adaptation) | `auto` |
|
||||
| `global.compatibility.omitEmptySeLinuxOptions` | If set to true, removes the seLinuxOptions from the securityContexts when it is set to an empty object | `false` |
|
||||
|
||||
### Common parameters
|
||||
|
||||
| Name | Description | Value |
|
||||
| ----------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | --------------- |
|
||||
| `resourceType` | Type of controller to use for deploying Grafana Alloy in the cluster. | `daemonset` |
|
||||
| `replicaCount` | Number of pods to deploy. Ignored when resourceType is 'daemonset'. | `1` |
|
||||
| `kubeVersion` | Override Kubernetes version | `""` |
|
||||
| `apiVersions` | Override Kubernetes API versions reported by .Capabilities | `[]` |
|
||||
| `nameOverride` | String to partially override common.names.name | `""` |
|
||||
| `fullnameOverride` | String to fully override common.names.fullname | `""` |
|
||||
| `namespaceOverride` | String to fully override common.names.namespace | `""` |
|
||||
| `commonLabels` | Labels to add to all deployed objects | `{}` |
|
||||
| `commonAnnotations` | Annotations to add to all deployed objects | `{}` |
|
||||
| `clusterDomain` | Kubernetes cluster domain name | `cluster.local` |
|
||||
| `extraDeploy` | Array of extra objects to deploy with the release | `[]` |
|
||||
| `diagnosticMode.enabled` | Enable diagnostic mode (all probes will be disabled and the command will be overridden) | `false` |
|
||||
| `diagnosticMode.command` | Command to override all containers in the chart release | `["sleep"]` |
|
||||
| `diagnosticMode.args` | Args to override all containers in the chart release | `["infinity"]` |
|
||||
| `podSecurityContext.enabled` | Enable Grafana Alloy pods' Security Context | `true` |
|
||||
| `podSecurityContext.fsGroupChangePolicy` | Set filesystem group change policy for Grafana Alloy pods | `Always` |
|
||||
| `podSecurityContext.sysctls` | Set kernel settings using the sysctl interface for Grafana Alloy pods | `[]` |
|
||||
| `podSecurityContext.supplementalGroups` | Set filesystem extra groups for Grafana Alloy pods | `[]` |
|
||||
| `podSecurityContext.fsGroup` | Set fsGroup in Grafana Alloy pods' Security Context | `1001` |
|
||||
| `hostAliases` | Grafana Alloy pods host aliases | `[]` |
|
||||
| `controllerAnnotations` | Annotations for Grafana Alloy controller | `{}` |
|
||||
| `podLabels` | Extra labels for Grafana Alloy pods | `{}` |
|
||||
| `podAnnotations` | Annotations for Grafana Alloy pods | `{}` |
|
||||
| `podAffinityPreset` | Pod affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `""` |
|
||||
| `podAntiAffinityPreset` | Pod anti-affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `soft` |
|
||||
| `nodeAffinityPreset.type` | Node affinity preset type. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `""` |
|
||||
| `nodeAffinityPreset.key` | Node label key to match. Ignored if `affinity` is set | `""` |
|
||||
| `nodeAffinityPreset.values` | Node label values to match. Ignored if `affinity` is set | `[]` |
|
||||
| `affinity` | Affinity for Grafana Alloy pods assignment | `{}` |
|
||||
| `nodeSelector` | Node labels for Grafana Alloy pods assignment | `{}` |
|
||||
| `tolerations` | Tolerations for Grafana Alloy pods assignment | `[]` |
|
||||
| `updateStrategy.type` | Grafana Alloy daemonset strategy type | `RollingUpdate` |
|
||||
| `updateStrategy.type` | Grafana Alloy deployment strategy type | `RollingUpdate` |
|
||||
| `updateStrategy.type` | Grafana Alloy statefulset strategy type | `RollingUpdate` |
|
||||
| `podManagementPolicy` | Pod management policy for Grafana Alloy statefulset | `OrderedReady` |
|
||||
| `priorityClassName` | Grafana Alloy pods' priorityClassName | `""` |
|
||||
| `topologySpreadConstraints` | Topology Spread Constraints for Grafana Alloy pod assignment spread across your cluster among failure-domains | `[]` |
|
||||
| `schedulerName` | Name of the k8s scheduler (other than default) for Grafana Alloy pods | `""` |
|
||||
| `terminationGracePeriodSeconds` | Seconds Grafana Alloy pods need to terminate gracefully | `""` |
|
||||
| `sidecars` | Add additional sidecar containers to the Grafana Alloy pods | `[]` |
|
||||
| `initContainers` | Add additional init containers to the Grafana Alloy pods | `[]` |
|
||||
| `extraVolumes` | Optionally specify extra list of additional volumes for the Grafana Alloy pods | `[]` |
|
||||
| `pdb.create` | Enable/disable a Pod Disruption Budget creation | `true` |
|
||||
| `pdb.minAvailable` | Minimum number/percentage of pods that should remain scheduled | `""` |
|
||||
| `pdb.maxUnavailable` | Maximum number/percentage of pods that may be made unavailable. Defaults to `1` if both `pdb.minAvailable` and `pdb.maxUnavailable` are empty. | `""` |
|
||||
| `autoscaling.vpa.enabled` | Enable VPA for Grafana Alloy pods | `false` |
|
||||
| `autoscaling.vpa.annotations` | Annotations for VPA resource | `{}` |
|
||||
| `autoscaling.vpa.controlledResources` | VPA List of resources that the vertical pod autoscaler can control. Defaults to cpu and memory | `[]` |
|
||||
| `autoscaling.vpa.maxAllowed` | VPA Max allowed resources for the pod | `{}` |
|
||||
| `autoscaling.vpa.minAllowed` | VPA Min allowed resources for the pod | `{}` |
|
||||
| `autoscaling.vpa.updatePolicy.updateMode` | Autoscaling update policy | `Auto` |
|
||||
| `autoscaling.hpa.enabled` | Enable HPA for Grafana Alloy pods | `false` |
|
||||
| `autoscaling.hpa.minReplicas` | Minimum number of replicas | `""` |
|
||||
| `autoscaling.hpa.maxReplicas` | Maximum number of replicas | `""` |
|
||||
| `autoscaling.hpa.targetCPU` | Target CPU utilization percentage | `""` |
|
||||
| `autoscaling.hpa.targetMemory` | Target Memory utilization percentage | `""` |
|
||||
|
||||
### Grafana Alloy parameters
|
||||
|
||||
| Name | Description | Value |
|
||||
| --------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------- |
|
||||
| `alloy.image.registry` | Grafana Alloy image registry | `REGISTRY_NAME` |
|
||||
| `alloy.image.repository` | Grafana Alloy image repository | `REPOSITORY_NAME/grafana-alloy` |
|
||||
| `alloy.image.pullPolicy` | Grafana Alloy image pull policy | `IfNotPresent` |
|
||||
| `alloy.image.pullSecrets` | Grafana Alloy image pull secrets | `[]` |
|
||||
| `alloy.containerPorts.http` | Grafana Alloy HTTP container port | `8080` |
|
||||
| `alloy.extraContainerPorts` | Optionally specify extra list of additional ports for Grafana Alloy containers | `[]` |
|
||||
| `alloy.existingConfigmap` | The name of an existing ConfigMap with your custom configuration for Grafana Alloy | `""` |
|
||||
| `alloy.configuration` | Specify content for Grafan Alloy config file. Omitted if alloy.existingConfigmap is provided. | `""` |
|
||||
| `alloy.extraConfig` | Append extra configuration to the default config file | `""` |
|
||||
| `alloy.clustering.enabled` | Deploy Grafana Alloy in a cluster to allow for load distribution. | `false` |
|
||||
| `alloy.clustering.name` | Name for the Grafana Alloy cluster. Used for differentiating between clusters. | `""` |
|
||||
| `alloy.clustering.portName` | Name for the port used for clustering, useful if running inside an Istio Mesh | `http` |
|
||||
| `alloy.stabilityLevel` | Minimum stability level of components and behavior to enable. Must be | `generally-available` |
|
||||
| `alloy.listenAddr` | Address to listen for traffic on. 0.0.0.0 exposes the UI to other containers. | `0.0.0.0` |
|
||||
| `alloy.uiPathPrefix` | Base path where the UI is exposed. | `/` |
|
||||
| `alloy.storagePath` | Path to where Grafana Alloy stores data (for example, the Write-Ahead Log). | `/tmp/alloy` |
|
||||
| `alloy.enableReporting` | Enables sending Grafana Labs anonymous usage stats to help improve Grafana Alloy. | `true` |
|
||||
| `alloy.command` | Override default Grafana Alloy container command (useful when using custom images) | `[]` |
|
||||
| `alloy.args` | Override default Grafana Alloy container args (useful when using custom images) | `[]` |
|
||||
| `alloy.mounts.varlog` | Mount /var/log from the host into the container for log collection. | `true` |
|
||||
| `alloy.mounts.dockercontainers` | Mount /var/lib/docker/containers from the host into the container for log | `true` |
|
||||
| `alloy.startupProbe.enabled` | Enable startupProbe on Grafana Alloy containers | `false` |
|
||||
| `alloy.startupProbe.initialDelaySeconds` | Initial delay seconds for startupProbe | `30` |
|
||||
| `alloy.startupProbe.periodSeconds` | Period seconds for startupProbe | `30` |
|
||||
| `alloy.startupProbe.timeoutSeconds` | Timeout seconds for startupProbe | `2` |
|
||||
| `alloy.startupProbe.failureThreshold` | Failure threshold for startupProbe | `3` |
|
||||
| `alloy.startupProbe.successThreshold` | Success threshold for startupProbe | `1` |
|
||||
| `alloy.livenessProbe.enabled` | Enable livenessProbe on Grafana Alloy containers | `true` |
|
||||
| `alloy.livenessProbe.initialDelaySeconds` | Initial delay seconds for livenessProbe | `30` |
|
||||
| `alloy.livenessProbe.periodSeconds` | Period seconds for livenessProbe | `30` |
|
||||
| `alloy.livenessProbe.timeoutSeconds` | Timeout seconds for livenessProbe | `2` |
|
||||
| `alloy.livenessProbe.failureThreshold` | Failure threshold for livenessProbe | `3` |
|
||||
| `alloy.livenessProbe.successThreshold` | Success threshold for livenessProbe | `1` |
|
||||
| `alloy.readinessProbe.enabled` | Enable readinessProbe on Grafana Alloy containers | `true` |
|
||||
| `alloy.readinessProbe.initialDelaySeconds` | Initial delay seconds for readinessProbe | `30` |
|
||||
| `alloy.readinessProbe.periodSeconds` | Period seconds for readinessProbe | `30` |
|
||||
| `alloy.readinessProbe.timeoutSeconds` | Timeout seconds for readinessProbe | `2` |
|
||||
| `alloy.readinessProbe.failureThreshold` | Failure threshold for readinessProbe | `3` |
|
||||
| `alloy.readinessProbe.successThreshold` | Success threshold for readinessProbe | `1` |
|
||||
| `alloy.customLivenessProbe` | Custom livenessProbe that overrides the default one | `{}` |
|
||||
| `alloy.customReadinessProbe` | Custom readinessProbe that overrides the default one | `{}` |
|
||||
| `alloy.customStartupProbe` | Custom startupProbe that overrides the default one | `{}` |
|
||||
| `alloy.resourcesPreset` | Set Grafana Alloy container resources according to one common preset (allowed values: none, nano, small, medium, large, xlarge, 2xlarge). This is ignored if alloy.resources is set (alloy.resources is recommended for production). | `nano` |
|
||||
| `alloy.resources` | Set Grafana Alloy container requests and limits for different resources like CPU or memory (essential for production workloads) | `{}` |
|
||||
| `alloy.containerSecurityContext.enabled` | Enabled Grafana Alloy container's Security Context | `true` |
|
||||
| `alloy.containerSecurityContext.seLinuxOptions` | Set SELinux options in Grafana Alloy container | `{}` |
|
||||
| `alloy.containerSecurityContext.runAsUser` | Set runAsUser in Grafana Alloy container's Security Context | `1001` |
|
||||
| `alloy.containerSecurityContext.runAsGroup` | Group ID for Grafana Alloy's containers | `1001` |
|
||||
| `alloy.containerSecurityContext.runAsNonRoot` | Set runAsNonRoot in Grafana Alloy container's Security Context | `true` |
|
||||
| `alloy.containerSecurityContext.readOnlyRootFilesystem` | Set readOnlyRootFilesystem in Grafana Alloy container's Security Context | `true` |
|
||||
| `alloy.containerSecurityContext.privileged` | Set privileged in Grafana Alloy container's Security Context | `false` |
|
||||
| `alloy.containerSecurityContext.allowPrivilegeEscalation` | Set allowPrivilegeEscalation in Grafana Alloy container's Security Context | `false` |
|
||||
| `alloy.containerSecurityContext.capabilities.drop` | List of capabilities to be dropped in Grafana Alloy container | `["ALL"]` |
|
||||
| `alloy.containerSecurityContext.seccompProfile.type` | Set seccomp profile in Grafana Alloy container | `RuntimeDefault` |
|
||||
| `alloy.lifecycleHooks` | for Grafana Alloy containers to automate configuration before or after startup | `{}` |
|
||||
| `alloy.extraEnvVars` | Array with extra environment variables to add to Grafana Alloy containers | `[]` |
|
||||
| `alloy.extraEnvVarsCM` | Name of existing ConfigMap containing extra env vars for Grafana Alloy containers | `""` |
|
||||
| `alloy.extraEnvVarsSecret` | Name of existing Secret containing extra env vars for Grafana Alloy containers | `""` |
|
||||
| `alloy.extraVolumeMounts` | Optionally specify extra list of additional volumeMounts for the Grafana Alloy containers | `[]` |
|
||||
|
||||
### ConfigMap Reload parameters
|
||||
|
||||
| Name | Description | Value |
|
||||
| ------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------ |
|
||||
| `configReloader.enabled` | Enables automatically reloading when the Grafana Alloy config changes. | `true` |
|
||||
| `configReloader.image.registry` | ConfigMap Reload image registry | `REGISTRY_NAME` |
|
||||
| `configReloader.image.repository` | ConfigMap Reload image repository | `REPOSITORY_NAME/grafana-configmap-reload` |
|
||||
| `configReloader.image.pullPolicy` | ConfigMap Reload image pull policy | `IfNotPresent` |
|
||||
| `configReloader.image.pullSecrets` | ConfigMap Reload image pull secrets | `[]` |
|
||||
| `configReloader.containerPorts.http` | ConfigMap Reload HTTP container port | `9533` |
|
||||
| `configReloader.extraContainerPorts` | Optionally specify extra list of additional ports for ConfigMap Reload containers | `[]` |
|
||||
| `configReloader.startupProbe.enabled` | Enable startupProbe on ConfigMap Reload containers | `false` |
|
||||
| `configReloader.startupProbe.initialDelaySeconds` | Initial delay seconds for startupProbe | `30` |
|
||||
| `configReloader.startupProbe.periodSeconds` | Period seconds for startupProbe | `30` |
|
||||
| `configReloader.startupProbe.timeoutSeconds` | Timeout seconds for startupProbe | `2` |
|
||||
| `configReloader.startupProbe.failureThreshold` | Failure threshold for startupProbe | `3` |
|
||||
| `configReloader.startupProbe.successThreshold` | Success threshold for startupProbe | `1` |
|
||||
| `configReloader.livenessProbe.enabled` | Enable livenessProbe on ConfigMap Reload containers | `true` |
|
||||
| `configReloader.livenessProbe.initialDelaySeconds` | Initial delay seconds for livenessProbe | `30` |
|
||||
| `configReloader.livenessProbe.periodSeconds` | Period seconds for livenessProbe | `30` |
|
||||
| `configReloader.livenessProbe.timeoutSeconds` | Timeout seconds for livenessProbe | `2` |
|
||||
| `configReloader.livenessProbe.failureThreshold` | Failure threshold for livenessProbe | `3` |
|
||||
| `configReloader.livenessProbe.successThreshold` | Success threshold for livenessProbe | `1` |
|
||||
| `configReloader.readinessProbe.enabled` | Enable readinessProbe on ConfigMap Reload containers | `true` |
|
||||
| `configReloader.readinessProbe.initialDelaySeconds` | Initial delay seconds for readinessProbe | `30` |
|
||||
| `configReloader.readinessProbe.periodSeconds` | Period seconds for readinessProbe | `30` |
|
||||
| `configReloader.readinessProbe.timeoutSeconds` | Timeout seconds for readinessProbe | `2` |
|
||||
| `configReloader.readinessProbe.failureThreshold` | Failure threshold for readinessProbe | `3` |
|
||||
| `configReloader.readinessProbe.successThreshold` | Success threshold for readinessProbe | `1` |
|
||||
| `configReloader.customLivenessProbe` | Custom livenessProbe that overrides the default one | `{}` |
|
||||
| `configReloader.customReadinessProbe` | Custom readinessProbe that overrides the default one | `{}` |
|
||||
| `configReloader.customStartupProbe` | Custom startupProbe that overrides the default one | `{}` |
|
||||
| `configReloader.resourcesPreset` | Set ConfigMap Reload container resources according to one common preset (allowed values: none, nano, small, medium, large, xlarge, 2xlarge). This is ignored if configReloader.resources is set (configReloader.resources is recommended for production). | `nano` |
|
||||
| `configReloader.resources` | Set ConfigMap Reload container requests and limits for different resources like CPU or memory (essential for production workloads) | `{}` |
|
||||
| `configReloader.containerSecurityContext.enabled` | Enabled ConfigMap Reload container's Security Context | `true` |
|
||||
| `configReloader.containerSecurityContext.seLinuxOptions` | Set SELinux options in ConfigMap Reload container | `{}` |
|
||||
| `configReloader.containerSecurityContext.runAsUser` | Set runAsUser in ConfigMap Reload container's Security Context | `1001` |
|
||||
| `configReloader.containerSecurityContext.runAsGroup` | Group ID for ConfigMap Reload's containers | `1001` |
|
||||
| `configReloader.containerSecurityContext.runAsNonRoot` | Set runAsNonRoot in ConfigMap Reload container's Security Context | `true` |
|
||||
| `configReloader.containerSecurityContext.readOnlyRootFilesystem` | Set readOnlyRootFilesystem in ConfigMap Reload container's Security Context | `true` |
|
||||
| `configReloader.containerSecurityContext.privileged` | Set privileged inConfigMap Reload container's Security Context | `false` |
|
||||
| `configReloader.containerSecurityContext.allowPrivilegeEscalation` | Set allowPrivilegeEscalation in ConfigMap Reload container's Security Context | `false` |
|
||||
| `configReloader.containerSecurityContext.capabilities.drop` | List of capabilities to be dropped in ConfigMap Reload container | `["ALL"]` |
|
||||
| `configReloader.containerSecurityContext.seccompProfile.type` | Set seccomp profile in ConfigMap Reload container | `RuntimeDefault` |
|
||||
| `configReloader.command` | Override default ConfigMap Reload container command (useful when using custom images) | `[]` |
|
||||
| `configReloader.args` | Override default ConfigMap Reload container args (useful when using custom images) | `[]` |
|
||||
| `configReloader.lifecycleHooks` | for Grafana Alloy containers to automate configuration before or after startup | `{}` |
|
||||
| `configReloader.extraEnvVars` | Array with extra environment variables to add to Grafana Alloy containers | `[]` |
|
||||
| `configReloader.extraEnvVarsCM` | Name of existing ConfigMap containing extra env vars for ConfigMap Reload containers | `""` |
|
||||
| `configReloader.extraEnvVarsSecret` | Name of existing Secret containing extra env vars for ConfigMap Reload containers | `""` |
|
||||
| `configReloader.extraVolumeMounts` | Optionally specify extra list of additional volumeMounts for the ConfigMap Reload containers | `[]` |
|
||||
|
||||
### Traffic Exposure Parameters
|
||||
|
||||
| Name | Description | Value |
|
||||
| --------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------- |
|
||||
| `service.type` | Grafana Alloy service type | `LoadBalancer` |
|
||||
| `service.ports.http` | Grafana Alloy service HTTP port | `80` |
|
||||
| `service.nodePorts.http` | Node port for HTTP | `""` |
|
||||
| `service.clusterIP` | Grafana Alloy service Cluster IP | `""` |
|
||||
| `service.loadBalancerIP` | Grafana Alloy service Load Balancer IP | `""` |
|
||||
| `service.loadBalancerSourceRanges` | Grafana Alloy service Load Balancer sources | `[]` |
|
||||
| `service.externalTrafficPolicy` | Grafana Alloy service external traffic policy | `Cluster` |
|
||||
| `service.annotations` | Additional custom annotations for Grafana Alloy service | `{}` |
|
||||
| `service.extraPorts` | Extra ports to expose in Grafana Alloy service (normally used with the `sidecars` value) | `[]` |
|
||||
| `service.sessionAffinity` | Control where client requests go, to the same pod or round-robin | `None` |
|
||||
| `service.sessionAffinityConfig` | Additional settings for the sessionAffinity | `{}` |
|
||||
| `networkPolicy.enabled` | Specifies whether a NetworkPolicy should be created | `true` |
|
||||
| `networkPolicy.allowExternal` | Don't require server label for connections | `true` |
|
||||
| `networkPolicy.allowExternalEgress` | Allow the pod to access any range of port and all destinations. | `true` |
|
||||
| `networkPolicy.addExternalClientAccess` | Allow access from pods with client label set to "true". Ignored if `networkPolicy.allowExternal` is true. | `true` |
|
||||
| `networkPolicy.extraIngress` | Add extra ingress rules to the NetworkPolicy | `[]` |
|
||||
| `networkPolicy.extraEgress` | Add extra ingress rules to the NetworkPolicy (ignored if allowExternalEgress=true) | `[]` |
|
||||
| `networkPolicy.ingressPodMatchLabels` | Labels to match to allow traffic from other pods. Ignored if `networkPolicy.allowExternal` is true. | `{}` |
|
||||
| `networkPolicy.ingressNSMatchLabels` | Labels to match to allow traffic from other namespaces. Ignored if `networkPolicy.allowExternal` is true. | `{}` |
|
||||
| `networkPolicy.ingressNSPodMatchLabels` | Pod labels to match to allow traffic from other namespaces. Ignored if `networkPolicy.allowExternal` is true. | `{}` |
|
||||
| `ingress.enabled` | Enable ingress record generation for Grafana Alloy | `false` |
|
||||
| `ingress.pathType` | Ingress path type | `Prefix` |
|
||||
| `ingress.apiVersion` | Force Ingress API version (automatically detected if not set) | `""` |
|
||||
| `ingress.hostname` | Default host for the ingress record | `alloy.local` |
|
||||
| `ingress.ingressClassName` | IngressClass that will be be used to implement the Ingress (Kubernetes 1.18+) | `""` |
|
||||
| `ingress.path` | Default path for the ingress record | `/` |
|
||||
| `ingress.annotations` | Additional annotations for the Ingress resource. To enable certificate autogeneration, place here your cert-manager annotations. | `{}` |
|
||||
| `ingress.tls` | Enable TLS configuration for the host defined at `ingress.hostname` parameter | `false` |
|
||||
| `ingress.selfSigned` | Create a TLS secret for this ingress record using self-signed certificates generated by Helm | `false` |
|
||||
| `ingress.extraHosts` | An array with additional hostname(s) to be covered with the ingress record | `[]` |
|
||||
| `ingress.extraPaths` | An array with additional arbitrary paths that may need to be added to the ingress under the main host | `[]` |
|
||||
| `ingress.extraTls` | TLS configuration for additional hostname(s) to be covered with this ingress record | `[]` |
|
||||
| `ingress.secrets` | Custom TLS certificates as secrets | `[]` |
|
||||
| `ingress.extraRules` | Additional rules to be covered with this ingress record | `[]` |
|
||||
|
||||
### Other Parameters
|
||||
|
||||
| Name | Description | Value |
|
||||
| --------------------------------------------- | ------------------------------------------------------------------------------------------------------ | ------- |
|
||||
| `rbac.create` | Specifies whether RBAC resources should be created | `true` |
|
||||
| `rbac.rules` | Custom RBAC rules to set | `[]` |
|
||||
| `serviceAccount.create` | Specifies whether a ServiceAccount should be created | `true` |
|
||||
| `serviceAccount.name` | The name of the ServiceAccount to use. | `""` |
|
||||
| `serviceAccount.annotations` | Additional Service Account annotations (evaluated as a template) | `{}` |
|
||||
| `serviceAccount.automountServiceAccountToken` | Automount service account token for the server service account | `true` |
|
||||
| `metrics.enabled` | Enable the export of Prometheus metrics | `false` |
|
||||
| `metrics.serviceMonitor.enabled` | if `true`, creates a Prometheus Operator ServiceMonitor (also requires `metrics.enabled` to be `true`) | `false` |
|
||||
| `metrics.serviceMonitor.namespace` | Namespace in which Prometheus is running | `""` |
|
||||
| `metrics.serviceMonitor.annotations` | Additional custom annotations for the ServiceMonitor | `{}` |
|
||||
| `metrics.serviceMonitor.labels` | Extra labels for the ServiceMonitor | `{}` |
|
||||
| `metrics.serviceMonitor.jobLabel` | The name of the label on the target service to use as the job name in Prometheus | `""` |
|
||||
| `metrics.serviceMonitor.honorLabels` | honorLabels chooses the metric's labels on collisions with target labels | `false` |
|
||||
| `metrics.serviceMonitor.interval` | Interval at which metrics should be scraped. | `""` |
|
||||
| `metrics.serviceMonitor.scrapeTimeout` | Timeout after which the scrape is ended | `""` |
|
||||
| `metrics.serviceMonitor.metricRelabelings` | Specify additional relabeling of metrics | `[]` |
|
||||
| `metrics.serviceMonitor.relabelings` | Specify general relabeling | `[]` |
|
||||
| `metrics.serviceMonitor.selector` | Prometheus instance selector labels | `{}` |
|
||||
|
||||
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
|
||||
|
||||
```console
|
||||
helm install my-release \
|
||||
--set aggregator.port=24444 oci://REGISTRY_NAME/REPOSITORY_NAME/fluentd
|
||||
```
|
||||
|
||||
> Note: You need to substitute the placeholders `REGISTRY_NAME` and `REPOSITORY_NAME` with a reference to your Helm chart registry and repository. For example, in the case of Bitnami, you need to use `REGISTRY_NAME=registry-1.docker.io` and `REPOSITORY_NAME=bitnamicharts`.
|
||||
|
||||
The above command sets the aggregators to listen on port 24444.
|
||||
|
||||
Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example,
|
||||
|
||||
```console
|
||||
helm install my-release -f values.yaml oci://REGISTRY_NAME/REPOSITORY_NAME/fluentd
|
||||
```
|
||||
|
||||
> Note: You need to substitute the placeholders `REGISTRY_NAME` and `REPOSITORY_NAME` with a reference to your Helm chart registry and repository. For example, in the case of Bitnami, you need to use `REGISTRY_NAME=registry-1.docker.io` and `REPOSITORY_NAME=bitnamicharts`.
|
||||
> **Tip**: You can use the default [values.yaml](https://github.com/bitnami/charts/tree/main/bitnami/fluentd/values.yaml)
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
Find more information about how to deal with common errors related to Bitnami's Helm charts in [this troubleshooting guide](https://docs.bitnami.com/general/how-to/troubleshoot-helm-chart-issues).
|
||||
|
||||
## License
|
||||
|
||||
Copyright © 2025 Broadcom. The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
<http://www.apache.org/licenses/LICENSE-2.0>
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
@@ -0,0 +1,209 @@
|
||||
# Source: https://raw.githubusercontent.com/grafana/alloy/refs/tags/v{version}/operations/helm/charts/alloy/charts/crds/crds/monitoring.grafana.com_podlogs.yaml
|
||||
# Version: 1.9.0
|
||||
# VersionOf: grafana-alloy
|
||||
# UseKustomize: true
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.9.2
|
||||
creationTimestamp: null
|
||||
name: podlogs.monitoring.grafana.com
|
||||
spec:
|
||||
group: monitoring.grafana.com
|
||||
names:
|
||||
categories:
|
||||
- grafana-alloy
|
||||
- alloy
|
||||
kind: PodLogs
|
||||
listKind: PodLogsList
|
||||
plural: podlogs
|
||||
singular: podlogs
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1alpha2
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: PodLogs defines how to collect logs for a Pod.
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation
|
||||
of an object. Servers should convert recognized schemas to the latest
|
||||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this
|
||||
object represents. Servers may infer this from the endpoint the client
|
||||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: PodLogsSpec defines how to collect logs for a Pod.
|
||||
properties:
|
||||
namespaceSelector:
|
||||
description: Selector to select which namespaces the Pod objects are
|
||||
discovered from.
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list of label selector requirements.
|
||||
The requirements are ANDed.
|
||||
items:
|
||||
description: A label selector requirement is a selector that
|
||||
contains values, a key, and an operator that relates the key
|
||||
and values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key that the selector applies
|
||||
to.
|
||||
type: string
|
||||
operator:
|
||||
description: operator represents a key's relationship to
|
||||
a set of values. Valid operators are In, NotIn, Exists
|
||||
and DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: values is an array of string values. If the
|
||||
operator is In or NotIn, the values array must be non-empty.
|
||||
If the operator is Exists or DoesNotExist, the values
|
||||
array must be empty. This array is replaced during a strategic
|
||||
merge patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: matchLabels is a map of {key,value} pairs. A single
|
||||
{key,value} in the matchLabels map is equivalent to an element
|
||||
of matchExpressions, whose key field is "key", the operator
|
||||
is "In", and the values array contains only "value". The requirements
|
||||
are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
relabelings:
|
||||
description: RelabelConfigs to apply to logs before delivering.
|
||||
items:
|
||||
description: 'RelabelConfig allows dynamic rewriting of the label
|
||||
set, being applied to samples before ingestion. It defines `<metric_relabel_configs>`-section
|
||||
of Prometheus configuration. More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs'
|
||||
properties:
|
||||
action:
|
||||
default: replace
|
||||
description: Action to perform based on regex matching. Default
|
||||
is 'replace'. uppercase and lowercase actions require Prometheus
|
||||
>= 2.36.
|
||||
enum:
|
||||
- replace
|
||||
- Replace
|
||||
- keep
|
||||
- Keep
|
||||
- drop
|
||||
- Drop
|
||||
- hashmod
|
||||
- HashMod
|
||||
- labelmap
|
||||
- LabelMap
|
||||
- labeldrop
|
||||
- LabelDrop
|
||||
- labelkeep
|
||||
- LabelKeep
|
||||
- lowercase
|
||||
- Lowercase
|
||||
- uppercase
|
||||
- Uppercase
|
||||
type: string
|
||||
modulus:
|
||||
description: Modulus to take of the hash of the source label
|
||||
values.
|
||||
format: int64
|
||||
type: integer
|
||||
regex:
|
||||
description: Regular expression against which the extracted
|
||||
value is matched. Default is '(.*)'
|
||||
type: string
|
||||
replacement:
|
||||
description: Replacement value against which a regex replace
|
||||
is performed if the regular expression matches. Regex capture
|
||||
groups are available. Default is '$1'
|
||||
type: string
|
||||
separator:
|
||||
description: Separator placed between concatenated source label
|
||||
values. default is ';'.
|
||||
type: string
|
||||
sourceLabels:
|
||||
description: The source labels select values from existing labels.
|
||||
Their content is concatenated using the configured separator
|
||||
and matched against the configured regular expression for
|
||||
the replace, keep, and drop actions.
|
||||
items:
|
||||
description: LabelName is a valid Prometheus label name which
|
||||
may only contain ASCII letters, numbers, as well as underscores.
|
||||
pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$
|
||||
type: string
|
||||
type: array
|
||||
targetLabel:
|
||||
description: Label to which the resulting value is written in
|
||||
a replace action. It is mandatory for replace actions. Regex
|
||||
capture groups are available.
|
||||
type: string
|
||||
type: object
|
||||
type: array
|
||||
selector:
|
||||
description: Selector to select Pod objects. Required.
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list of label selector requirements.
|
||||
The requirements are ANDed.
|
||||
items:
|
||||
description: A label selector requirement is a selector that
|
||||
contains values, a key, and an operator that relates the key
|
||||
and values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key that the selector applies
|
||||
to.
|
||||
type: string
|
||||
operator:
|
||||
description: operator represents a key's relationship to
|
||||
a set of values. Valid operators are In, NotIn, Exists
|
||||
and DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: values is an array of string values. If the
|
||||
operator is In or NotIn, the values array must be non-empty.
|
||||
If the operator is Exists or DoesNotExist, the values
|
||||
array must be empty. This array is replaced during a strategic
|
||||
merge patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: matchLabels is a map of {key,value} pairs. A single
|
||||
{key,value} in the matchLabels map is equivalent to an element
|
||||
of matchExpressions, whose key field is "key", the operator
|
||||
is "In", and the values array contains only "value". The requirements
|
||||
are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
required:
|
||||
- selector
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
@@ -0,0 +1,69 @@
|
||||
CHART NAME: {{ .Chart.Name }}
|
||||
CHART VERSION: {{ .Chart.Version }}
|
||||
APP VERSION: {{ .Chart.AppVersion }}
|
||||
|
||||
Did you know there are enterprise versions of the Bitnami catalog? For enhanced secure software supply chain features, unlimited pulls from Docker, LTS support, or application customization, see Bitnami Premium or Tanzu Application Catalog. See https://www.arrow.com/globalecs/na/vendors/bitnami for more information.
|
||||
|
||||
** Please be patient while the chart is being deployed **
|
||||
|
||||
{{- if .Values.diagnosticMode.enabled }}
|
||||
The chart has been deployed in diagnostic mode. All probes have been disabled and the command has been overwritten with:
|
||||
|
||||
command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 4 }}
|
||||
args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 4 }}
|
||||
|
||||
Get the list of pods by executing:
|
||||
|
||||
kubectl get pods --namespace {{ include "common.names.namespace" . | quote }} -l app.kubernetes.io/instance={{ .Release.Name }}
|
||||
|
||||
Access the pod you want to debug by executing
|
||||
|
||||
kubectl exec --namespace {{ include "common.names.namespace" . | quote }} -ti <NAME OF THE POD> -- bash
|
||||
|
||||
In order to replicate the container startup scripts execute this command:
|
||||
|
||||
/opt/bitnami/grafana-alloy/bin/alloy run /opt/bitnami/grafana-alloy/config/config.alloy --storage.path={{ .Values.alloy.storagePath }}
|
||||
|
||||
{{- else }}
|
||||
|
||||
To verify that Grafana Alloy has started, run:
|
||||
|
||||
kubectl get all -l "app.kubernetes.io/name={{ include "common.names.name" . }},app.kubernetes.io/instance={{ .Release.Name }}"
|
||||
|
||||
To access the dashboard site from outside the cluster follow the steps below:
|
||||
|
||||
{{- if .Values.ingress.enabled }}
|
||||
|
||||
1. Get the dashboard URL and associate its hostname to your cluster external IP:
|
||||
|
||||
export CLUSTER_IP=$(minikube ip) # On Minikube. Use: `kubectl cluster-info` on others K8s clusters
|
||||
echo "Dashboard URL: http{{ if .Values.ingress.tls }}s{{ end }}://{{ .Values.ingress.hostname }}/"
|
||||
echo "$CLUSTER_IP {{ .Values.ingress.hostname }}" | sudo tee -a /etc/hosts
|
||||
|
||||
{{- else }}
|
||||
|
||||
1. Get the dashboard URL by running these commands:
|
||||
|
||||
{{- if contains "NodePort" .Values.service.type }}
|
||||
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "common.names.fullname" . }})
|
||||
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
|
||||
echo "HTTP port at $NODE_IP:$NODE_PORT"
|
||||
{{- else if contains "LoadBalancer" .Values.service.type }}
|
||||
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
|
||||
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "common.names.fullname" . }}'
|
||||
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "common.names.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
|
||||
echo "HTTP port at $SERVICE_IP:{{ .Values.service.ports.http }}"
|
||||
{{- else if contains "ClusterIP" .Values.service.type }}
|
||||
echo "HTTP port at 127.0.0.1:2020"
|
||||
kubectl port-forward svc/{{ include "common.names.fullname" . }} 2020:{{ .Values.service.ports.http }} &
|
||||
{{- end }}
|
||||
|
||||
{{- end }}
|
||||
|
||||
{{- end }}
|
||||
|
||||
{{- include "grafana-alloy.validateValues" . }}
|
||||
{{- include "grafana-alloy.checkRollingTags" . -}}
|
||||
{{- include "common.warnings.resources" (dict "sections" (list "alloy" "configReloader" ) "context" $) }}
|
||||
{{- include "common.warnings.modifiedImages" (dict "images" (list .Values.alloy.image .Values.configReloader.image ) "context" $) }}
|
||||
{{- include "common.errors.insecureImages" (dict "images" (list .Values.alloy.image .Values.configReloader.image ) "context" $) }}
|
||||
@@ -0,0 +1,78 @@
|
||||
{{/*
|
||||
Copyright Broadcom, Inc. All Rights Reserved.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{/*
|
||||
Return the proper Grafana Alloy image name
|
||||
*/}}
|
||||
{{- define "grafana-alloy.image" -}}
|
||||
{{ include "common.images.image" (dict "imageRoot" .Values.alloy.image "global" .Values.global) }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the proper config reloader image name
|
||||
*/}}
|
||||
{{- define "config-reloader.image" -}}
|
||||
{{ include "common.images.image" (dict "imageRoot" .Values.configReloader.image "global" .Values.global) }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the proper Docker Image Registry Secret Names
|
||||
*/}}
|
||||
{{- define "grafana-alloy.imagePullSecrets" -}}
|
||||
{{- include "common.images.renderPullSecrets" (dict "images" (list .Values.alloy.image .Values.configReloader.image) "context" $) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create the name of the service account to use
|
||||
*/}}
|
||||
{{- define "grafana-alloy.serviceAccountName" -}}
|
||||
{{- if .Values.serviceAccount.create -}}
|
||||
{{ default (include "common.names.fullname" .) .Values.serviceAccount.name }}
|
||||
{{- else -}}
|
||||
{{ default "default" .Values.serviceAccount.name }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Name of the Grafana Alloy ConfigMap
|
||||
*/}}
|
||||
{{- define "grafana-alloy.configmapName" -}}
|
||||
{{- if .Values.alloy.existingConfigmap -}}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.alloy.existingConfigmap "context" $) -}}
|
||||
{{- else -}}
|
||||
{{- include "common.names.fullname" . -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/* Validate values of Grafana Alloy - resource type */}}
|
||||
{{- define "grafana-alloy.validateValues.resourceType" -}}
|
||||
{{- $resourceType := lower .Values.resourceType -}}
|
||||
{{- if and (not (eq $resourceType "daemonset")) (not (eq $resourceType "statefulset")) (not (eq $resourceType "deployment")) -}}
|
||||
alloy: resource-type
|
||||
Alloy resource type {{ .Values.resourceType }} is not valid, only "daemonset", "statefulset", and "deployment" are allowed
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Compile all warnings into a single message.
|
||||
*/}}
|
||||
{{- define "grafana-alloy.validateValues" -}}
|
||||
{{- $messages := list -}}
|
||||
{{- $messages := append $messages (include "grafana-alloy.validateValues.resourceType" .) -}}
|
||||
{{- $messages := without $messages "" -}}
|
||||
{{- $message := join "\n" $messages -}}
|
||||
|
||||
{{- if $message -}}
|
||||
{{- printf "\nVALUES VALIDATION:\n%s" $message -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Check if there are rolling tags in the images
|
||||
*/}}
|
||||
{{- define "grafana-alloy.checkRollingTags" -}}
|
||||
{{- include "common.warnings.rollingTag" .Values.alloy.image }}
|
||||
{{- include "common.warnings.rollingTag" .Values.configReloader.image }}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,349 @@
|
||||
{{- /*
|
||||
Copyright Broadcom, Inc. All Rights Reserved.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- $resourceType := lower .Values.resourceType -}}
|
||||
{{- if eq $resourceType "deployment" }}
|
||||
apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }}
|
||||
kind: Deployment
|
||||
{{- else if eq $resourceType "statefulset" }}
|
||||
apiVersion: {{ include "common.capabilities.statefulset.apiVersion" . }}
|
||||
kind: StatefulSet
|
||||
{{- else }}
|
||||
apiVersion: {{ include "common.capabilities.daemonset.apiVersion" . }}
|
||||
kind: DaemonSet
|
||||
{{- end }}
|
||||
metadata:
|
||||
name: {{ template "common.names.fullname" . }}
|
||||
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 or .Values.controllerAnnotations .Values.commonAnnotations }}
|
||||
{{- $annotations := include "common.tplvalues.merge" (dict "values" (list .Values.controllerAnnotations .Values.commonAnnotations) "context" .) }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if and (not .Values.autoscaling.hpa.enabled) (not (eq $resourceType "daemonset")) }}
|
||||
replicas: {{ .Values.replicaCount }}
|
||||
{{- end }}
|
||||
{{- if eq $resourceType "statefulset" }}
|
||||
podManagementPolicy: {{ .Values.podManagementPolicy | quote }}
|
||||
{{- end }}
|
||||
{{- if eq $resourceType "statefulset" }}
|
||||
serviceName: {{ template "common.names.fullname" . }}
|
||||
{{- if .Values.updateStrategy }}
|
||||
updateStrategy: {{- toYaml .Values.updateStrategy | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- else if .Values.updateStrategy }}
|
||||
{{- if eq $resourceType "daemonset" }}
|
||||
updateStrategy: {{- toYaml .Values.updateStrategy | nindent 4 }}
|
||||
{{- else }}
|
||||
strategy: {{- toYaml .Values.updateStrategy | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- $podLabels := include "common.tplvalues.merge" (dict "values" (list .Values.podLabels .Values.commonLabels) "context" .) }}
|
||||
selector:
|
||||
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
|
||||
app.kubernetes.io/component: alloy
|
||||
app.kubernetes.io/part-of: grafana-alloy
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
|
||||
{{- if .Values.podAnnotations }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.podAnnotations "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }}
|
||||
app.kubernetes.io/component: alloy
|
||||
app.kubernetes.io/part-of: grafana-alloy
|
||||
spec:
|
||||
{{- include "grafana-alloy.imagePullSecrets" . | nindent 6 }}
|
||||
serviceAccountName: {{ template "grafana-alloy.serviceAccountName" . }}
|
||||
automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }}
|
||||
{{- if .Values.hostAliases }}
|
||||
hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.hostAliases "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.affinity }}
|
||||
affinity: {{- include "common.tplvalues.render" ( dict "value" .Values.affinity "context" $) | nindent 8 }}
|
||||
{{- else }}
|
||||
affinity:
|
||||
podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAffinityPreset "component" "alloy" "customLabels" $podLabels "context" $) | nindent 10 }}
|
||||
podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAntiAffinityPreset "component" "alloy" "customLabels" $podLabels "context" $) | nindent 10 }}
|
||||
nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.nodeAffinityPreset.type "key" .Values.nodeAffinityPreset.key "values" .Values.nodeAffinityPreset.values) | nindent 10 }}
|
||||
{{- end }}
|
||||
{{- if .Values.nodeSelector }}
|
||||
nodeSelector: {{- include "common.tplvalues.render" ( dict "value" .Values.nodeSelector "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.tolerations }}
|
||||
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.tolerations "context" .) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.priorityClassName }}
|
||||
priorityClassName: {{ .Values.priorityClassName | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.schedulerName }}
|
||||
schedulerName: {{ .Values.schedulerName | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.topologySpreadConstraints }}
|
||||
topologySpreadConstraints: {{- include "common.tplvalues.render" (dict "value" .Values.topologySpreadConstraints "context" .) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.podSecurityContext.enabled }}
|
||||
securityContext: {{- omit .Values.podSecurityContext "enabled" | toYaml | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.terminationGracePeriodSeconds }}
|
||||
terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }}
|
||||
{{- end }}
|
||||
initContainers:
|
||||
{{- if .Values.initContainers }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.initContainers "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: alloy
|
||||
image: {{ template "grafana-alloy.image" . }}
|
||||
imagePullPolicy: {{ .Values.alloy.image.pullPolicy }}
|
||||
{{- if .Values.alloy.containerSecurityContext.enabled }}
|
||||
securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.alloy.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.alloy.command }}
|
||||
command: {{- include "common.tplvalues.render" (dict "value" .Values.alloy.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.alloy.args }}
|
||||
args: {{- include "common.tplvalues.render" (dict "value" .Values.alloy.args "context" $) | nindent 12 }}
|
||||
{{- else }}
|
||||
args:
|
||||
- run
|
||||
- /opt/bitnami/grafana-alloy/config/config.alloy
|
||||
- --storage.path={{ .Values.alloy.storagePath }}
|
||||
- --server.http.listen-addr={{ .Values.alloy.listenAddr }}:{{ .Values.alloy.containerPorts.http }}
|
||||
- --server.http.ui-path-prefix={{ .Values.alloy.uiPathPrefix }}
|
||||
{{- if not .Values.alloy.enableReporting }}
|
||||
- --disable-reporting
|
||||
{{- end }}
|
||||
{{- if .Values.alloy.clustering.enabled }}
|
||||
- --cluster.enabled=true
|
||||
- --cluster.join-addresses={{ printf "%s-cluster" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
|
||||
{{- if .Values.alloy.clustering.name }}
|
||||
- --cluster.name={{ .Values.alloy.clustering.name }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.alloy.stabilityLevel }}
|
||||
- --stability.level={{ .Values.alloy.stabilityLevel }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
env:
|
||||
- name: ALLOY_DEPLOY_MODE
|
||||
value: "helm"
|
||||
- name: HOSTNAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: spec.nodeName
|
||||
{{- if .Values.alloy.extraEnvVars }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.alloy.extraEnvVars "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
envFrom:
|
||||
{{- if .Values.alloy.extraEnvVarsCM }}
|
||||
- configMapRef:
|
||||
name: {{ include "common.tplvalues.render" (dict "value" .Values.alloy.extraEnvVarsCM "context" $) }}
|
||||
{{- end }}
|
||||
{{- if .Values.alloy.extraEnvVarsSecret }}
|
||||
- secretRef:
|
||||
name: {{ include "common.tplvalues.render" (dict "value" .Values.alloy.extraEnvVarsSecret "context" $) }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: {{ .Values.alloy.containerPorts.http }}
|
||||
{{- if .Values.alloy.extraContainerPorts }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.alloy.extraContainerPorts "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.alloy.resources }}
|
||||
resources: {{- toYaml .Values.alloy.resources | nindent 12 }}
|
||||
{{- else if ne .Values.alloy.resourcesPreset "none" }}
|
||||
resources: {{- include "common.resources.preset" (dict "type" .Values.alloy.resourcesPreset) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if not .Values.diagnosticMode.enabled }}
|
||||
{{- if .Values.alloy.customLivenessProbe }}
|
||||
livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.alloy.customLivenessProbe "context" $) | nindent 12 }}
|
||||
{{- else if .Values.alloy.livenessProbe.enabled }}
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /-/healthy
|
||||
port: http
|
||||
initialDelaySeconds: {{ .Values.alloy.livenessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.alloy.livenessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.alloy.livenessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.alloy.livenessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.alloy.livenessProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
{{- if .Values.alloy.customReadinessProbe }}
|
||||
readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.alloy.customReadinessProbe "context" $) | nindent 12 }}
|
||||
{{- else if .Values.alloy.readinessProbe.enabled }}
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /-/ready
|
||||
port: http
|
||||
initialDelaySeconds: {{ .Values.alloy.readinessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.alloy.readinessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.alloy.readinessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.alloy.readinessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.alloy.readinessProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
{{- if .Values.alloy.customStartupProbe }}
|
||||
startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.alloy.customStartupProbe "context" $) | nindent 12 }}
|
||||
{{- else if .Values.alloy.startupProbe.enabled }}
|
||||
startupProbe:
|
||||
httpGet:
|
||||
path: /-/ready
|
||||
port: http
|
||||
initialDelaySeconds: {{ .Values.alloy.startupProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.alloy.startupProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.alloy.startupProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.alloy.startupProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.alloy.startupProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
{{- if .Values.alloy.lifecycleHooks }}
|
||||
lifecycle: {{- include "common.tplvalues.render" (dict "value" .Values.alloy.lifecycleHooks "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- name: config
|
||||
mountPath: /opt/bitnami/grafana-alloy/config
|
||||
{{- if .Values.alloy.mounts.varlog }}
|
||||
- name: varlog
|
||||
mountPath: /var/log
|
||||
readOnly: true
|
||||
{{- end }}
|
||||
{{- if .Values.alloy.mounts.dockercontainers }}
|
||||
- name: dockercontainers
|
||||
mountPath: /var/lib/docker/containers
|
||||
readOnly: true
|
||||
{{- end }}
|
||||
- name: empty-dir
|
||||
mountPath: {{ .Values.alloy.storagePath }}
|
||||
subPath: app-storage-dir
|
||||
- name: empty-dir
|
||||
mountPath: /tmp
|
||||
subPath: tmp-dir
|
||||
{{- if .Values.alloy.extraVolumeMounts }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.alloy.extraVolumeMounts "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.configReloader.enabled }}
|
||||
- name: config-reloader
|
||||
image: {{ template "config-reloader.image" . }}
|
||||
imagePullPolicy: {{ .Values.configReloader.image.pullPolicy }}
|
||||
{{- if .Values.configReloader.containerSecurityContext.enabled }}
|
||||
securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.configReloader.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.configReloader.command }}
|
||||
command: {{- include "common.tplvalues.render" (dict "value" .Values.configReloader.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.configReloader.args }}
|
||||
args: {{- include "common.tplvalues.render" (dict "value" .Values.configReloader.args "context" $) | nindent 12 }}
|
||||
{{- else }}
|
||||
args:
|
||||
- -volume-dir=/opt/bitnami/grafana-alloy/config
|
||||
- -webhook-url=http://localhost:{{ .Values.alloy.containerPorts.http }}/-/reload
|
||||
- -web.listen-address=:{{ .Values.configReloader.containerPorts.http }}
|
||||
{{- end }}
|
||||
env:
|
||||
{{- if .Values.configReloader.extraEnvVars }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.configReloader.extraEnvVars "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
envFrom:
|
||||
{{- if .Values.configReloader.extraEnvVarsCM }}
|
||||
- configMapRef:
|
||||
name: {{ include "common.tplvalues.render" (dict "value" .Values.configReloader.extraEnvVarsCM "context" $) }}
|
||||
{{- end }}
|
||||
{{- if .Values.configReloader.extraEnvVarsSecret }}
|
||||
- secretRef:
|
||||
name: {{ include "common.tplvalues.render" (dict "value" .Values.configReloader.extraEnvVarsSecret "context" $) }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: {{ .Values.configReloader.containerPorts.http }}
|
||||
{{- if .Values.configReloader.extraContainerPorts }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.configReloader.extraContainerPorts "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.configReloader.resources }}
|
||||
resources: {{- toYaml .Values.configReloader.resources | nindent 12 }}
|
||||
{{- else if ne .Values.configReloader.resourcesPreset "none" }}
|
||||
resources: {{- include "common.resources.preset" (dict "type" .Values.configReloader.resourcesPreset) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if not .Values.diagnosticMode.enabled }}
|
||||
{{- if .Values.configReloader.customLivenessProbe }}
|
||||
livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.configReloader.customLivenessProbe "context" $) | nindent 12 }}
|
||||
{{- else if .Values.configReloader.livenessProbe.enabled }}
|
||||
livenessProbe:
|
||||
tcpSocket:
|
||||
port: http
|
||||
initialDelaySeconds: {{ .Values.configReloader.livenessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.configReloader.livenessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.configReloader.livenessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.configReloader.livenessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.configReloader.livenessProbe.failureThreshold }} {{- end }}
|
||||
{{- if .Values.configReloader.customReadinessProbe }}
|
||||
readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.configReloader.customReadinessProbe "context" $) | nindent 12 }}
|
||||
{{- else if .Values.configReloader.readinessProbe.enabled }}
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /metrics
|
||||
port: http
|
||||
initialDelaySeconds: {{ .Values.configReloader.readinessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.configReloader.readinessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.configReloader.readinessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.configReloader.readinessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.configReloader.readinessProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
{{- if .Values.configReloader.customStartupProbe }}
|
||||
startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.configReloader.customStartupProbe "context" $) | nindent 12 }}
|
||||
{{- else if .Values.configReloader.startupProbe.enabled }}
|
||||
startupProbe:
|
||||
httpGet:
|
||||
path: /metrics
|
||||
port: http
|
||||
initialDelaySeconds: {{ .Values.configReloader.startupProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.configReloader.startupProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.configReloader.startupProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.configReloader.startupProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.configReloader.startupProbe.failureThreshold }} {{- end }}
|
||||
{{- if .Values.configReloader.lifecycleHooks }}
|
||||
lifecycle: {{- include "common.tplvalues.render" (dict "value" .Values.configReloader.lifecycleHooks "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- name: config
|
||||
mountPath: /opt/bitnami/grafana-alloy/config
|
||||
{{- if .Values.configReloader.extraVolumeMounts }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.configReloader.extraVolumeMounts "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.sidecars }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.sidecars "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
volumes:
|
||||
- name: config
|
||||
configMap:
|
||||
name: {{ include "grafana-alloy.configmapName" . }}
|
||||
{{- if .Values.alloy.mounts.varlog }}
|
||||
- name: varlog
|
||||
hostPath:
|
||||
path: /var/log
|
||||
{{- end }}
|
||||
{{- if .Values.alloy.mounts.dockercontainers }}
|
||||
- name: dockercontainers
|
||||
hostPath:
|
||||
path: /var/lib/docker/containers
|
||||
{{- end }}
|
||||
- name: empty-dir
|
||||
emptyDir: {}
|
||||
{{- if .Values.extraVolumes }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.extraVolumes "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,47 @@
|
||||
{{- /*
|
||||
Copyright Broadcom, Inc. All Rights Reserved.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if .Values.alloy.clustering.enabled -}}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ printf "%s-cluster" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
|
||||
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 or .Values.service.annotations .Values.commonAnnotations }}
|
||||
{{- $annotations := include "common.tplvalues.merge" (dict "values" (list .Values.service.annotations .Values.commonAnnotations) "context" .) }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
type: ClusterIP
|
||||
clusterIP: {{ .Values.service.clusterIP }}
|
||||
{{- if .Values.service.sessionAffinity }}
|
||||
sessionAffinity: {{ .Values.service.sessionAffinity }}
|
||||
{{- end }}
|
||||
{{- if .Values.service.sessionAffinityConfig }}
|
||||
sessionAffinityConfig: {{- include "common.tplvalues.render" (dict "value" .Values.service.sessionAffinityConfig "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
ports:
|
||||
# This service should only be used for clustering, and not metric
|
||||
# collection.
|
||||
- name: {{ .Values.alloy.clustering.portName }}
|
||||
port: {{ .Values.alloy.containerPorts.http }}
|
||||
targetPort: {{ .Values.alloy.clustering.portName }}
|
||||
protocol: TCP
|
||||
{{- if and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) (not (empty .Values.service.nodePorts.http)) }}
|
||||
nodePort: {{ .Values.service.nodePorts.http }}
|
||||
{{- else if eq .Values.service.type "ClusterIP" }}
|
||||
nodePort: null
|
||||
{{- end }}
|
||||
{{- if .Values.service.extraPorts }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.service.extraPorts "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- $podLabels := include "common.tplvalues.merge" (dict "values" (list .Values.podLabels .Values.commonLabels) "context" .) | fromYaml }}
|
||||
selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/component: alloy
|
||||
app.kubernetes.io/part-of: grafana-alloy
|
||||
{{- end }}
|
||||
@@ -0,0 +1,47 @@
|
||||
{{- /*
|
||||
Copyright Broadcom, Inc. All Rights Reserved.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ template "common.names.fullname" . }}
|
||||
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 }}
|
||||
data:
|
||||
config.alloy: |
|
||||
{{- if .Values.alloy.configuration }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.alloy.configuration "context" .) | nindent 4 }}
|
||||
{{- else }}
|
||||
logging {
|
||||
level = "info"
|
||||
format = "logfmt"
|
||||
}
|
||||
discovery.kubernetes "pods" {
|
||||
role = "pod"
|
||||
}
|
||||
discovery.kubernetes "nodes" {
|
||||
role = "node"
|
||||
}
|
||||
discovery.kubernetes "services" {
|
||||
role = "service"
|
||||
}
|
||||
discovery.kubernetes "endpoints" {
|
||||
role = "endpoints"
|
||||
}
|
||||
discovery.kubernetes "endpointslices" {
|
||||
role = "endpointslice"
|
||||
}
|
||||
discovery.kubernetes "ingresses" {
|
||||
role = "ingress"
|
||||
}
|
||||
{{- end }}
|
||||
{{- if .Values.alloy.extraConfig }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.alloy.extraConfig "context" .) | nindent 4 }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,9 @@
|
||||
{{- /*
|
||||
Copyright Broadcom, Inc. All Rights Reserved.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- range .Values.extraDeploy }}
|
||||
---
|
||||
{{ include "common.tplvalues.render" (dict "value" . "context" $) }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,48 @@
|
||||
{{- /*
|
||||
Copyright Broadcom, Inc. All Rights Reserved.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- $resourceType := lower .Values.resourceType -}}
|
||||
{{- if and .Values.autoscaling.hpa.enabled (not (eq $resourceType "daemonset")) }}
|
||||
apiVersion: {{ include "common.capabilities.hpa.apiVersion" ( dict "context" $ ) }}
|
||||
kind: HorizontalPodAutoscaler
|
||||
metadata:
|
||||
name: {{ include "common.names.fullname" . }}
|
||||
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 }}
|
||||
spec:
|
||||
scaleTargetRef:
|
||||
{{- if eq $resourceType "deployment" }}
|
||||
apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }}
|
||||
kind: Deployment
|
||||
{{- else }}
|
||||
apiVersion: {{ template "common.capabilities.statefulset.apiVersion" . }}
|
||||
kind: StatefulSet
|
||||
{{- end }}
|
||||
name: {{ include "common.names.fullname" . }}
|
||||
minReplicas: {{ .Values.autoscaling.hpa.minReplicas }}
|
||||
maxReplicas: {{ .Values.autoscaling.hpa.maxReplicas }}
|
||||
metrics:
|
||||
{{- if .Values.autoscaling.hpa.targetMemory }}
|
||||
- type: Resource
|
||||
resource:
|
||||
name: memory
|
||||
target:
|
||||
type: Utilization
|
||||
averageUtilization: {{ .Values.autoscaling.hpa.targetMemory }}
|
||||
{{- end }}
|
||||
{{- if .Values.autoscaling.hpa.targetCPU }}
|
||||
- type: Resource
|
||||
resource:
|
||||
name: cpu
|
||||
target:
|
||||
type: Utilization
|
||||
averageUtilization: {{ .Values.autoscaling.hpa.targetCPU }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,48 @@
|
||||
{{- /*
|
||||
Copyright Broadcom, Inc. All Rights Reserved.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if .Values.ingress.enabled }}
|
||||
{{- if .Values.ingress.secrets }}
|
||||
{{- range .Values.ingress.secrets }}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ .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 }}
|
||||
type: kubernetes.io/tls
|
||||
data:
|
||||
tls.crt: {{ .certificate | b64enc }}
|
||||
tls.key: {{ .key | b64enc }}
|
||||
---
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if and .Values.ingress.tls .Values.ingress.selfSigned }}
|
||||
{{- $secretName := printf "%s-tls" .Values.ingress.hostname }}
|
||||
{{- $ca := genCA "alloy-ca" 365 }}
|
||||
{{- $cert := genSignedCert .Values.ingress.hostname nil (list .Values.ingress.hostname) 365 $ca }}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ $secretName }}
|
||||
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 }}
|
||||
type: kubernetes.io/tls
|
||||
data:
|
||||
tls.crt: {{ include "common.secrets.lookup" (dict "secret" $secretName "key" "tls.crt" "defaultValue" $cert.Cert "context" $) }}
|
||||
tls.key: {{ include "common.secrets.lookup" (dict "secret" $secretName "key" "tls.key" "defaultValue" $cert.Key "context" $) }}
|
||||
ca.crt: {{ include "common.secrets.lookup" (dict "secret" $secretName "key" "ca.crt" "defaultValue" $ca.Cert "context" $) }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,57 @@
|
||||
{{- /*
|
||||
Copyright Broadcom, Inc. All Rights Reserved.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if .Values.ingress.enabled }}
|
||||
apiVersion: {{ include "common.capabilities.ingress.apiVersion" . }}
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: {{ template "common.names.fullname" . }}
|
||||
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 or .Values.ingress.annotations .Values.commonAnnotations }}
|
||||
{{- $annotations := include "common.tplvalues.merge" (dict "values" (list .Values.ingress.annotations .Values.commonAnnotations) "context" .) }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.ingress.ingressClassName }}
|
||||
ingressClassName: {{ .Values.ingress.ingressClassName | quote }}
|
||||
{{- end }}
|
||||
rules:
|
||||
{{- if .Values.ingress.hostname }}
|
||||
- host: {{ .Values.ingress.hostname }}
|
||||
http:
|
||||
paths:
|
||||
{{- if .Values.ingress.extraPaths }}
|
||||
{{- toYaml .Values.ingress.extraPaths | nindent 10 }}
|
||||
{{- end }}
|
||||
- path: {{ .Values.ingress.path }}
|
||||
pathType: {{ .Values.ingress.pathType }}
|
||||
backend: {{- include "common.ingress.backend" (dict "serviceName" (include "common.names.fullname" .) "servicePort" "http" "context" $) | nindent 14 }}
|
||||
{{- end }}
|
||||
{{- range .Values.ingress.extraHosts }}
|
||||
- host: {{ .name | quote }}
|
||||
http:
|
||||
paths:
|
||||
- path: {{ default "/" .path }}
|
||||
pathType: {{ default "ImplementationSpecific" .pathType }}
|
||||
backend: {{- include "common.ingress.backend" (dict "serviceName" (include "common.names.fullname" $) "servicePort" "http" "context" $) | nindent 14 }}
|
||||
{{- end }}
|
||||
{{- if .Values.ingress.extraRules }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.ingress.extraRules "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if or (and .Values.ingress.tls (or (include "common.ingress.certManagerRequest" ( dict "annotations" .Values.ingress.annotations )) .Values.ingress.selfSigned)) .Values.ingress.extraTls }}
|
||||
tls:
|
||||
{{- if and .Values.ingress.tls (or (include "common.ingress.certManagerRequest" ( dict "annotations" .Values.ingress.annotations )) .Values.ingress.selfSigned) }}
|
||||
- hosts:
|
||||
- {{ .Values.ingress.hostname | quote }}
|
||||
secretName: {{ printf "%s-tls" .Values.ingress.hostname }}
|
||||
{{- end }}
|
||||
{{- if .Values.ingress.extraTls }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.ingress.extraTls "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,81 @@
|
||||
{{- /*
|
||||
Copyright Broadcom, Inc. All Rights Reserved.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if .Values.networkPolicy.enabled }}
|
||||
kind: NetworkPolicy
|
||||
apiVersion: {{ include "common.capabilities.networkPolicy.apiVersion" . }}
|
||||
metadata:
|
||||
name: {{ template "common.names.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-alloy
|
||||
app.kubernetes.io/component: alloy
|
||||
{{- 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.alloy.podLabels .Values.commonLabels ) "context" . ) }}
|
||||
podSelector:
|
||||
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
|
||||
app.kubernetes.io/part-of: grafana-alloy
|
||||
app.kubernetes.io/component: alloy
|
||||
policyTypes:
|
||||
- Ingress
|
||||
- Egress
|
||||
{{- if .Values.networkPolicy.allowExternalEgress }}
|
||||
egress:
|
||||
- {}
|
||||
{{- else }}
|
||||
egress:
|
||||
# Allow dns resolution
|
||||
- ports:
|
||||
- port: 53
|
||||
protocol: UDP
|
||||
- port: 53
|
||||
protocol: TCP
|
||||
{{- range $port := .Values.networkPolicy.kubeAPIServerPorts }}
|
||||
- port: {{ $port }}
|
||||
{{- end }}
|
||||
{{- if .Values.networkPolicy.extraEgress }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.networkPolicy.extraEgress "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
ingress:
|
||||
- ports:
|
||||
- port: {{ .Values.alloy.containerPorts.http }}
|
||||
- port: {{ .Values.configReloader.containerPorts.http }}
|
||||
{{- range .Values.alloy.extraContainerPorts }}
|
||||
- port: {{ .containerPort }}
|
||||
{{- end }}
|
||||
{{- range .Values.configReloader.extraContainerPorts }}
|
||||
- port: {{ .containerPort }}
|
||||
{{- end }}
|
||||
{{- if not .Values.networkPolicy.allowExternal }}
|
||||
from:
|
||||
- podSelector:
|
||||
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 14 }}
|
||||
app.kubernetes.io/part-of: grafana-alloy
|
||||
{{- if .Values.networkPolicy.addExternalClientAccess }}
|
||||
- podSelector:
|
||||
matchLabels:
|
||||
{{ template "common.names.fullname" . }}: "true"
|
||||
{{- end }}
|
||||
{{- if .Values.networkPolicy.ingressPodMatchLabels }}
|
||||
- podSelector:
|
||||
matchLabels: {{- include "common.tplvalues.render" (dict "value" .Values.networkPolicy.ingressPodMatchLabels "context" $ ) | nindent 14 }}
|
||||
{{- end }}
|
||||
{{- if .Values.networkPolicy.ingressNSMatchLabels }}
|
||||
- namespaceSelector:
|
||||
matchLabels: {{- include "common.tplvalues.render" (dict "value" .Values.networkPolicy.ingressNSMatchLabels "context" $ ) | nindent 14 }}
|
||||
{{- if .Values.networkPolicy.ingressNSPodMatchLabels }}
|
||||
podSelector:
|
||||
matchLabels: {{- include "common.tplvalues.render" (dict "value" .Values.networkPolicy.ingressNSPodMatchLabels "context" $ ) | nindent 14 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.networkPolicy.extraIngress }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.networkPolicy.extraIngress "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,31 @@
|
||||
{{- /*
|
||||
Copyright Broadcom, Inc. All Rights Reserved.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- $resourceType := lower .Values.resourceType -}}
|
||||
{{- if and .Values.pdb.create (not (eq $resourceType "daemonset")) }}
|
||||
apiVersion: {{ include "common.capabilities.policy.apiVersion" . }}
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
name: {{ include "common.names.fullname" . }}
|
||||
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 }}
|
||||
spec:
|
||||
{{- if .Values.pdb.minAvailable }}
|
||||
minAvailable: {{ .Values.pdb.minAvailable }}
|
||||
{{- end }}
|
||||
{{- if or .Values.pdb.maxUnavailable ( not .Values.pdb.minAvailable ) }}
|
||||
maxUnavailable: {{ .Values.pdb.maxUnavailable | default 1 }}
|
||||
{{- end }}
|
||||
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.podLabels .Values.commonLabels ) "context" . ) }}
|
||||
selector:
|
||||
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
|
||||
app.kubernetes.io/component: alloy
|
||||
app.kubernetes.io/part-of: grafana-alloy
|
||||
{{- end }}
|
||||
@@ -0,0 +1,125 @@
|
||||
{{- /*
|
||||
Copyright Broadcom, Inc. All Rights Reserved.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if .Values.rbac.create }}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: {{ include "common.names.fullname.namespace" . }}
|
||||
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 }}
|
||||
rules:
|
||||
# Rules which allow discovery.kubernetes to function.
|
||||
- apiGroups:
|
||||
- ""
|
||||
- "discovery.k8s.io"
|
||||
- "networking.k8s.io"
|
||||
resources:
|
||||
- endpoints
|
||||
- endpointslices
|
||||
- ingresses
|
||||
- nodes
|
||||
- nodes/proxy
|
||||
- nodes/metrics
|
||||
- pods
|
||||
- services
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
# Rules which allow loki.source.kubernetes and loki.source.podlogs to work.
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- pods
|
||||
- pods/log
|
||||
- namespaces
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- "monitoring.grafana.com"
|
||||
resources:
|
||||
- podlogs
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
# Rules which allow mimir.rules.kubernetes to work.
|
||||
- apiGroups: ["monitoring.coreos.com"]
|
||||
resources:
|
||||
- prometheusrules
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- nonResourceURLs:
|
||||
- /metrics
|
||||
verbs:
|
||||
- get
|
||||
# Rules for prometheus.kubernetes.*
|
||||
- apiGroups: ["monitoring.coreos.com"]
|
||||
resources:
|
||||
- podmonitors
|
||||
- servicemonitors
|
||||
- probes
|
||||
- scrapeconfigs
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
# Rules which allow eventhandler to work.
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- events
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
# needed for remote.kubernetes.*
|
||||
- apiGroups: [""]
|
||||
resources:
|
||||
- "configmaps"
|
||||
- "secrets"
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
# needed for otelcol.processor.k8sattributes
|
||||
- apiGroups: ["apps"]
|
||||
resources: ["replicasets"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
- apiGroups: ["extensions"]
|
||||
resources: ["replicasets"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
{{- if .Values.rbac.rules }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.rbac.rules "context" $ ) | nindent 2 }}
|
||||
{{- end }}
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: {{ include "common.names.fullname.namespace" . }}
|
||||
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 }}
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ include "grafana-alloy.serviceAccountName" . }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
roleRef:
|
||||
kind: ClusterRole
|
||||
name: {{ include "common.names.fullname.namespace" . }}
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
{{- end }}
|
||||
@@ -0,0 +1,20 @@
|
||||
{{- /*
|
||||
Copyright Broadcom, Inc. All Rights Reserved.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if .Values.serviceAccount.create }}
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ include "grafana-alloy.serviceAccountName" . }}
|
||||
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 or .Values.serviceAccount.annotations .Values.commonAnnotations }}
|
||||
{{- $annotations := include "common.tplvalues.merge" (dict "values" (list .Values.serviceAccount.annotations .Values.commonAnnotations) "context" .) }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,58 @@
|
||||
{{- /*
|
||||
Copyright Broadcom, Inc. All Rights Reserved.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ template "common.names.fullname" . }}
|
||||
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 or .Values.service.annotations .Values.commonAnnotations .Values.metrics.enabled .Values.metrics.annotations }}
|
||||
{{- $annotations := include "common.tplvalues.merge" (dict "values" (list .Values.service.annotations .Values.commonAnnotations .Values.metrics.annotations) "context" .) }}
|
||||
{{- if .Values.metrics.enabled }}
|
||||
{{- $defaultMetricsAnnotations := dict "prometheus.io/scrape" "true" "prometheus.io/port" .Values.service.ports.http "prometheus.io/path" "/metrics" }}
|
||||
{{- $annotations = include "common.tplvalues.merge" (dict "values" (list $annotations $defaultMetricsAnnotations) "context" .) }}
|
||||
{{- end }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
type: {{ .Values.service.type }}
|
||||
{{- if and .Values.service.clusterIP (eq .Values.service.type "ClusterIP") }}
|
||||
clusterIP: {{ .Values.service.clusterIP }}
|
||||
{{- end }}
|
||||
{{- if .Values.service.sessionAffinity }}
|
||||
sessionAffinity: {{ .Values.service.sessionAffinity }}
|
||||
{{- end }}
|
||||
{{- if .Values.service.sessionAffinityConfig }}
|
||||
sessionAffinityConfig: {{- include "common.tplvalues.render" (dict "value" .Values.service.sessionAffinityConfig "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if or (eq .Values.service.type "LoadBalancer") (eq .Values.service.type "NodePort") }}
|
||||
externalTrafficPolicy: {{ .Values.service.externalTrafficPolicy | quote }}
|
||||
{{- end }}
|
||||
{{- if and (eq .Values.service.type "LoadBalancer") (not (empty .Values.service.loadBalancerSourceRanges)) }}
|
||||
loadBalancerSourceRanges: {{ .Values.service.loadBalancerSourceRanges }}
|
||||
{{- end }}
|
||||
{{- if and (eq .Values.service.type "LoadBalancer") (not (empty .Values.service.loadBalancerIP)) }}
|
||||
loadBalancerIP: {{ .Values.service.loadBalancerIP }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: http
|
||||
port: {{ .Values.service.ports.http }}
|
||||
targetPort: http
|
||||
protocol: TCP
|
||||
{{- if and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) (not (empty .Values.service.nodePorts.http)) }}
|
||||
nodePort: {{ .Values.service.nodePorts.http }}
|
||||
{{- else if eq .Values.service.type "ClusterIP" }}
|
||||
nodePort: null
|
||||
{{- end }}
|
||||
{{- if .Values.service.extraPorts }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.service.extraPorts "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- $podLabels := include "common.tplvalues.merge" (dict "values" (list .Values.podLabels .Values.commonLabels) "context" .) | fromYaml }}
|
||||
selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/component: alloy
|
||||
app.kubernetes.io/part-of: grafana-alloy
|
||||
@@ -0,0 +1,51 @@
|
||||
{{- /*
|
||||
Copyright Broadcom, Inc. All Rights Reserved.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if and .Values.metrics.enabled .Values.metrics.serviceMonitor.enabled }}
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: ServiceMonitor
|
||||
metadata:
|
||||
name: {{ include "common.names.fullname" . }}
|
||||
namespace: {{ default (include "common.names.namespace" .) .Values.metrics.serviceMonitor.namespace | quote }}
|
||||
{{- $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/component: metrics
|
||||
app.kubernetes.io/part-of: grafana-alloy
|
||||
{{- if or .Values.metrics.serviceMonitor.annotations .Values.commonAnnotations }}
|
||||
{{- $annotations := include "common.tplvalues.merge" (dict "values" (list .Values.metrics.serviceMonitor.annotations .Values.commonAnnotations) "context" .) }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
jobLabel: {{ .Values.metrics.serviceMonitor.jobLabel | quote }}
|
||||
selector:
|
||||
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 6 }}
|
||||
app.kubernetes.io/component: alloy
|
||||
app.kubernetes.io/part-of: grafana-alloy
|
||||
prometheus.io/scrape: "true"
|
||||
{{- if .Values.metrics.serviceMonitor.selector }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.metrics.serviceMonitor.selector "context" $) | nindent 6 }}
|
||||
{{- end }}
|
||||
endpoints:
|
||||
- port: http
|
||||
path: "/metrics"
|
||||
{{- 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: {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.serviceMonitor.metricRelabelings "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.metrics.serviceMonitor.relabelings }}
|
||||
relabelings: {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.serviceMonitor.relabelings "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
namespaceSelector:
|
||||
matchNames:
|
||||
- {{ include "common.names.namespace" . | quote }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,54 @@
|
||||
{{- /*
|
||||
Copyright Broadcom, Inc. All Rights Reserved.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if and (include "common.capabilities.apiVersions.has" ( dict "version" "autoscaling.k8s.io/v1/VerticalPodAutoscaler" "context" . )) .Values.autoscaling.vpa.enabled }}
|
||||
apiVersion: autoscaling.k8s.io/v1
|
||||
kind: VerticalPodAutoscaler
|
||||
metadata:
|
||||
name: {{ include "common.names.fullname" . }}
|
||||
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 or .Values.autoscaling.vpa.annotations .Values.commonAnnotations }}
|
||||
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.autoscaling.vpa.annotations .Values.commonAnnotations ) "context" . ) }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
resourcePolicy:
|
||||
containerPolicies:
|
||||
- containerName: grafana-alloy
|
||||
{{- with .Values.autoscaling.vpa.controlledResources }}
|
||||
controlledResources:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.autoscaling.vpa.maxAllowed }}
|
||||
maxAllowed:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.autoscaling.vpa.minAllowed }}
|
||||
minAllowed:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
targetRef:
|
||||
{{- $resourceType := lower .Values.resourceType -}}
|
||||
{{- if eq $resourceType "deployment" }}
|
||||
apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }}
|
||||
kind: Deployment
|
||||
{{- else if eq $resourceType "statefulset" }}
|
||||
apiVersion: {{ include "common.capabilities.statefulset.apiVersion" . }}
|
||||
kind: StatefulSet
|
||||
{{- else }}
|
||||
apiVersion: {{ include "common.capabilities.daemonset.apiVersion" . }}
|
||||
kind: DaemonSet
|
||||
{{- end }}
|
||||
name: {{ include "common.names.fullname" . }}
|
||||
{{- if .Values.autoscaling.vpa.updatePolicy }}
|
||||
updatePolicy:
|
||||
{{- with .Values.autoscaling.vpa.updatePolicy.updateMode }}
|
||||
updateMode: {{ . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,948 @@
|
||||
# Copyright Broadcom, Inc. All Rights Reserved.
|
||||
# SPDX-License-Identifier: APACHE-2.0
|
||||
|
||||
## @section Global parameters
|
||||
## Global Docker image parameters
|
||||
## Please, note that this will override the image parameters, including dependencies, configured to use the global value
|
||||
## Current available global Docker image parameters: imageRegistry, imagePullSecrets and storageClass
|
||||
##
|
||||
|
||||
## @param global.imageRegistry Global Docker image registry
|
||||
## @param global.imagePullSecrets Global Docker registry secret names as an array
|
||||
## @param global.defaultStorageClass Global default StorageClass for Persistent Volume(s)
|
||||
##
|
||||
global:
|
||||
imageRegistry: ""
|
||||
## e.g:
|
||||
## imagePullSecrets:
|
||||
## - myRegistryKeySecretName
|
||||
##
|
||||
imagePullSecrets: []
|
||||
defaultStorageClass: ""
|
||||
## Security parameters
|
||||
##
|
||||
security:
|
||||
## @param global.security.allowInsecureImages Allows skipping image verification
|
||||
allowInsecureImages: false
|
||||
## Compatibility adaptations for Kubernetes platforms
|
||||
##
|
||||
compatibility:
|
||||
## Compatibility adaptations for Openshift
|
||||
##
|
||||
openshift:
|
||||
## @param global.compatibility.openshift.adaptSecurityContext Adapt the securityContext sections of the deployment to make them compatible with Openshift restricted-v2 SCC: remove runAsUser, runAsGroup and fsGroup and let the platform use their allowed default IDs. Possible values: auto (apply if the detected running cluster is Openshift), force (perform the adaptation always), disabled (do not perform adaptation)
|
||||
##
|
||||
adaptSecurityContext: auto
|
||||
## @param global.compatibility.omitEmptySeLinuxOptions If set to true, removes the seLinuxOptions from the securityContexts when it is set to an empty object
|
||||
##
|
||||
omitEmptySeLinuxOptions: false
|
||||
|
||||
## @section Common parameters
|
||||
##
|
||||
## @param resourceType Type of controller to use for deploying Grafana Alloy in the cluster.
|
||||
## Must be one of 'daemonset', 'deployment', or 'statefulset'.
|
||||
##
|
||||
resourceType: 'daemonset'
|
||||
## @param replicaCount Number of pods to deploy. Ignored when resourceType is 'daemonset'.
|
||||
##
|
||||
replicaCount: 1
|
||||
## @param kubeVersion Override Kubernetes version
|
||||
##
|
||||
kubeVersion: ""
|
||||
## @param apiVersions Override Kubernetes API versions reported by .Capabilities
|
||||
##
|
||||
apiVersions: []
|
||||
## @param nameOverride String to partially override common.names.name
|
||||
##
|
||||
nameOverride: ""
|
||||
## @param fullnameOverride String to fully override common.names.fullname
|
||||
##
|
||||
fullnameOverride: ""
|
||||
## @param namespaceOverride String to fully override common.names.namespace
|
||||
##
|
||||
namespaceOverride: ""
|
||||
## @param commonLabels Labels to add to all deployed objects
|
||||
##
|
||||
commonLabels: {}
|
||||
## @param commonAnnotations Annotations to add to all deployed objects
|
||||
##
|
||||
commonAnnotations: {}
|
||||
## @param clusterDomain Kubernetes cluster domain name
|
||||
##
|
||||
clusterDomain: cluster.local
|
||||
## @param extraDeploy Array of extra objects to deploy with the release
|
||||
##
|
||||
extraDeploy: []
|
||||
## Diagnostic mode
|
||||
## @param diagnosticMode.enabled Enable diagnostic mode (all probes will be disabled and the command will be overridden)
|
||||
## @param diagnosticMode.command Command to override all containers in the chart release
|
||||
## @param diagnosticMode.args Args to override all containers in the chart release
|
||||
##
|
||||
diagnosticMode:
|
||||
enabled: false
|
||||
command:
|
||||
- sleep
|
||||
args:
|
||||
- infinity
|
||||
|
||||
## Configure Pods Security Context
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod
|
||||
## @param podSecurityContext.enabled Enable Grafana Alloy pods' Security Context
|
||||
## @param podSecurityContext.fsGroupChangePolicy Set filesystem group change policy for Grafana Alloy pods
|
||||
## @param podSecurityContext.sysctls Set kernel settings using the sysctl interface for Grafana Alloy pods
|
||||
## @param podSecurityContext.supplementalGroups Set filesystem extra groups for Grafana Alloy pods
|
||||
## @param podSecurityContext.fsGroup Set fsGroup in Grafana Alloy pods' Security Context
|
||||
##
|
||||
podSecurityContext:
|
||||
enabled: true
|
||||
fsGroupChangePolicy: Always
|
||||
sysctls: []
|
||||
supplementalGroups: []
|
||||
fsGroup: 1001
|
||||
## @param hostAliases Grafana Alloy pods host aliases
|
||||
## https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/
|
||||
##
|
||||
hostAliases: []
|
||||
## @param controllerAnnotations Annotations for Grafana Alloy controller
|
||||
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
|
||||
##
|
||||
controllerAnnotations: {}
|
||||
## @param podLabels Extra labels for Grafana Alloy pods
|
||||
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
|
||||
##
|
||||
podLabels: {}
|
||||
## @param podAnnotations Annotations for Grafana Alloy pods
|
||||
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
|
||||
##
|
||||
podAnnotations: {}
|
||||
## @param podAffinityPreset Pod affinity preset. Ignored if `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 podAntiAffinityPreset Pod anti-affinity preset. Ignored if `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 affinity preset
|
||||
## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity
|
||||
##
|
||||
nodeAffinityPreset:
|
||||
## @param nodeAffinityPreset.type Node affinity preset type. Ignored if `affinity` is set. Allowed values: `soft` or `hard`
|
||||
##
|
||||
type: ""
|
||||
## @param nodeAffinityPreset.key Node label key to match. Ignored if `affinity` is set
|
||||
##
|
||||
key: ""
|
||||
## @param nodeAffinityPreset.values Node label values to match. Ignored if `affinity` is set
|
||||
## E.g.
|
||||
## values:
|
||||
## - e2e-az1
|
||||
## - e2e-az2
|
||||
##
|
||||
values: []
|
||||
## @param affinity Affinity for Grafana Alloy pods assignment
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
|
||||
## NOTE: `podAffinityPreset`, `podAntiAffinityPreset`, and `nodeAffinityPreset` will be ignored when it's set
|
||||
##
|
||||
affinity: {}
|
||||
## @param nodeSelector Node labels for Grafana Alloy pods assignment
|
||||
## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/
|
||||
##
|
||||
nodeSelector: {}
|
||||
## @param tolerations Tolerations for Grafana Alloy pods assignment
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
|
||||
##
|
||||
tolerations: []
|
||||
## ONLY FOR DAEMONSETS:
|
||||
## @param updateStrategy.type Grafana Alloy daemonset strategy type
|
||||
## ref: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/#updating-a-daemonset
|
||||
## ONLY FOR DEPLOYMENTS:
|
||||
## @param updateStrategy.type Grafana Alloy deployment strategy type
|
||||
## ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy
|
||||
## ONLY FOR STATEFULSETS:
|
||||
## @param updateStrategy.type Grafana Alloy statefulset strategy type
|
||||
## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies
|
||||
##
|
||||
updateStrategy:
|
||||
## ONLY FOR DAEMONSETS:
|
||||
## Can be set to RollingUpdate or OnDelete
|
||||
## ONLY FOR DEPLOYMENTS:
|
||||
## Can be set to RollingUpdate or Recreate
|
||||
## ONLY FOR STATEFULSETS:
|
||||
## Can be set to RollingUpdate or OnDelete
|
||||
##
|
||||
type: RollingUpdate
|
||||
## ONLY FOR STATEFULSETS:
|
||||
## @param podManagementPolicy Pod management policy for Grafana Alloy statefulset
|
||||
## Ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#pod-management-policies
|
||||
##
|
||||
podManagementPolicy: OrderedReady
|
||||
## @param priorityClassName Grafana Alloy pods' priorityClassName
|
||||
##
|
||||
priorityClassName: ""
|
||||
## @param topologySpreadConstraints Topology Spread Constraints for Grafana Alloy 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 schedulerName Name of the k8s scheduler (other than default) for Grafana Alloy pods
|
||||
## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/
|
||||
##
|
||||
schedulerName: ""
|
||||
## @param terminationGracePeriodSeconds Seconds Grafana Alloy pods need to terminate gracefully
|
||||
## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod/#termination-of-pods
|
||||
##
|
||||
terminationGracePeriodSeconds: ""
|
||||
## @param sidecars Add additional sidecar containers to the Grafana Alloy pods
|
||||
## e.g:
|
||||
## sidecars:
|
||||
## - name: your-image-name
|
||||
## image: your-image
|
||||
## imagePullPolicy: Always
|
||||
## ports:
|
||||
## - name: portname
|
||||
## containerPort: 1234
|
||||
##
|
||||
sidecars: []
|
||||
## @param initContainers Add additional init containers to the Grafana Alloy pods
|
||||
## 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 extraVolumes Optionally specify extra list of additional volumes for the Grafana Alloy pods
|
||||
##
|
||||
extraVolumes: []
|
||||
## Pod Disruption Budget configuration
|
||||
## ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb
|
||||
## @param pdb.create Enable/disable a Pod Disruption Budget creation
|
||||
## @param pdb.minAvailable Minimum number/percentage of pods that should remain scheduled
|
||||
## @param pdb.maxUnavailable Maximum number/percentage of pods that may be made unavailable. Defaults to `1` if both `pdb.minAvailable` and `pdb.maxUnavailable` are empty.
|
||||
##
|
||||
pdb:
|
||||
create: true
|
||||
minAvailable: ""
|
||||
maxUnavailable: ""
|
||||
## Autoscaling configuration
|
||||
## ref: https://kubernetes.io/docs/concepts/workloads/autoscaling/
|
||||
##
|
||||
autoscaling:
|
||||
## @param autoscaling.vpa.enabled Enable VPA for Grafana Alloy pods
|
||||
## @param autoscaling.vpa.annotations Annotations for VPA resource
|
||||
## @param autoscaling.vpa.controlledResources VPA List of resources that the vertical pod autoscaler can control. Defaults to cpu and memory
|
||||
## @param autoscaling.vpa.maxAllowed VPA Max allowed resources for the pod
|
||||
## @param autoscaling.vpa.minAllowed VPA Min allowed resources for the pod
|
||||
##
|
||||
vpa:
|
||||
enabled: false
|
||||
annotations: {}
|
||||
controlledResources: []
|
||||
maxAllowed: {}
|
||||
minAllowed: {}
|
||||
## @param autoscaling.vpa.updatePolicy.updateMode Autoscaling update policy
|
||||
## Specifies whether recommended updates are applied when a Pod is started and whether recommended updates are applied during the life of a Pod
|
||||
## Possible values are "Off", "Initial", "Recreate", and "Auto".
|
||||
##
|
||||
updatePolicy:
|
||||
updateMode: Auto
|
||||
## @param autoscaling.hpa.enabled Enable HPA for Grafana Alloy pods
|
||||
## @param autoscaling.hpa.minReplicas Minimum number of replicas
|
||||
## @param autoscaling.hpa.maxReplicas Maximum number of replicas
|
||||
## @param autoscaling.hpa.targetCPU Target CPU utilization percentage
|
||||
## @param autoscaling.hpa.targetMemory Target Memory utilization percentage
|
||||
##
|
||||
hpa:
|
||||
enabled: false
|
||||
minReplicas: ""
|
||||
maxReplicas: ""
|
||||
targetCPU: ""
|
||||
targetMemory: ""
|
||||
|
||||
## @section Grafana Alloy parameters
|
||||
|
||||
alloy:
|
||||
## Bitnami Grafana Alloy image version
|
||||
## ref: https://hub.docker.com/r/bitnami/grafana-alloy/tags/
|
||||
## @param alloy.image.registry [default: REGISTRY_NAME] Grafana Alloy image registry
|
||||
## @param alloy.image.repository [default: REPOSITORY_NAME/grafana-alloy] Grafana Alloy image repository
|
||||
## @skip alloy.image.tag Grafana Alloy image tag (immutable tags are recommended)
|
||||
## @param alloy.image.pullPolicy Grafana Alloy image pull policy
|
||||
## @param alloy.image.pullSecrets Grafana Alloy image pull secrets
|
||||
##
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: bitnami/grafana-alloy
|
||||
tag: 1.9.0-debian-12-r0
|
||||
## Specify a imagePullPolicy
|
||||
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
|
||||
## 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 alloy.containerPorts.http Grafana Alloy HTTP container port
|
||||
##
|
||||
containerPorts:
|
||||
http: 8080
|
||||
## @param alloy.extraContainerPorts Optionally specify extra list of additional ports for Grafana Alloy containers
|
||||
## e.g:
|
||||
## extraContainerPorts:
|
||||
## - name: myservice
|
||||
## containerPort: 9090
|
||||
##
|
||||
extraContainerPorts: []
|
||||
## @param alloy.existingConfigmap The name of an existing ConfigMap with your custom configuration for Grafana Alloy
|
||||
##
|
||||
existingConfigmap: ""
|
||||
## @param alloy.configuration Specify content for Grafan Alloy config file. Omitted if alloy.existingConfigmap is provided.
|
||||
## e.g:
|
||||
## configuration: |-
|
||||
## ...
|
||||
##
|
||||
configuration: ""
|
||||
## @param alloy.extraConfig Append extra configuration to the default config file
|
||||
##
|
||||
extraConfig: ""
|
||||
## @param alloy.clustering.enabled Deploy Grafana Alloy in a cluster to allow for load distribution.
|
||||
## @param alloy.clustering.name Name for the Grafana Alloy cluster. Used for differentiating between clusters.
|
||||
## @param alloy.clustering.portName Name for the port used for clustering, useful if running inside an Istio Mesh
|
||||
##
|
||||
clustering:
|
||||
enabled: false
|
||||
name: ""
|
||||
portName: http
|
||||
|
||||
## @param 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 alloy.listenAddr Address to listen for traffic on. 0.0.0.0 exposes the UI to other containers.
|
||||
listenAddr: 0.0.0.0
|
||||
|
||||
## @param alloy.uiPathPrefix Base path where the UI is exposed.
|
||||
uiPathPrefix: /
|
||||
|
||||
## @param alloy.storagePath Path to where Grafana Alloy stores data (for example, the Write-Ahead Log).
|
||||
storagePath: /tmp/alloy
|
||||
|
||||
## @param alloy.enableReporting Enables sending Grafana Labs anonymous usage stats to help improve Grafana Alloy.
|
||||
enableReporting: true
|
||||
|
||||
## @param alloy.command Override default Grafana Alloy container command (useful when using custom images)
|
||||
##
|
||||
command: []
|
||||
## @param alloy.args Override default Grafana Alloy container args (useful when using custom images)
|
||||
##
|
||||
args: []
|
||||
## @param alloy.mounts.varlog Mount /var/log from the host into the container for log collection.
|
||||
## @param alloy.mounts.dockercontainers Mount /var/lib/docker/containers from the host into the container for log
|
||||
##
|
||||
mounts:
|
||||
varlog: true
|
||||
dockercontainers: true
|
||||
## Configure extra options for Grafana Alloy containers' startup, liveness and readiness probes
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes
|
||||
## @param alloy.startupProbe.enabled Enable startupProbe on Grafana Alloy containers
|
||||
## @param alloy.startupProbe.initialDelaySeconds Initial delay seconds for startupProbe
|
||||
## @param alloy.startupProbe.periodSeconds Period seconds for startupProbe
|
||||
## @param alloy.startupProbe.timeoutSeconds Timeout seconds for startupProbe
|
||||
## @param alloy.startupProbe.failureThreshold Failure threshold for startupProbe
|
||||
## @param alloy.startupProbe.successThreshold Success threshold for startupProbe
|
||||
##
|
||||
startupProbe:
|
||||
enabled: false
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 30
|
||||
timeoutSeconds: 2
|
||||
failureThreshold: 3
|
||||
successThreshold: 1
|
||||
## @param alloy.livenessProbe.enabled Enable livenessProbe on Grafana Alloy containers
|
||||
## @param alloy.livenessProbe.initialDelaySeconds Initial delay seconds for livenessProbe
|
||||
## @param alloy.livenessProbe.periodSeconds Period seconds for livenessProbe
|
||||
## @param alloy.livenessProbe.timeoutSeconds Timeout seconds for livenessProbe
|
||||
## @param alloy.livenessProbe.failureThreshold Failure threshold for livenessProbe
|
||||
## @param alloy.livenessProbe.successThreshold Success threshold for livenessProbe
|
||||
##
|
||||
livenessProbe:
|
||||
enabled: true
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 30
|
||||
timeoutSeconds: 2
|
||||
failureThreshold: 3
|
||||
successThreshold: 1
|
||||
## @param alloy.readinessProbe.enabled Enable readinessProbe on Grafana Alloy containers
|
||||
## @param alloy.readinessProbe.initialDelaySeconds Initial delay seconds for readinessProbe
|
||||
## @param alloy.readinessProbe.periodSeconds Period seconds for readinessProbe
|
||||
## @param alloy.readinessProbe.timeoutSeconds Timeout seconds for readinessProbe
|
||||
## @param alloy.readinessProbe.failureThreshold Failure threshold for readinessProbe
|
||||
## @param alloy.readinessProbe.successThreshold Success threshold for readinessProbe
|
||||
##
|
||||
readinessProbe:
|
||||
enabled: true
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 30
|
||||
timeoutSeconds: 2
|
||||
failureThreshold: 3
|
||||
successThreshold: 1
|
||||
## @param alloy.customLivenessProbe Custom livenessProbe that overrides the default one
|
||||
##
|
||||
customLivenessProbe: {}
|
||||
## @param alloy.customReadinessProbe Custom readinessProbe that overrides the default one
|
||||
##
|
||||
customReadinessProbe: {}
|
||||
## @param alloy.customStartupProbe Custom startupProbe that overrides the default one
|
||||
##
|
||||
customStartupProbe: {}
|
||||
## Grafana Alloy resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
|
||||
## @param alloy.resourcesPreset Set Grafana Alloy container resources according to one common preset (allowed values: none, nano, small, medium, large, xlarge, 2xlarge). This is ignored if alloy.resources is set (alloy.resources is recommended for production).
|
||||
## More information: https://github.com/bitnami/charts/blob/main/bitnami/common/templates/_resources.tpl#L15
|
||||
##
|
||||
resourcesPreset: "nano"
|
||||
## @param alloy.resources Set Grafana Alloy 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 Container Security Context
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container
|
||||
## @param alloy.containerSecurityContext.enabled Enabled Grafana Alloy container's Security Context
|
||||
## @param alloy.containerSecurityContext.seLinuxOptions [object,nullable] Set SELinux options in Grafana Alloy container
|
||||
## @param alloy.containerSecurityContext.runAsUser Set runAsUser in Grafana Alloy container's Security Context
|
||||
## @param alloy.containerSecurityContext.runAsGroup Group ID for Grafana Alloy's containers
|
||||
## @param alloy.containerSecurityContext.runAsNonRoot Set runAsNonRoot in Grafana Alloy container's Security Context
|
||||
## @param alloy.containerSecurityContext.readOnlyRootFilesystem Set readOnlyRootFilesystem in Grafana Alloy container's Security Context
|
||||
## @param alloy.containerSecurityContext.privileged Set privileged in Grafana Alloy container's Security Context
|
||||
## @param alloy.containerSecurityContext.allowPrivilegeEscalation Set allowPrivilegeEscalation in Grafana Alloy container's Security Context
|
||||
## @param alloy.containerSecurityContext.capabilities.drop List of capabilities to be dropped in Grafana Alloy container
|
||||
## @param alloy.containerSecurityContext.seccompProfile.type Set seccomp profile in Grafana Alloy container
|
||||
##
|
||||
containerSecurityContext:
|
||||
enabled: true
|
||||
seLinuxOptions: {}
|
||||
runAsUser: 1001
|
||||
runAsGroup: 1001
|
||||
runAsNonRoot: true
|
||||
readOnlyRootFilesystem: true
|
||||
privileged: false
|
||||
allowPrivilegeEscalation: false
|
||||
capabilities:
|
||||
drop: ["ALL"]
|
||||
seccompProfile:
|
||||
type: "RuntimeDefault"
|
||||
## @param alloy.lifecycleHooks for Grafana Alloy containers to automate configuration before or after startup
|
||||
##
|
||||
lifecycleHooks: {}
|
||||
## @param alloy.extraEnvVars Array with extra environment variables to add to Grafana Alloy containers
|
||||
## e.g:
|
||||
## extraEnvVars:
|
||||
## - name: FOO
|
||||
## value: "bar"
|
||||
##
|
||||
extraEnvVars: []
|
||||
## @param alloy.extraEnvVarsCM Name of existing ConfigMap containing extra env vars for Grafana Alloy containers
|
||||
##
|
||||
extraEnvVarsCM: ""
|
||||
## @param alloy.extraEnvVarsSecret Name of existing Secret containing extra env vars for Grafana Alloy containers
|
||||
##
|
||||
extraEnvVarsSecret: ""
|
||||
## @param alloy.extraVolumeMounts Optionally specify extra list of additional volumeMounts for the Grafana Alloy containers
|
||||
##
|
||||
extraVolumeMounts: []
|
||||
|
||||
## @section ConfigMap Reload parameters
|
||||
|
||||
configReloader:
|
||||
## @param configReloader.enabled Enables automatically reloading when the Grafana Alloy config changes.
|
||||
enabled: true
|
||||
## Bitnami ConfigMap Reload image version
|
||||
## ref: https://hub.docker.com/r/bitnami/configmap-reload/tags/
|
||||
## @param configReloader.image.registry [default: REGISTRY_NAME] ConfigMap Reload image registry
|
||||
## @param configReloader.image.repository [default: REPOSITORY_NAME/grafana-configmap-reload] ConfigMap Reload image repository
|
||||
## @skip configReloader.image.tag ConfigMap Reload image tag (immutable tags are recommended)
|
||||
## @param configReloader.image.pullPolicy ConfigMap Reload image pull policy
|
||||
## @param configReloader.image.pullSecrets ConfigMap Reload image pull secrets
|
||||
##
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: bitnami/configmap-reload
|
||||
tag: 0.15.0-debian-12-r4
|
||||
## Specify a imagePullPolicy
|
||||
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
|
||||
## 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 configReloader.containerPorts.http ConfigMap Reload HTTP container port
|
||||
##
|
||||
containerPorts:
|
||||
http: 9533
|
||||
## @param configReloader.extraContainerPorts Optionally specify extra list of additional ports for ConfigMap Reload containers
|
||||
## e.g:
|
||||
## extraContainerPorts:
|
||||
## - name: myservice
|
||||
## containerPort: 9090
|
||||
##
|
||||
extraContainerPorts: []
|
||||
|
||||
## Configure extra options for ConfigMap Reload containers' startup, liveness and readiness probes
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes
|
||||
## @param configReloader.startupProbe.enabled Enable startupProbe on ConfigMap Reload containers
|
||||
## @param configReloader.startupProbe.initialDelaySeconds Initial delay seconds for startupProbe
|
||||
## @param configReloader.startupProbe.periodSeconds Period seconds for startupProbe
|
||||
## @param configReloader.startupProbe.timeoutSeconds Timeout seconds for startupProbe
|
||||
## @param configReloader.startupProbe.failureThreshold Failure threshold for startupProbe
|
||||
## @param configReloader.startupProbe.successThreshold Success threshold for startupProbe
|
||||
##
|
||||
startupProbe:
|
||||
enabled: false
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 30
|
||||
timeoutSeconds: 2
|
||||
failureThreshold: 3
|
||||
successThreshold: 1
|
||||
## @param configReloader.livenessProbe.enabled Enable livenessProbe on ConfigMap Reload containers
|
||||
## @param configReloader.livenessProbe.initialDelaySeconds Initial delay seconds for livenessProbe
|
||||
## @param configReloader.livenessProbe.periodSeconds Period seconds for livenessProbe
|
||||
## @param configReloader.livenessProbe.timeoutSeconds Timeout seconds for livenessProbe
|
||||
## @param configReloader.livenessProbe.failureThreshold Failure threshold for livenessProbe
|
||||
## @param configReloader.livenessProbe.successThreshold Success threshold for livenessProbe
|
||||
##
|
||||
livenessProbe:
|
||||
enabled: true
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 30
|
||||
timeoutSeconds: 2
|
||||
failureThreshold: 3
|
||||
successThreshold: 1
|
||||
## @param configReloader.readinessProbe.enabled Enable readinessProbe on ConfigMap Reload containers
|
||||
## @param configReloader.readinessProbe.initialDelaySeconds Initial delay seconds for readinessProbe
|
||||
## @param configReloader.readinessProbe.periodSeconds Period seconds for readinessProbe
|
||||
## @param configReloader.readinessProbe.timeoutSeconds Timeout seconds for readinessProbe
|
||||
## @param configReloader.readinessProbe.failureThreshold Failure threshold for readinessProbe
|
||||
## @param configReloader.readinessProbe.successThreshold Success threshold for readinessProbe
|
||||
##
|
||||
readinessProbe:
|
||||
enabled: true
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 30
|
||||
timeoutSeconds: 2
|
||||
failureThreshold: 3
|
||||
successThreshold: 1
|
||||
## @param configReloader.customLivenessProbe Custom livenessProbe that overrides the default one
|
||||
##
|
||||
customLivenessProbe: {}
|
||||
## @param configReloader.customReadinessProbe Custom readinessProbe that overrides the default one
|
||||
##
|
||||
customReadinessProbe: {}
|
||||
## @param configReloader.customStartupProbe Custom startupProbe that overrides the default one
|
||||
##
|
||||
customStartupProbe: {}
|
||||
## Grafana ConfigMap Reload resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
|
||||
## @param configReloader.resourcesPreset Set ConfigMap Reload container resources according to one common preset (allowed values: none, nano, small, medium, large, xlarge, 2xlarge). This is ignored if configReloader.resources is set (configReloader.resources is recommended for production).
|
||||
## More information: https://github.com/bitnami/charts/blob/main/bitnami/common/templates/_resources.tpl#L15
|
||||
##
|
||||
resourcesPreset: "nano"
|
||||
## @param configReloader.resources Set ConfigMap Reload 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 Container Security Context
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container
|
||||
## @param configReloader.containerSecurityContext.enabled Enabled ConfigMap Reload container's Security Context
|
||||
## @param configReloader.containerSecurityContext.seLinuxOptions [object,nullable] Set SELinux options in ConfigMap Reload container
|
||||
## @param configReloader.containerSecurityContext.runAsUser Set runAsUser in ConfigMap Reload container's Security Context
|
||||
## @param configReloader.containerSecurityContext.runAsGroup Group ID for ConfigMap Reload's containers
|
||||
## @param configReloader.containerSecurityContext.runAsNonRoot Set runAsNonRoot in ConfigMap Reload container's Security Context
|
||||
## @param configReloader.containerSecurityContext.readOnlyRootFilesystem Set readOnlyRootFilesystem in ConfigMap Reload container's Security Context
|
||||
## @param configReloader.containerSecurityContext.privileged Set privileged inConfigMap Reload container's Security Context
|
||||
## @param configReloader.containerSecurityContext.allowPrivilegeEscalation Set allowPrivilegeEscalation in ConfigMap Reload container's Security Context
|
||||
## @param configReloader.containerSecurityContext.capabilities.drop List of capabilities to be dropped in ConfigMap Reload container
|
||||
## @param configReloader.containerSecurityContext.seccompProfile.type Set seccomp profile in ConfigMap Reload container
|
||||
##
|
||||
containerSecurityContext:
|
||||
enabled: true
|
||||
seLinuxOptions: {}
|
||||
runAsUser: 1001
|
||||
runAsGroup: 1001
|
||||
runAsNonRoot: true
|
||||
readOnlyRootFilesystem: true
|
||||
privileged: false
|
||||
allowPrivilegeEscalation: false
|
||||
capabilities:
|
||||
drop: ["ALL"]
|
||||
seccompProfile:
|
||||
type: "RuntimeDefault"
|
||||
|
||||
## @param configReloader.command Override default ConfigMap Reload container command (useful when using custom images)
|
||||
##
|
||||
command: []
|
||||
## @param configReloader.args Override default ConfigMap Reload container args (useful when using custom images)
|
||||
##
|
||||
args: []
|
||||
## @param configReloader.lifecycleHooks for Grafana Alloy containers to automate configuration before or after startup
|
||||
##
|
||||
lifecycleHooks: {}
|
||||
## @param configReloader.extraEnvVars Array with extra environment variables to add to Grafana Alloy containers
|
||||
## e.g:
|
||||
## extraEnvVars:
|
||||
## - name: FOO
|
||||
## value: "bar"
|
||||
##
|
||||
extraEnvVars: []
|
||||
## @param configReloader.extraEnvVarsCM Name of existing ConfigMap containing extra env vars for ConfigMap Reload containers
|
||||
##
|
||||
extraEnvVarsCM: ""
|
||||
## @param configReloader.extraEnvVarsSecret Name of existing Secret containing extra env vars for ConfigMap Reload containers
|
||||
##
|
||||
extraEnvVarsSecret: ""
|
||||
## @param configReloader.extraVolumeMounts Optionally specify extra list of additional volumeMounts for the ConfigMap Reload containers
|
||||
##
|
||||
extraVolumeMounts: []
|
||||
|
||||
|
||||
## @section Traffic Exposure Parameters
|
||||
##
|
||||
|
||||
## Grafana Alloy service parameters
|
||||
##
|
||||
service:
|
||||
## @param service.type Grafana Alloy service type
|
||||
##
|
||||
type: LoadBalancer
|
||||
## @param service.ports.http Grafana Alloy service HTTP port
|
||||
##
|
||||
ports:
|
||||
http: 80
|
||||
## Node ports to expose
|
||||
## @param service.nodePorts.http Node port for HTTP
|
||||
## NOTE: choose port between <30000-32767>
|
||||
##
|
||||
nodePorts:
|
||||
http: ""
|
||||
## @param service.clusterIP Grafana Alloy service Cluster IP
|
||||
## e.g.:
|
||||
## clusterIP: None
|
||||
##
|
||||
clusterIP: ""
|
||||
## @param service.loadBalancerIP Grafana Alloy service Load Balancer IP
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-loadbalancer
|
||||
##
|
||||
loadBalancerIP: ""
|
||||
## @param service.loadBalancerSourceRanges Grafana Alloy 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 service.externalTrafficPolicy Grafana Alloy service external traffic policy
|
||||
## ref http://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip
|
||||
##
|
||||
externalTrafficPolicy: Cluster
|
||||
## @param service.annotations Additional custom annotations for Grafana Alloy service
|
||||
##
|
||||
annotations: {}
|
||||
## @param service.extraPorts Extra ports to expose in Grafana Alloy service (normally used with the `sidecars` value)
|
||||
##
|
||||
extraPorts: []
|
||||
## @param 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 service.sessionAffinityConfig Additional settings for the sessionAffinity
|
||||
## sessionAffinityConfig:
|
||||
## clientIP:
|
||||
## timeoutSeconds: 300
|
||||
##
|
||||
sessionAffinityConfig: {}
|
||||
## Network Policies
|
||||
## Ref: https://kubernetes.io/docs/concepts/services-networking/network-policies/
|
||||
##
|
||||
networkPolicy:
|
||||
## @param networkPolicy.enabled Specifies whether a NetworkPolicy should be created
|
||||
##
|
||||
enabled: true
|
||||
## @param 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 networkPolicy.allowExternalEgress Allow the pod to access any range of port and all destinations.
|
||||
##
|
||||
allowExternalEgress: true
|
||||
## @param networkPolicy.addExternalClientAccess Allow access from pods with client label set to "true". Ignored if `networkPolicy.allowExternal` is true.
|
||||
##
|
||||
addExternalClientAccess: true
|
||||
## @param 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 networkPolicy.extraEgress [array] Add extra ingress rules to the NetworkPolicy (ignored if allowExternalEgress=true)
|
||||
## e.g:
|
||||
## extraEgress:
|
||||
## - ports:
|
||||
## - port: 1234
|
||||
## to:
|
||||
## - podSelector:
|
||||
## - matchLabels:
|
||||
## - role: frontend
|
||||
## - podSelector:
|
||||
## - matchExpressions:
|
||||
## - key: role
|
||||
## operator: In
|
||||
## values:
|
||||
## - frontend
|
||||
##
|
||||
extraEgress: []
|
||||
## @param networkPolicy.ingressPodMatchLabels [object] Labels to match to allow traffic from other pods. Ignored if `networkPolicy.allowExternal` is true.
|
||||
## e.g:
|
||||
## ingressPodMatchLabels:
|
||||
## my-client: "true"
|
||||
#
|
||||
ingressPodMatchLabels: {}
|
||||
## @param networkPolicy.ingressNSMatchLabels [object] Labels to match to allow traffic from other namespaces. Ignored if `networkPolicy.allowExternal` is true.
|
||||
## @param networkPolicy.ingressNSPodMatchLabels [object] Pod labels to match to allow traffic from other namespaces. Ignored if `networkPolicy.allowExternal` is true.
|
||||
##
|
||||
ingressNSMatchLabels: {}
|
||||
ingressNSPodMatchLabels: {}
|
||||
## Grafana Alloy ingress parameters
|
||||
## ref: http://kubernetes.io/docs/concepts/services-networking/ingress/
|
||||
##
|
||||
ingress:
|
||||
## @param ingress.enabled Enable ingress record generation for Grafana Alloy
|
||||
##
|
||||
enabled: false
|
||||
## @param ingress.pathType Ingress path type
|
||||
##
|
||||
pathType: Prefix
|
||||
## @param ingress.apiVersion Force Ingress API version (automatically detected if not set)
|
||||
##
|
||||
apiVersion: ""
|
||||
## @param ingress.hostname Default host for the ingress record
|
||||
##
|
||||
hostname: alloy.local
|
||||
## @param ingress.ingressClassName IngressClass that will be be used to implement the Ingress (Kubernetes 1.18+)
|
||||
## This is supported in Kubernetes 1.18+ and required if you have more than one IngressClass marked as the default for your cluster .
|
||||
## ref: https://kubernetes.io/blog/2020/04/02/improvements-to-the-ingress-api-in-kubernetes-1.18/
|
||||
##
|
||||
ingressClassName: ""
|
||||
## @param ingress.path Default path for the ingress record
|
||||
## NOTE: You may need to set this to '/*' in order to use this with ALB ingress controllers
|
||||
##
|
||||
path: /
|
||||
## @param ingress.annotations Additional annotations for the Ingress resource. To enable certificate autogeneration, place here your cert-manager annotations.
|
||||
## Use this parameter to set the required annotations for cert-manager, see
|
||||
## ref: https://cert-manager.io/docs/usage/ingress/#supported-annotations
|
||||
## e.g:
|
||||
## annotations:
|
||||
## kubernetes.io/ingress.class: nginx
|
||||
## cert-manager.io/cluster-issuer: cluster-issuer-name
|
||||
##
|
||||
annotations: {}
|
||||
## @param ingress.tls Enable TLS configuration for the host defined at `ingress.hostname` parameter
|
||||
## TLS certificates will be retrieved from a TLS secret with name: `{{- printf "%s-tls" .Values.ingress.hostname }}`
|
||||
## You can:
|
||||
## - Use the `ingress.secrets` parameter to create this TLS secret
|
||||
## - Rely on cert-manager to create it by setting the corresponding annotations
|
||||
## - Rely on Helm to create self-signed certificates by setting `ingress.selfSigned=true`
|
||||
##
|
||||
tls: false
|
||||
## @param ingress.selfSigned Create a TLS secret for this ingress record using self-signed certificates generated by Helm
|
||||
##
|
||||
selfSigned: false
|
||||
## @param ingress.extraHosts An array with additional hostname(s) to be covered with the ingress record
|
||||
## e.g:
|
||||
## extraHosts:
|
||||
## - name: alloy.local
|
||||
## path: /
|
||||
##
|
||||
extraHosts: []
|
||||
## @param ingress.extraPaths An array with additional arbitrary paths that may need to be added to the ingress under the main host
|
||||
## e.g:
|
||||
## extraPaths:
|
||||
## - path: /*
|
||||
## backend:
|
||||
## serviceName: ssl-redirect
|
||||
## servicePort: use-annotation
|
||||
##
|
||||
extraPaths: []
|
||||
## @param ingress.extraTls TLS configuration for additional hostname(s) to be covered with this ingress record
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/ingress/#tls
|
||||
## e.g:
|
||||
## extraTls:
|
||||
## - hosts:
|
||||
## - alloy.local
|
||||
## secretName: alloy.local-tls
|
||||
##
|
||||
extraTls: []
|
||||
## @param ingress.secrets Custom TLS certificates as secrets
|
||||
## NOTE: 'key' and 'certificate' are expected in PEM format
|
||||
## NOTE: 'name' should line up with a 'secretName' set further up
|
||||
## If it is not set and you're using cert-manager, this is unneeded, as it will create a secret for you with valid certificates
|
||||
## If it is not set and you're NOT using cert-manager either, self-signed certificates will be created valid for 365 days
|
||||
## It is also possible to create and manage the certificates outside of this helm chart
|
||||
## Please see README.md for more information
|
||||
## e.g:
|
||||
## secrets:
|
||||
## - name: alloy.local-tls
|
||||
## key: |-
|
||||
## -----BEGIN RSA PRIVATE KEY-----
|
||||
## ...
|
||||
## -----END RSA PRIVATE KEY-----
|
||||
## certificate: |-
|
||||
## -----BEGIN CERTIFICATE-----
|
||||
## ...
|
||||
## -----END CERTIFICATE-----
|
||||
##
|
||||
secrets: []
|
||||
## @param ingress.extraRules Additional rules to be covered with this ingress record
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/ingress/#ingress-rules
|
||||
## e.g:
|
||||
## extraRules:
|
||||
## - host: example.local
|
||||
## http:
|
||||
## path: /
|
||||
## backend:
|
||||
## service:
|
||||
## name: example-svc
|
||||
## port:
|
||||
## name: http
|
||||
##
|
||||
extraRules: []
|
||||
|
||||
## @section Other Parameters
|
||||
##
|
||||
|
||||
## RBAC configuration
|
||||
##
|
||||
rbac:
|
||||
## @param rbac.create Specifies whether RBAC resources should be created
|
||||
##
|
||||
create: true
|
||||
## @param rbac.rules Custom RBAC rules to set
|
||||
## e.g:
|
||||
## rules:
|
||||
## - apiGroups:
|
||||
## - ""
|
||||
## resources:
|
||||
## - pods
|
||||
## verbs:
|
||||
## - get
|
||||
## - list
|
||||
##
|
||||
rules: []
|
||||
|
||||
## ServiceAccount configuration
|
||||
##
|
||||
serviceAccount:
|
||||
## @param serviceAccount.create Specifies whether a ServiceAccount should be created
|
||||
##
|
||||
create: true
|
||||
## @param 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
|
||||
##
|
||||
name: ""
|
||||
## @param serviceAccount.annotations Additional Service Account annotations (evaluated as a template)
|
||||
##
|
||||
annotations: {}
|
||||
## @param serviceAccount.automountServiceAccountToken Automount service account token for the server service account
|
||||
##
|
||||
automountServiceAccountToken: true
|
||||
|
||||
## Prometheus metrics
|
||||
##
|
||||
metrics:
|
||||
## @param metrics.enabled Enable the export of Prometheus metrics
|
||||
##
|
||||
enabled: false
|
||||
## Prometheus Operator ServiceMonitor configuration
|
||||
##
|
||||
serviceMonitor:
|
||||
## @param metrics.serviceMonitor.enabled if `true`, creates a Prometheus Operator ServiceMonitor (also requires `metrics.enabled` to be `true`)
|
||||
##
|
||||
enabled: false
|
||||
## @param metrics.serviceMonitor.namespace Namespace in which Prometheus is running
|
||||
##
|
||||
namespace: ""
|
||||
## @param metrics.serviceMonitor.annotations Additional custom annotations for the ServiceMonitor
|
||||
##
|
||||
annotations: {}
|
||||
## @param metrics.serviceMonitor.labels Extra labels for the ServiceMonitor
|
||||
##
|
||||
labels: {}
|
||||
## @param metrics.serviceMonitor.jobLabel The name of the label on the target service to use as the job name in Prometheus
|
||||
##
|
||||
jobLabel: ""
|
||||
## @param metrics.serviceMonitor.honorLabels honorLabels chooses the metric's labels on collisions with target labels
|
||||
##
|
||||
honorLabels: false
|
||||
## @param metrics.serviceMonitor.interval Interval at which metrics should be scraped.
|
||||
## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#endpoint
|
||||
## e.g:
|
||||
## interval: 10s
|
||||
##
|
||||
interval: ""
|
||||
## @param metrics.serviceMonitor.scrapeTimeout Timeout after which the scrape is ended
|
||||
## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#endpoint
|
||||
## e.g:
|
||||
## scrapeTimeout: 10s
|
||||
##
|
||||
scrapeTimeout: ""
|
||||
## @param metrics.serviceMonitor.metricRelabelings Specify additional relabeling of metrics
|
||||
##
|
||||
metricRelabelings: []
|
||||
## @param metrics.serviceMonitor.relabelings Specify general relabeling
|
||||
##
|
||||
relabelings: []
|
||||
## @param metrics.serviceMonitor.selector Prometheus instance selector labels
|
||||
## ref: https://github.com/bitnami/charts/tree/main/bitnami/prometheus-operator#prometheus-configuration
|
||||
## selector:
|
||||
## prometheus: my-prometheus
|
||||
##
|
||||
selector: {}
|
||||
Reference in New Issue
Block a user