Skip to content

Commit

Permalink
Update charts/opentelemetry-ebpf/Chart.yaml
Browse files Browse the repository at this point in the history
Co-authored-by: Tyler Helmuth <[email protected]>
  • Loading branch information
nicolastakashi and TylerHelmuth committed Nov 17, 2023
1 parent 83f5d98 commit 5b4786f
Show file tree
Hide file tree
Showing 25 changed files with 112 additions and 80 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
TMP_DIRECTORY = ./tmp
CHARTS ?= opentelemetry-collector opentelemetry-operator opentelemetry-demo
CHARTS ?= opentelemetry-collector opentelemetry-operator opentelemetry-demo opentelemetry-ebpf

.PHONY: generate-examples
generate-examples:
Expand Down
5 changes: 2 additions & 3 deletions charts/opentelemetry-ebpf/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@ description: OpenTelemetry eBPF Helm chart for Kubernetes
type: application
home: https://opentelemetry.io/
sources:
- https://github.com/open-telemetry/opentelemetry-collector
- https://github.com/open-telemetry/opentelemetry-collector-contrib
- https://github.com/open-telemetry/opentelemetry-ebpf
maintainers:
- name: dmitryax
- name: TylerHelmuth
icon: https://opentelemetry.io/img/logos/opentelemetry-logo-nav.png
appVersion: 0.10.0
appVersion: v0.10.0
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ metadata:
helm.sh/chart: opentelemetry-ebpf-0.1.0
app.kubernetes.io/name: opentelemetry-ebpf
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.10.0"
app.kubernetes.io/version: "v0.10.0"
app.kubernetes.io/managed-by: Helm
spec:
progressDeadlineSeconds: 600
Expand All @@ -27,7 +27,7 @@ spec:
app.kubernetes.io/instance: example
spec:
containers:
- image: "otel/opentelemetry-ebpf-cloud-collector:v0.10.0"
- image: "otel/opentelemetry-ebpf-cloud-collector:"
imagePullPolicy: IfNotPresent
name: cloud-collector
args:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ metadata:
helm.sh/chart: opentelemetry-ebpf-0.1.0
app.kubernetes.io/name: opentelemetry-ebpf
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.10.0"
app.kubernetes.io/version: "v0.10.0"
app.kubernetes.io/managed-by: Helm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ metadata:
helm.sh/chart: opentelemetry-ebpf-0.1.0
app.kubernetes.io/name: opentelemetry-ebpf
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.10.0"
app.kubernetes.io/version: "v0.10.0"
app.kubernetes.io/managed-by: Helm
data:
config.yaml: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ metadata:
helm.sh/chart: opentelemetry-ebpf-0.1.0
app.kubernetes.io/name: opentelemetry-ebpf
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.10.0"
app.kubernetes.io/version: "v0.10.0"
app.kubernetes.io/managed-by: Helm
rules:
- apiGroups:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ metadata:
helm.sh/chart: opentelemetry-ebpf-0.1.0
app.kubernetes.io/name: opentelemetry-ebpf
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.10.0"
app.kubernetes.io/version: "v0.10.0"
app.kubernetes.io/managed-by: Helm
roleRef:
apiGroup: rbac.authorization.k8s.io
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ metadata:
helm.sh/chart: opentelemetry-ebpf-0.1.0
app.kubernetes.io/name: opentelemetry-ebpf
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.10.0"
app.kubernetes.io/version: "v0.10.0"
app.kubernetes.io/managed-by: Helm
spec:
progressDeadlineSeconds: 600
Expand All @@ -36,7 +36,7 @@ spec:
app.kubernetes.io/instance: example
spec:
containers:
- image: "otel/opentelemetry-ebpf-k8s-watcher:v0.10.0"
- image: "otel/opentelemetry-ebpf-k8s-watcher:"
imagePullPolicy: IfNotPresent
name: k8s-watcher
args:
Expand All @@ -45,7 +45,7 @@ spec:
# k8s-relay, which is a service that the k8s-watcher talks to.
# Currently not configurable, has to be reachable on localhost:8172, so must
# share a pod with the k8s-watcher above.
- image: "otel/opentelemetry-ebpf-k8s-relay:v0.10.0"
- image: "otel/opentelemetry-ebpf-k8s-relay:"
imagePullPolicy: IfNotPresent
name: k8s-relay
args:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ metadata:
helm.sh/chart: opentelemetry-ebpf-0.1.0
app.kubernetes.io/name: opentelemetry-ebpf
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.10.0"
app.kubernetes.io/version: "v0.10.0"
app.kubernetes.io/managed-by: Helm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ metadata:
helm.sh/chart: opentelemetry-ebpf-0.1.0
app.kubernetes.io/name: opentelemetry-ebpf
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.10.0"
app.kubernetes.io/version: "v0.10.0"
app.kubernetes.io/managed-by: Helm
rules:
- apiGroups:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ metadata:
helm.sh/chart: opentelemetry-ebpf-0.1.0
app.kubernetes.io/name: opentelemetry-ebpf
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.10.0"
app.kubernetes.io/version: "v0.10.0"
app.kubernetes.io/managed-by: Helm
roleRef:
apiGroup: rbac.authorization.k8s.io
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ metadata:
helm.sh/chart: opentelemetry-ebpf-0.1.0
app.kubernetes.io/name: opentelemetry-ebpf
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.10.0"
app.kubernetes.io/version: "v0.10.0"
app.kubernetes.io/managed-by: Helm
spec:
selector:
Expand All @@ -22,15 +22,14 @@ spec:
template:
metadata:
annotations:
release_number: "3"
charts.flowmill.com/version: 0.1.0
labels:
app.kubernetes.io/name: example-opentelemetry-ebpf-kernel-collector
app.kubernetes.io/instance: example
spec:
containers:
- name: kernel-collector
image: "otel/opentelemetry-ebpf-kernel-collector:v0.10.0"
image: "otel/opentelemetry-ebpf-kernel-collector:"
imagePullPolicy: IfNotPresent
args:
- --config-file=/etc/network-explorer/config.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ metadata:
helm.sh/chart: opentelemetry-ebpf-0.1.0
app.kubernetes.io/name: opentelemetry-ebpf
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.10.0"
app.kubernetes.io/version: "v0.10.0"
app.kubernetes.io/managed-by: Helm
spec:
privileged: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ metadata:
helm.sh/chart: opentelemetry-ebpf-0.1.0
app.kubernetes.io/name: opentelemetry-ebpf
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.10.0"
app.kubernetes.io/version: "v0.10.0"
app.kubernetes.io/managed-by: Helm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ metadata:
helm.sh/chart: opentelemetry-ebpf-0.1.0
app.kubernetes.io/name: opentelemetry-ebpf
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.10.0"
app.kubernetes.io/version: "v0.10.0"
app.kubernetes.io/managed-by: Helm
spec:
replicas: 1
Expand All @@ -26,7 +26,7 @@ spec:
spec:
containers:
- name: reducer
image: "otel/opentelemetry-ebpf-reducer:v0.10.0"
image: "otel/opentelemetry-ebpf-reducer:"
imagePullPolicy: IfNotPresent
args:
- --port=7000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,22 @@ metadata:
helm.sh/chart: opentelemetry-ebpf-0.1.0
app.kubernetes.io/name: opentelemetry-ebpf
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.10.0"
app.kubernetes.io/version: "v0.10.0"
app.kubernetes.io/managed-by: Helm
spec:
type: ClusterIP
selector:
app.kubernetes.io/name: example-opentelemetry-ebpf-reducer
app.kubernetes.io/instance: example
ports:

- name: stats
port:
targetPort: 7001
protocol: TCP
appProtocol: http
- name: telemetry
port: 7000
targetPort: telemetry
port:
targetPort: 7000
protocol: TCP
appProtocol: http
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cloudCollector:
enabled: true

otelCollector:
endpoint:
address: example-opentelemetry-collector
21 changes: 20 additions & 1 deletion charts/opentelemetry-ebpf/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -135,4 +135,23 @@ Fully qualified app name for the reducer deployment.
{{- else -}}
{{- printf "%s-%s-reducer" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}

{{/* Build the list of port for service */}}
{{- define "opentelemetry-collector-reducer.servicePortsConfig" -}}
{{- $ports := deepCopy .Values.reducer.service.ports }}
{{- range $key, $port := $ports }}
{{- if $port.enabled }}
- name: {{ $key }}
port: {{ $port.servicePort }}
targetPort: {{ $port.containerPort }}
protocol: {{ $port.protocol }}
{{- if $port.appProtocol }}
appProtocol: {{ $port.appProtocol }}
{{- end }}
{{- if $port.nodePort }}
nodePort: {{ $port.nodePort }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ spec:
{{- end }}
{{- end }}
containers:
- image: "{{ default .Values.images.repository .Values.cloudCollector.image.repository }}/{{ .Values.cloudCollector.image.name }}:{{ default .Values.images.tag .Values.cloudCollector.image.tag }}"
imagePullPolicy: {{ .Values.images.pullPolicy }}
- image: "{{ default .Values.image.registry .Values.cloudCollector.image.registry }}/{{ .Values.cloudCollector.image.name }}:{{ default .Values.image.tag .Values.cloudCollector.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
name: cloud-collector
{{- if hasKey .Values.cloudCollector "resources" }}
resources:
Expand Down Expand Up @@ -74,7 +74,7 @@ spec:
- name: "EBPF_NET_INTAKE_HOST"
value: {{ include "opentelemetry-collector-reducer.fullname" . }}
- name: "EBPF_NET_INTAKE_PORT"
value: "{{ default 7000 .Values.reducer.telemetryPort }}"
value: "{{ default 7000 .Values.reducer.service.ports.telemetry.port }}"
{{- if hasKey .Values "debug" }}
{{- if (default false .Values.debug.storeMinidump) }}
- name: "EBPF_NET_MINIDUMP_DIR"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ spec:
{{- end }}
{{- end }}
containers:
- image: "{{ default .Values.images.repository .Values.k8sCollector.watcher.image.repository }}/{{ .Values.k8sCollector.watcher.image.name }}:{{ default .Values.images.tag .Values.k8sCollector.watcher.image.tag }}"
imagePullPolicy: {{ .Values.images.pullPolicy }}
- image: "{{ default .Values.image.registry .Values.k8sCollector.watcher.image.repository }}/{{ .Values.k8sCollector.watcher.image.name }}:{{ default .Values.image.tag .Values.k8sCollector.watcher.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
name: k8s-watcher
{{- if hasKey .Values.k8sCollector.watcher "resources" }}
resources:
Expand All @@ -52,8 +52,8 @@ spec:
# k8s-relay, which is a service that the k8s-watcher talks to.
# Currently not configurable, has to be reachable on localhost:8172, so must
# share a pod with the k8s-watcher above.
- image: "{{ default .Values.images.repository .Values.k8sCollector.relay.image.repository }}/{{ .Values.k8sCollector.relay.image.name }}:{{ default .Values.images.tag .Values.k8sCollector.relay.image.tag }}"
imagePullPolicy: {{ .Values.images.pullPolicy }}
- image: "{{ default .Values.image.registry .Values.k8sCollector.relay.image.registry }}/{{ .Values.k8sCollector.relay.image.name }}:{{ default .Values.image.tag .Values.k8sCollector.relay.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
name: k8s-relay
{{- if hasKey .Values.k8sCollector.relay "resources" }}
resources:
Expand Down Expand Up @@ -99,7 +99,7 @@ spec:
- name: "EBPF_NET_INTAKE_HOST"
value: {{ include "opentelemetry-collector-reducer.fullname" . }}
- name: "EBPF_NET_INTAKE_PORT"
value: "{{ default 7000 .Values.reducer.telemetryPort }}"
value: "{{ default 7000 .Values.reducer.service.ports.telemetry.port }}"
{{- if hasKey .Values "debug" }}
{{- if (default false .Values.debug.storeMinidump) }}
- name: "EBPF_NET_MINIDUMP_DIR"
Expand All @@ -108,9 +108,9 @@ spec:
{{- end }}
{{- if and .Values.debug.enabled .Values.debug.sendUnplannedExitMetric }}
- name: "EBPF_NET_CRASH_METRIC_HOST"
value: {{ .Values.otelCollector.address }}
value: {{ .Values.endpoint.address }}
- name: "EBPF_NET_CRASH_METRIC_PORT"
value: {{ .Values.otelCollector.port | default 4317 }}
value: {{ .Values.endpoint.port | default 4317 }}
{{- end }}
{{- if .Values.k8sCollector.relay.env }}
{{ toYaml .Values.k8sCollector.relay.env | indent 10 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ spec:
template:
metadata:
annotations:
release_number: "3"
charts.flowmill.com/version: {{ .Chart.Version }}
labels:
app.kubernetes.io/name: {{ include "opentelemetry-collector-kernel-collector.fullname" . }}
Expand All @@ -31,8 +30,8 @@ spec:
{{- end }}
containers:
- name: kernel-collector
image: "{{ default .Values.images.repository .Values.kernelCollector.image.repository }}/{{ .Values.kernelCollector.image.name }}:{{ default .Values.images.tag .Values.kernelCollector.image.tag }}"
imagePullPolicy: {{ .Values.images.pullPolicy }}
image: "{{ default .Values.image.registry .Values.kernelCollector.image.registry }}/{{ .Values.kernelCollector.image.name }}:{{ default .Values.image.tag .Values.kernelCollector.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
args:
- --config-file=/etc/network-explorer/config.yaml
{{- if .Values.kernelCollector.bpfDumpFile }}
Expand Down Expand Up @@ -93,7 +92,7 @@ spec:
- name: "EBPF_NET_INTAKE_HOST"
value: {{ include "opentelemetry-collector-reducer.fullname" . }}
- name: "EBPF_NET_INTAKE_PORT"
value: "{{ default 7000 .Values.reducer.telemetryPort }}"
value: "{{ default 7000 .Values.reducer.service.ports.telemetry.port }}"
{{- if .Values.kernelCollector.exportBpfSrcFile }}
- name: "EBPF_NET_EXPORT_BPF_SRC_FILE"
value: {{ quote .Values.kernelCollector.exportBpfSrcFile }}
Expand All @@ -108,9 +107,9 @@ spec:
{{- end }}
{{- if and .Values.debug.enabled .Values.debug.sendUnplannedExitMetric }}
- name: "EBPF_NET_CRASH_METRIC_HOST"
value: {{ .Values.otelCollector.address }}
value: {{ .Values.endpoint.address }}
- name: "EBPF_NET_CRASH_METRIC_PORT"
value: {{ .Values.otelCollector.port | default 4317 }}
value: {{ .Values.endpoint.port | default 4317 }}
{{- end }}
{{- if .Values.kernelCollector.env }}
{{ toYaml .Values.kernelCollector.env | indent 12 }}
Expand Down
Loading

0 comments on commit 5b4786f

Please sign in to comment.