Skip to content

Commit

Permalink
helm: add more addons for gateway-addons-helm (#3541)
Browse files Browse the repository at this point in the history
* add more addons

Signed-off-by: shawnh2 <shawnhxh@outlook.com>

* add conditions and tags for gateway-addons-helm chart

Signed-off-by: shawnh2 <shawnhxh@outlook.com>

* fix gen-check

Signed-off-by: shawnh2 <shawnhxh@outlook.com>

* fix docs-lint

Signed-off-by: shawnh2 <shawnhxh@outlook.com>

* fix docs-lint

Signed-off-by: shawnh2 <shawnhxh@outlook.com>

---------

Signed-off-by: shawnh2 <shawnhxh@outlook.com>
  • Loading branch information
shawnh2 authored Jun 14, 2024
1 parent eb29549 commit 6425d03
Show file tree
Hide file tree
Showing 7 changed files with 404 additions and 4 deletions.
16 changes: 14 additions & 2 deletions charts/gateway-addons-helm/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,17 @@ dependencies:
- name: grafana
repository: https://grafana.github.io/helm-charts
version: 8.0.0
digest: sha256:8a6c8be4d27ed894d9eceb03a1bbdd9d065e9327a1615c055e66f2b392989ba3
generated: "2024-06-06T16:24:32.010988+08:00"
- name: fluent-bit
repository: https://fluent.github.io/helm-charts
version: 0.30.4
- name: loki
repository: https://grafana.github.io/helm-charts
version: 4.8.0
- name: tempo
repository: https://grafana.github.io/helm-charts
version: 1.3.1
- name: opentelemetry-collector
repository: https://open-telemetry.github.io/opentelemetry-helm-charts
version: 0.60.0
digest: sha256:52aabfaf2c568f7b77da5cf5a771e936e052df2c66afdfd53a2c892452f06d6b
generated: "2024-06-11T22:19:54.569241+08:00"
30 changes: 30 additions & 0 deletions charts/gateway-addons-helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,36 @@ dependencies:
- name: prometheus
version: 25.21.0
repository: https://prometheus-community.github.io/helm-charts
condition: prometheus.enabled
tags:
- metrics
- name: grafana
repository: https://grafana.github.io/helm-charts
version: 8.0.0
condition: grafana.enabled
tags:
- metrics
- name: fluent-bit
repository: https://fluent.github.io/helm-charts
version: 0.30.4
condition: fluent-bit.enabled
tags:
- logging
- name: loki
version: 4.8.0
repository: https://grafana.github.io/helm-charts
condition: loki.enabled
tags:
- logging
- name: tempo
repository: https://grafana.github.io/helm-charts
version: 1.3.1
condition: tempo.enabled
tags:
- tracing
- name: opentelemetry-collector
repository: https://open-telemetry.github.io/opentelemetry-helm-charts
version: 0.60.0
condition: opentelemetry-collector.enabled
tags:
- metrics
60 changes: 60 additions & 0 deletions charts/gateway-addons-helm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ An Add-ons Helm chart for Envoy Gateway

| Repository | Name | Version |
|------------|------|---------|
| https://fluent.github.io/helm-charts | fluent-bit | 0.30.4 |
| https://grafana.github.io/helm-charts | grafana | 8.0.0 |
| https://grafana.github.io/helm-charts | loki | 4.8.0 |
| https://grafana.github.io/helm-charts | tempo | 1.3.1 |
| https://open-telemetry.github.io/opentelemetry-helm-charts | opentelemetry-collector | 0.60.0 |
| https://prometheus-community.github.io/helm-charts | prometheus | 25.21.0 |

## Usage
Expand Down Expand Up @@ -51,6 +55,17 @@ To uninstall the chart:

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| fluent-bit.config.filters | string | `"[FILTER]\n Name kubernetes\n Match kube.*\n Merge_Log On\n Keep_Log Off\n K8S-Logging.Parser On\n K8S-Logging.Exclude On\n\n[FILTER]\n Name grep\n Match kube.*\n Regex $kubernetes['container_name'] ^envoy$\n\n[FILTER]\n Name parser\n Match kube.*\n Key_Name log\n Parser envoy\n Reserve_Data True\n"` | |
| fluent-bit.config.inputs | string | `"[INPUT]\n Name tail\n Path /var/log/containers/*.log\n multiline.parser docker, cri\n Tag kube.*\n Mem_Buf_Limit 5MB\n Skip_Long_Lines On\n"` | |
| fluent-bit.config.outputs | string | `"[OUTPUT]\n Name loki\n Match kube.*\n Host loki.monitoring.svc.cluster.local\n Port 3100\n Labels job=fluentbit, app=$kubernetes['labels']['app'], k8s_namespace_name=$kubernetes['namespace_name'], k8s_pod_name=$kubernetes['pod_name'], k8s_container_name=$kubernetes['container_name']\n"` | |
| fluent-bit.config.service | string | `"[SERVICE]\n Daemon Off\n Flush {{ .Values.flush }}\n Log_Level {{ .Values.logLevel }}\n Parsers_File parsers.conf\n Parsers_File custom_parsers.conf\n HTTP_Server On\n HTTP_Listen 0.0.0.0\n HTTP_Port {{ .Values.metricsPort }}\n Health_Check On\n"` | |
| fluent-bit.enabled | bool | `true` | |
| fluent-bit.fullnameOverride | string | `"fluent-bit"` | |
| fluent-bit.podAnnotations."fluentbit.io/exclude" | string | `"true"` | |
| fluent-bit.podAnnotations."prometheus.io/path" | string | `"/api/v1/metrics/prometheus"` | |
| fluent-bit.podAnnotations."prometheus.io/port" | string | `"2020"` | |
| fluent-bit.podAnnotations."prometheus.io/scrape" | string | `"true"` | |
| fluent-bit.testFramework.enabled | bool | `false` | |
| grafana.adminPassword | string | `"admin"` | |
| grafana.dashboardProviders."dashboardproviders.yaml".apiVersion | int | `1` | |
| grafana.dashboardProviders."dashboardproviders.yaml".providers[0].disableDeletion | bool | `false` | |
Expand All @@ -65,9 +80,48 @@ To uninstall the chart:
| grafana.datasources."datasources.yaml".datasources[0].name | string | `"Prometheus"` | |
| grafana.datasources."datasources.yaml".datasources[0].type | string | `"prometheus"` | |
| grafana.datasources."datasources.yaml".datasources[0].url | string | `"http://prometheus-server"` | |
| grafana.enabled | bool | `true` | |
| grafana.fullnameOverride | string | `"grafana"` | |
| grafana.service.type | string | `"LoadBalancer"` | |
| loki.backend.replicas | int | `0` | |
| loki.deploymentMode | string | `"SingleBinary"` | |
| loki.enabled | bool | `true` | |
| loki.fullnameOverride | string | `"loki"` | |
| loki.gateway.enabled | bool | `false` | |
| loki.loki.auth_enabled | bool | `false` | |
| loki.loki.commonConfig.replication_factor | int | `1` | |
| loki.loki.compactorAddress | string | `"loki"` | |
| loki.loki.memberlist | string | `"loki-memberlist"` | |
| loki.loki.rulerConfig.storage.type | string | `"local"` | |
| loki.loki.storage.type | string | `"filesystem"` | |
| loki.monitoring.selfMonitoring.grafanaAgent.installOperator | bool | `true` | |
| loki.read.replicas | int | `0` | |
| loki.singleBinary.replicas | int | `1` | |
| loki.write.replicas | int | `0` | |
| opentelemetry-collector.config.exporters.logging.verbosity | string | `"detailed"` | |
| opentelemetry-collector.config.exporters.loki.endpoint | string | `"http://loki.monitoring.svc:3100/loki/api/v1/push"` | |
| opentelemetry-collector.config.exporters.otlp.endpoint | string | `"tempo.monitoring.svc:4317"` | |
| opentelemetry-collector.config.exporters.otlp.tls.insecure | bool | `true` | |
| opentelemetry-collector.config.exporters.prometheus.endpoint | string | `"0.0.0.0:19001"` | |
| opentelemetry-collector.config.extensions.health_check | object | `{}` | |
| opentelemetry-collector.config.processors.attributes.actions[0].action | string | `"insert"` | |
| opentelemetry-collector.config.processors.attributes.actions[0].key | string | `"loki.attribute.labels"` | |
| opentelemetry-collector.config.processors.attributes.actions[0].value | string | `"k8s.pod.name, k8s.namespace.name"` | |
| opentelemetry-collector.config.receivers.otlp.protocols.grpc.endpoint | string | `"${env:MY_POD_IP}:4317"` | |
| opentelemetry-collector.config.receivers.otlp.protocols.http.endpoint | string | `"${env:MY_POD_IP}:4318"` | |
| opentelemetry-collector.config.service.extensions[0] | string | `"health_check"` | |
| opentelemetry-collector.config.service.pipelines.logs.exporters[0] | string | `"loki"` | |
| opentelemetry-collector.config.service.pipelines.logs.processors[0] | string | `"attributes"` | |
| opentelemetry-collector.config.service.pipelines.logs.receivers[0] | string | `"otlp"` | |
| opentelemetry-collector.config.service.pipelines.metrics.exporters[0] | string | `"prometheus"` | |
| opentelemetry-collector.config.service.pipelines.metrics.receivers[0] | string | `"otlp"` | |
| opentelemetry-collector.config.service.pipelines.traces.exporters[0] | string | `"otlp"` | |
| opentelemetry-collector.config.service.pipelines.traces.receivers[0] | string | `"otlp"` | |
| opentelemetry-collector.enabled | bool | `false` | |
| opentelemetry-collector.fullnameOverride | string | `"otel-collector"` | |
| opentelemetry-collector.mode | string | `"deployment"` | |
| prometheus.alertmanager.enabled | bool | `false` | |
| prometheus.enabled | bool | `true` | |
| prometheus.kube-state-metrics.enabled | bool | `false` | |
| prometheus.prometheus-node-exporter.enabled | bool | `false` | |
| prometheus.prometheus-pushgateway.enabled | bool | `false` | |
Expand All @@ -78,4 +132,10 @@ To uninstall the chart:
| prometheus.server.readinessProbeInitialDelay | int | `0` | |
| prometheus.server.securityContext | object | `{}` | |
| prometheus.server.service.type | string | `"LoadBalancer"` | |
| tags.logging | bool | `false` | |
| tags.metrics | bool | `true` | |
| tags.tracing | bool | `false` | |
| tempo.enabled | bool | `true` | |
| tempo.fullnameOverride | string | `"tempo"` | |
| tempo.service.type | string | `"LoadBalancer"` | |

178 changes: 178 additions & 0 deletions charts/gateway-addons-helm/values.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
tags:
metrics: true
logging: false
tracing: false


# Values for Grafana dependency
grafana:
enabled: true
fullnameOverride: grafana
datasources:
datasources.yaml:
Expand Down Expand Up @@ -29,6 +36,7 @@ grafana:

# Values for Prometheus dependency
prometheus:
enabled: true
# To simplify the deployment, disable non-essential components
alertmanager:
enabled: false
Expand All @@ -53,3 +61,173 @@ prometheus:
image:
repository: prom/prometheus
securityContext: {}


# Values for Fluent-bit dependency
fluent-bit:
enabled: true
fullnameOverride: fluent-bit
testFramework:
enabled: false
podAnnotations:
prometheus.io/scrape: "true"
prometheus.io/port: "2020"
prometheus.io/path: /api/v1/metrics/prometheus
fluentbit.io/exclude: "true"
## https://docs.fluentbit.io/manual/administration/configuring-fluent-bit/classic-mode/configuration-file
config:
service: |
[SERVICE]
Daemon Off
Flush {{ .Values.flush }}
Log_Level {{ .Values.logLevel }}
Parsers_File parsers.conf
Parsers_File custom_parsers.conf
HTTP_Server On
HTTP_Listen 0.0.0.0
HTTP_Port {{ .Values.metricsPort }}
Health_Check On
## https://docs.fluentbit.io/manual/pipeline/inputs
inputs: |
[INPUT]
Name tail
Path /var/log/containers/*.log
multiline.parser docker, cri
Tag kube.*
Mem_Buf_Limit 5MB
Skip_Long_Lines On
## https://docs.fluentbit.io/manual/pipeline/filters
filters: |
[FILTER]
Name kubernetes
Match kube.*
Merge_Log On
Keep_Log Off
K8S-Logging.Parser On
K8S-Logging.Exclude On
[FILTER]
Name grep
Match kube.*
Regex $kubernetes['container_name'] ^envoy$

[FILTER]
Name parser
Match kube.*
Key_Name log
Parser envoy
Reserve_Data True

## https://docs.fluentbit.io/manual/pipeline/outputs
outputs: |
[OUTPUT]
Name loki
Match kube.*
Host loki.monitoring.svc.cluster.local
Port 3100
Labels job=fluentbit, app=$kubernetes['labels']['app'], k8s_namespace_name=$kubernetes['namespace_name'], k8s_pod_name=$kubernetes['pod_name'], k8s_container_name=$kubernetes['container_name']
# Values for Loki dependency
loki:
enabled: true
# Running a single replica of Loki
## https://grafana.com/docs/loki/latest/setup/install/helm/install-monolithic/
deploymentMode: SingleBinary
fullnameOverride: loki
loki:
auth_enabled: false
compactorAddress: "loki"
memberlist: "loki-memberlist"
commonConfig:
replication_factor: 1
storage:
type: 'filesystem'
rulerConfig:
storage:
type: "local"
singleBinary:
replicas: 1
read:
replicas: 0
backend:
replicas: 0
write:
replicas: 0
monitoring:
selfMonitoring:
grafanaAgent:
installOperator: true
# Disable gateway.
gateway:
enabled: false


# Values for Tempo dependency
tempo:
enabled: true
fullnameOverride: tempo
service:
type: LoadBalancer


# Values for OpenTelemetry-Collector dependency
opentelemetry-collector:
enabled: false
fullnameOverride: otel-collector
mode: deployment
config:
exporters:
prometheus:
endpoint: 0.0.0.0:19001
logging:
verbosity: detailed
loki:
endpoint: "http://loki.monitoring.svc:3100/loki/api/v1/push"
otlp:
endpoint: tempo.monitoring.svc:4317
tls:
insecure: true
extensions:
# The health_check extension is mandatory for this chart.
# Without the health_check extension the collector will fail the readiness and liveliness probes.
# The health_check extension can be modified, but should never be removed.
health_check: {}
processors:
attributes:
actions:
- action: insert
key: loki.attribute.labels
# k8s.pod.name is OpenTelemetry format for Kubernetes Pod name,
# Loki will convert this to k8s_pod_name label.
value: k8s.pod.name, k8s.namespace.name
receivers:
otlp:
protocols:
grpc:
endpoint: ${env:MY_POD_IP}:4317
http:
endpoint: ${env:MY_POD_IP}:4318
service:
extensions:
- health_check
pipelines:
metrics:
exporters:
- prometheus
receivers:
- otlp
logs:
exporters:
- loki
processors:
- attributes
receivers:
- otlp
traces:
exporters:
- otlp
receivers:
- otlp
Loading

0 comments on commit 6425d03

Please sign in to comment.