From bff29ddcf13ab10792686c7f604df7362c35a0e5 Mon Sep 17 00:00:00 2001 From: Martijn Evers <94963229+marevers@users.noreply.github.com> Date: Mon, 30 Sep 2024 15:35:06 -0400 Subject: [PATCH] add config.skipConfigMapCheck property to optionally skip check (#1208) --- charts/beyla/README.md | 1 + charts/beyla/templates/configmap.yaml | 2 ++ charts/beyla/values.yaml | 2 ++ 3 files changed, 5 insertions(+) diff --git a/charts/beyla/README.md b/charts/beyla/README.md index 72a5e1700..4447338ae 100644 --- a/charts/beyla/README.md +++ b/charts/beyla/README.md @@ -26,6 +26,7 @@ eBPF-based autoinstrumentation HTTP, HTTP2 and gRPC services, as well as network | config.create | bool | `true` | set to true, to use the below default configurations | | config.data | object | `{"attributes":{"kubernetes":{"enable":true},"select":{"beyla_network_flow_bytes":{"include":["k8s.src.owner.type","k8s.dst.owner.type","direction"]}}},"filter":{"application":{"client":{"not_match":"{kube*,*jaeger-agent*,*prometheus*,*promtail*,*grafana-agent*}"},"server":{"not_match":"{kube*,*jaeger-agent*,*prometheus*,*promtail*,*grafana-agent*}"}},"network":{"k8s_dst_owner_name":{"not_match":"{kube*,*jaeger-agent*,*prometheus*,*promtail*,*grafana-agent*}"},"k8s_src_owner_name":{"not_match":"{kube*,*jaeger-agent*,*prometheus*,*promtail*,*grafana-agent*}"}}},"prometheus_export":{"path":"/metrics","port":9090}}` | default value of beyla configuration | | config.name | string | `""` | | +| config.skipConfigMapCheck | bool | `false` | set to true, to skip the check around the ConfigMap creation | | dnsPolicy | string | `"ClusterFirstWithHostNet"` | Determines how DNS resolution is handled for that pod. If `.Values.preset` is set to `network` or `.Values.config.data.network` is enabled, Beyla requires `hostNetwork` access, causing cluster service DNS resolution to fail. It is recommended not to change this if Beyla sends traces and metrics to Grafana components via k8s service. | | env | object | `{}` | extra environment variables | | envValueFrom | object | `{}` | extra environment variables to be set from resources such as k8s configMaps/secrets | diff --git a/charts/beyla/templates/configmap.yaml b/charts/beyla/templates/configmap.yaml index 4c6893258..fd36e51c0 100644 --- a/charts/beyla/templates/configmap.yaml +++ b/charts/beyla/templates/configmap.yaml @@ -1,6 +1,8 @@ +{{- if not .Values.config.skipConfigMapCheck }} {{- if and (not .Values.config.create) (eq .Values.config.name "") }} {{- fail "if .Values.config.name is not set, then .Values.config.create should be set to true to use default configuration" }} {{- end }} +{{- end }} {{- if and (.Values.config.create) (eq .Values.config.name "") }} apiVersion: v1 kind: ConfigMap diff --git a/charts/beyla/values.yaml b/charts/beyla/values.yaml index 69b1bb18f..c9fd8cb2d 100644 --- a/charts/beyla/values.yaml +++ b/charts/beyla/values.yaml @@ -180,6 +180,8 @@ dnsPolicy: ClusterFirstWithHostNet ## 3. enables kubernetes attribute ## Note: The default configuration is used if config.create=true and config.name="" config: + # -- set to true, to skip the check around the ConfigMap creation + skipConfigMapCheck: false # -- set to true, to use the below default configurations create: true ## -- Provide the name of the external configmap containing the beyla configuration.