File tree Expand file tree Collapse file tree 4 files changed +26
-22
lines changed
charts/opentelemetry-ebpf-instrumentation
examples/default/rendered Expand file tree Collapse file tree 4 files changed +26
-22
lines changed Original file line number Diff line number Diff line change @@ -15,14 +15,14 @@ metadata:
1515 app.kubernetes.io/component : config
1616data :
1717 ebpf-instrument-config.yml : |
18- discovery:
19- services:
20- - k8s_namespace: .
21- exclude_services:
22- - exe_path: ".*ebpf-instrument.*|.*otelcol.*"
2318 attributes:
2419 kubernetes:
2520 enable: true
21+ discovery:
22+ exclude_services:
23+ - exe_path: .*ebpf-instrument.*|.*otelcol.*
24+ services:
25+ - k8s_namespace: .
2626 filter:
2727 network:
2828 k8s_dst_owner_name:
Original file line number Diff line number Diff line change 2323 template :
2424 metadata :
2525 annotations :
26- checksum/config : 38494832e2d0254bc1eb17e86788cec59c5f5c607cc486a44dc90fa20517c46d
26+ checksum/config : 2ddd12b5cac5f3eab28d8bc500cb3db81df076a39a5143c879aed1772dfdc4ee
2727 labels :
2828 helm.sh/chart : opentelemetry-ebpf-instrumentation-0.1.0
2929 app.kubernetes.io/name : opentelemetry-ebpf-instrumentation
Original file line number Diff line number Diff line change @@ -133,3 +133,22 @@ app.kubernetes.io/instance: {{ .Release.Name }}
133133{ { toYaml . } }
134134{ {- end } }
135135{ {- end } }
136+
137+ { {/*
138+ Generate the configmap data based on preset and configuration values
139+ */} }
140+ { {- define " obi.configData" -} }
141+ { {- $config := deepCopy .Values.config.data } }
142+ { {- if eq .Values.preset " network" } }
143+ { {- if not .Values.config.data.network } }
144+ { {- $_ := set $config " network" (dict " enable" true ) } }
145+ { {- end } }
146+ { {- end } }
147+ { {- if eq .Values.preset " application" } }
148+ { {- if not .Values.config.data.discovery } }
149+ { {- $discovery := dict " services" (list (dict " k8s_namespace" " ." )) " exclude_services" (list (dict " exe_path" " .*ebpf-instrument.*|.*otelcol.*" )) } }
150+ { {- $_ := set $config " discovery" $discovery } }
151+ { {- end } }
152+ { {- end } }
153+ { {- toYaml $config } }
154+ { {- end } }
Original file line number Diff line number Diff line change @@ -18,20 +18,5 @@ metadata:
1818 {{- end }}
1919data :
2020 ebpf-instrument-config.yml : |
21- {{- if eq .Values.preset "network" }}
22- {{- if not .Values.config.data.network }}
23- network:
24- enable: true
25- {{- end }}
26- {{- end }}
27- {{- if eq .Values.preset "application" }}
28- {{- if not .Values.config.data.discovery }}
29- discovery:
30- services:
31- - k8s_namespace: .
32- exclude_services:
33- - exe_path: ".*ebpf-instrument.*|.*otelcol.*"
34- {{- end }}
35- {{- end }}
36- {{- toYaml .Values.config.data | nindent 4}}
21+ {{- include "obi.configData" . | nindent 4 }}
3722{{- end }}
You can’t perform that action at this time.
0 commit comments