From 0a43de0052eec962050b89c33d64674da45a34d6 Mon Sep 17 00:00:00 2001 From: "Yang, Robin" Date: Sat, 27 Jul 2024 10:47:04 +0800 Subject: [PATCH] test: Add CI scenarios for eBPF Chart. #964 Signed-off-by: Yang, Robin --- charts/opentelemetry-ebpf/Chart.yaml | 2 +- .../ci/enabled-log-debug-values.yaml | 13 ++++ .../ci/requests-limits-values.yaml | 63 +++++++++++++++++++ .../rendered/cloud-collector-deployment.yaml | 2 +- .../cloud-collector-serviceaccount.yaml | 2 +- .../cloud-collector/rendered/configmap.yaml | 2 +- .../rendered/k8s-collector-clusterrole.yaml | 2 +- .../k8s-collector-clusterrolebinding.yaml | 2 +- .../rendered/k8s-collector-deployment.yaml | 4 +- .../k8s-collector-serviceaccount.yaml | 2 +- .../kernel-collector-clusterrole.yaml | 2 +- .../kernel-collector-clusterrolebinding.yaml | 2 +- .../rendered/kernel-collector-daemonset.yaml | 4 +- .../kernel-collector-serviceaccount.yaml | 2 +- .../rendered/reducer-deployment.yaml | 2 +- .../rendered/reducer-service.yaml | 2 +- .../templates/k8s-collector-deployment.yaml | 2 +- .../templates/kernel-collector-daemonset.yaml | 2 +- .../templates/reducer-deployment.yaml | 2 +- 19 files changed, 95 insertions(+), 19 deletions(-) create mode 100644 charts/opentelemetry-ebpf/ci/enabled-log-debug-values.yaml create mode 100644 charts/opentelemetry-ebpf/ci/requests-limits-values.yaml diff --git a/charts/opentelemetry-ebpf/Chart.yaml b/charts/opentelemetry-ebpf/Chart.yaml index 220a31e25..207ce2abd 100644 --- a/charts/opentelemetry-ebpf/Chart.yaml +++ b/charts/opentelemetry-ebpf/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: opentelemetry-ebpf -version: 0.1.0 +version: 0.1.1 description: OpenTelemetry eBPF Helm chart for Kubernetes type: application home: https://opentelemetry.io/ diff --git a/charts/opentelemetry-ebpf/ci/enabled-log-debug-values.yaml b/charts/opentelemetry-ebpf/ci/enabled-log-debug-values.yaml new file mode 100644 index 000000000..5bd9c22ad --- /dev/null +++ b/charts/opentelemetry-ebpf/ci/enabled-log-debug-values.yaml @@ -0,0 +1,13 @@ +# OTLP gRPC endpoint to send the collected metrics +endpoint: + address: "example-opentelemetry-collector.default" + +# enable --log-console +log: + console: true + level: trace + +debug: + enabled: true + storeMinidump: true + sendUnplannedExitMetric: true \ No newline at end of file diff --git a/charts/opentelemetry-ebpf/ci/requests-limits-values.yaml b/charts/opentelemetry-ebpf/ci/requests-limits-values.yaml new file mode 100644 index 000000000..2b7e7e7e3 --- /dev/null +++ b/charts/opentelemetry-ebpf/ci/requests-limits-values.yaml @@ -0,0 +1,63 @@ +# just for reducer +resources: + requests: + memory: "128Mi" + cpu: "200m" + limits: + memory: "256Mi" + cpu: "300m" + +# OTLP gRPC endpoint to send the collected metrics +endpoint: + address: "example-opentelemetry-collector.default" + +reducer: + extraArgs: + - --disable-prometheus-metrics + + disableMetrics: + - none + enableMetrics: + ### to enable an entire metric category: ### + - tcp.all + - udp.all + - dns.all + - http.all + - ebpf_net.all + +kernelCollector: + resources: + requests: + memory: "128Mi" + cpu: "200m" + limits: + memory: "256Mi" + cpu: "300m" + +cloudCollector: + enabled: true + resources: + requests: + memory: "128Mi" + cpu: "200m" + limits: + memory: "256Mi" + cpu: "300m" + +k8sCollector: + relay: + resources: + requests: + memory: "128Mi" + cpu: "200m" + limits: + memory: "256Mi" + cpu: "300m" + watcher: + resources: + requests: + memory: "128Mi" + cpu: "200m" + limits: + memory: "256Mi" + cpu: "300m" \ No newline at end of file diff --git a/charts/opentelemetry-ebpf/examples/cloud-collector/rendered/cloud-collector-deployment.yaml b/charts/opentelemetry-ebpf/examples/cloud-collector/rendered/cloud-collector-deployment.yaml index 43942d5af..b30918a58 100644 --- a/charts/opentelemetry-ebpf/examples/cloud-collector/rendered/cloud-collector-deployment.yaml +++ b/charts/opentelemetry-ebpf/examples/cloud-collector/rendered/cloud-collector-deployment.yaml @@ -5,7 +5,7 @@ kind: Deployment metadata: name: example-opentelemetry-ebpf-cloud-collector labels: - helm.sh/chart: opentelemetry-ebpf-0.1.0 + helm.sh/chart: opentelemetry-ebpf-0.1.1 app.kubernetes.io/name: opentelemetry-ebpf app.kubernetes.io/instance: example app.kubernetes.io/version: "v0.10.0" diff --git a/charts/opentelemetry-ebpf/examples/cloud-collector/rendered/cloud-collector-serviceaccount.yaml b/charts/opentelemetry-ebpf/examples/cloud-collector/rendered/cloud-collector-serviceaccount.yaml index de573352f..3e5ad4721 100644 --- a/charts/opentelemetry-ebpf/examples/cloud-collector/rendered/cloud-collector-serviceaccount.yaml +++ b/charts/opentelemetry-ebpf/examples/cloud-collector/rendered/cloud-collector-serviceaccount.yaml @@ -5,7 +5,7 @@ kind: ServiceAccount metadata: name: example-opentelemetry-ebpf-cloud-collector labels: - helm.sh/chart: opentelemetry-ebpf-0.1.0 + helm.sh/chart: opentelemetry-ebpf-0.1.1 app.kubernetes.io/name: opentelemetry-ebpf app.kubernetes.io/instance: example app.kubernetes.io/version: "v0.10.0" diff --git a/charts/opentelemetry-ebpf/examples/cloud-collector/rendered/configmap.yaml b/charts/opentelemetry-ebpf/examples/cloud-collector/rendered/configmap.yaml index 2c79cc9a5..af144a2f0 100644 --- a/charts/opentelemetry-ebpf/examples/cloud-collector/rendered/configmap.yaml +++ b/charts/opentelemetry-ebpf/examples/cloud-collector/rendered/configmap.yaml @@ -5,7 +5,7 @@ kind: ConfigMap metadata: name: example-opentelemetry-ebpf-config labels: - helm.sh/chart: opentelemetry-ebpf-0.1.0 + helm.sh/chart: opentelemetry-ebpf-0.1.1 app.kubernetes.io/name: opentelemetry-ebpf app.kubernetes.io/instance: example app.kubernetes.io/version: "v0.10.0" diff --git a/charts/opentelemetry-ebpf/examples/cloud-collector/rendered/k8s-collector-clusterrole.yaml b/charts/opentelemetry-ebpf/examples/cloud-collector/rendered/k8s-collector-clusterrole.yaml index dd202d0e3..49968ae85 100644 --- a/charts/opentelemetry-ebpf/examples/cloud-collector/rendered/k8s-collector-clusterrole.yaml +++ b/charts/opentelemetry-ebpf/examples/cloud-collector/rendered/k8s-collector-clusterrole.yaml @@ -5,7 +5,7 @@ kind: ClusterRole metadata: name: example-opentelemetry-ebpf-k8s-collector labels: - helm.sh/chart: opentelemetry-ebpf-0.1.0 + helm.sh/chart: opentelemetry-ebpf-0.1.1 app.kubernetes.io/name: opentelemetry-ebpf app.kubernetes.io/instance: example app.kubernetes.io/version: "v0.10.0" diff --git a/charts/opentelemetry-ebpf/examples/cloud-collector/rendered/k8s-collector-clusterrolebinding.yaml b/charts/opentelemetry-ebpf/examples/cloud-collector/rendered/k8s-collector-clusterrolebinding.yaml index 151df6b06..7838f1464 100644 --- a/charts/opentelemetry-ebpf/examples/cloud-collector/rendered/k8s-collector-clusterrolebinding.yaml +++ b/charts/opentelemetry-ebpf/examples/cloud-collector/rendered/k8s-collector-clusterrolebinding.yaml @@ -5,7 +5,7 @@ kind: ClusterRoleBinding metadata: name: example-opentelemetry-ebpf-k8s-collector labels: - helm.sh/chart: opentelemetry-ebpf-0.1.0 + helm.sh/chart: opentelemetry-ebpf-0.1.1 app.kubernetes.io/name: opentelemetry-ebpf app.kubernetes.io/instance: example app.kubernetes.io/version: "v0.10.0" diff --git a/charts/opentelemetry-ebpf/examples/cloud-collector/rendered/k8s-collector-deployment.yaml b/charts/opentelemetry-ebpf/examples/cloud-collector/rendered/k8s-collector-deployment.yaml index b2bb6d772..4117c6cc7 100644 --- a/charts/opentelemetry-ebpf/examples/cloud-collector/rendered/k8s-collector-deployment.yaml +++ b/charts/opentelemetry-ebpf/examples/cloud-collector/rendered/k8s-collector-deployment.yaml @@ -10,7 +10,7 @@ kind: Deployment metadata: name: example-opentelemetry-ebpf-k8s-collector labels: - helm.sh/chart: opentelemetry-ebpf-0.1.0 + helm.sh/chart: opentelemetry-ebpf-0.1.1 app.kubernetes.io/name: opentelemetry-ebpf app.kubernetes.io/instance: example app.kubernetes.io/version: "v0.10.0" @@ -30,7 +30,7 @@ spec: annotations: # This is here to allow us to do "zero-downtime" updates without an image change. rollingUpdateVersion: "1" - charts.flowmill.com/version: 0.1.0 + charts.flowmill.com/version: 0.1.1 labels: app.kubernetes.io/name: example-opentelemetry-ebpf-k8s-collector app.kubernetes.io/instance: example diff --git a/charts/opentelemetry-ebpf/examples/cloud-collector/rendered/k8s-collector-serviceaccount.yaml b/charts/opentelemetry-ebpf/examples/cloud-collector/rendered/k8s-collector-serviceaccount.yaml index 55d527c41..e51b63a8a 100644 --- a/charts/opentelemetry-ebpf/examples/cloud-collector/rendered/k8s-collector-serviceaccount.yaml +++ b/charts/opentelemetry-ebpf/examples/cloud-collector/rendered/k8s-collector-serviceaccount.yaml @@ -5,7 +5,7 @@ kind: ServiceAccount metadata: name: example-opentelemetry-ebpf-k8s-collector labels: - helm.sh/chart: opentelemetry-ebpf-0.1.0 + helm.sh/chart: opentelemetry-ebpf-0.1.1 app.kubernetes.io/name: opentelemetry-ebpf app.kubernetes.io/instance: example app.kubernetes.io/version: "v0.10.0" diff --git a/charts/opentelemetry-ebpf/examples/cloud-collector/rendered/kernel-collector-clusterrole.yaml b/charts/opentelemetry-ebpf/examples/cloud-collector/rendered/kernel-collector-clusterrole.yaml index edb0fff5f..14d880fdf 100644 --- a/charts/opentelemetry-ebpf/examples/cloud-collector/rendered/kernel-collector-clusterrole.yaml +++ b/charts/opentelemetry-ebpf/examples/cloud-collector/rendered/kernel-collector-clusterrole.yaml @@ -5,7 +5,7 @@ kind: ClusterRole metadata: name: example-opentelemetry-ebpf-kernel-collector labels: - helm.sh/chart: opentelemetry-ebpf-0.1.0 + helm.sh/chart: opentelemetry-ebpf-0.1.1 app.kubernetes.io/name: opentelemetry-ebpf app.kubernetes.io/instance: example app.kubernetes.io/version: "v0.10.0" diff --git a/charts/opentelemetry-ebpf/examples/cloud-collector/rendered/kernel-collector-clusterrolebinding.yaml b/charts/opentelemetry-ebpf/examples/cloud-collector/rendered/kernel-collector-clusterrolebinding.yaml index 1014ba8b9..0112368cc 100644 --- a/charts/opentelemetry-ebpf/examples/cloud-collector/rendered/kernel-collector-clusterrolebinding.yaml +++ b/charts/opentelemetry-ebpf/examples/cloud-collector/rendered/kernel-collector-clusterrolebinding.yaml @@ -5,7 +5,7 @@ kind: ClusterRoleBinding metadata: name: example-opentelemetry-ebpf-kernel-collector labels: - helm.sh/chart: opentelemetry-ebpf-0.1.0 + helm.sh/chart: opentelemetry-ebpf-0.1.1 app.kubernetes.io/name: opentelemetry-ebpf app.kubernetes.io/instance: example app.kubernetes.io/version: "v0.10.0" diff --git a/charts/opentelemetry-ebpf/examples/cloud-collector/rendered/kernel-collector-daemonset.yaml b/charts/opentelemetry-ebpf/examples/cloud-collector/rendered/kernel-collector-daemonset.yaml index 2027790bb..be22cac20 100644 --- a/charts/opentelemetry-ebpf/examples/cloud-collector/rendered/kernel-collector-daemonset.yaml +++ b/charts/opentelemetry-ebpf/examples/cloud-collector/rendered/kernel-collector-daemonset.yaml @@ -9,7 +9,7 @@ kind: DaemonSet metadata: name: example-opentelemetry-ebpf-kernel-collector labels: - helm.sh/chart: opentelemetry-ebpf-0.1.0 + helm.sh/chart: opentelemetry-ebpf-0.1.1 app.kubernetes.io/name: opentelemetry-ebpf app.kubernetes.io/instance: example app.kubernetes.io/version: "v0.10.0" @@ -22,7 +22,7 @@ spec: template: metadata: annotations: - charts.flowmill.com/version: 0.1.0 + charts.flowmill.com/version: 0.1.1 labels: app.kubernetes.io/name: example-opentelemetry-ebpf-kernel-collector app.kubernetes.io/instance: example diff --git a/charts/opentelemetry-ebpf/examples/cloud-collector/rendered/kernel-collector-serviceaccount.yaml b/charts/opentelemetry-ebpf/examples/cloud-collector/rendered/kernel-collector-serviceaccount.yaml index dbfd73dc1..8f6af877a 100644 --- a/charts/opentelemetry-ebpf/examples/cloud-collector/rendered/kernel-collector-serviceaccount.yaml +++ b/charts/opentelemetry-ebpf/examples/cloud-collector/rendered/kernel-collector-serviceaccount.yaml @@ -5,7 +5,7 @@ kind: ServiceAccount metadata: name: example-opentelemetry-ebpf-kernel-collector labels: - helm.sh/chart: opentelemetry-ebpf-0.1.0 + helm.sh/chart: opentelemetry-ebpf-0.1.1 app.kubernetes.io/name: opentelemetry-ebpf app.kubernetes.io/instance: example app.kubernetes.io/version: "v0.10.0" diff --git a/charts/opentelemetry-ebpf/examples/cloud-collector/rendered/reducer-deployment.yaml b/charts/opentelemetry-ebpf/examples/cloud-collector/rendered/reducer-deployment.yaml index 6274ebcca..03c2ad526 100644 --- a/charts/opentelemetry-ebpf/examples/cloud-collector/rendered/reducer-deployment.yaml +++ b/charts/opentelemetry-ebpf/examples/cloud-collector/rendered/reducer-deployment.yaml @@ -5,7 +5,7 @@ kind: Deployment metadata: name: example-opentelemetry-ebpf-reducer labels: - helm.sh/chart: opentelemetry-ebpf-0.1.0 + helm.sh/chart: opentelemetry-ebpf-0.1.1 app.kubernetes.io/name: opentelemetry-ebpf app.kubernetes.io/instance: example app.kubernetes.io/version: "v0.10.0" diff --git a/charts/opentelemetry-ebpf/examples/cloud-collector/rendered/reducer-service.yaml b/charts/opentelemetry-ebpf/examples/cloud-collector/rendered/reducer-service.yaml index e75e0012d..d1adc12e2 100644 --- a/charts/opentelemetry-ebpf/examples/cloud-collector/rendered/reducer-service.yaml +++ b/charts/opentelemetry-ebpf/examples/cloud-collector/rendered/reducer-service.yaml @@ -5,7 +5,7 @@ kind: Service metadata: name: example-opentelemetry-ebpf-reducer labels: - helm.sh/chart: opentelemetry-ebpf-0.1.0 + helm.sh/chart: opentelemetry-ebpf-0.1.1 app.kubernetes.io/name: opentelemetry-ebpf app.kubernetes.io/instance: example app.kubernetes.io/version: "v0.10.0" diff --git a/charts/opentelemetry-ebpf/templates/k8s-collector-deployment.yaml b/charts/opentelemetry-ebpf/templates/k8s-collector-deployment.yaml index 9234b5d2a..8ba2a84dd 100644 --- a/charts/opentelemetry-ebpf/templates/k8s-collector-deployment.yaml +++ b/charts/opentelemetry-ebpf/templates/k8s-collector-deployment.yaml @@ -119,7 +119,7 @@ spec: - name: "EBPF_NET_CRASH_METRIC_HOST" value: {{ .Values.endpoint.address }} - name: "EBPF_NET_CRASH_METRIC_PORT" - value: {{ .Values.endpoint.port }} + value: {{ .Values.endpoint.port | quote }} {{- end }} {{- if .Values.k8sCollector.relay.env }} {{ toYaml .Values.k8sCollector.relay.env | indent 10 }} diff --git a/charts/opentelemetry-ebpf/templates/kernel-collector-daemonset.yaml b/charts/opentelemetry-ebpf/templates/kernel-collector-daemonset.yaml index 01505798f..ed3764403 100644 --- a/charts/opentelemetry-ebpf/templates/kernel-collector-daemonset.yaml +++ b/charts/opentelemetry-ebpf/templates/kernel-collector-daemonset.yaml @@ -113,7 +113,7 @@ spec: - name: "EBPF_NET_CRASH_METRIC_HOST" value: {{ .Values.endpoint.address }} - name: "EBPF_NET_CRASH_METRIC_PORT" - value: {{ .Values.endpoint.port }} + value: {{ .Values.endpoint.port | quote }} {{- end }} {{- if .Values.kernelCollector.env }} {{ toYaml .Values.kernelCollector.env | indent 12 }} diff --git a/charts/opentelemetry-ebpf/templates/reducer-deployment.yaml b/charts/opentelemetry-ebpf/templates/reducer-deployment.yaml index 6a704aa49..996b9a79e 100644 --- a/charts/opentelemetry-ebpf/templates/reducer-deployment.yaml +++ b/charts/opentelemetry-ebpf/templates/reducer-deployment.yaml @@ -72,7 +72,7 @@ spec: - name: "EBPF_NET_CRASH_METRIC_HOST" value: {{ .Values.endpoint.address }} - name: "EBPF_NET_CRASH_METRIC_PORT" - value: {{ .Values.endpoint.port }} + value: {{ .Values.endpoint.port | quote}} {{- end }} {{- end }} ports: