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 5f92ac3
Show file tree
Hide file tree
Showing 26 changed files with 148 additions and 193 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,9 +27,9 @@ spec:
app.kubernetes.io/instance: example
spec:
containers:
- image: "otel/opentelemetry-ebpf-cloud-collector:v0.10.0"
- name: cloud-collector
image: "otel/opentelemetry-ebpf-cloud-collector:v0.10.0"
imagePullPolicy: IfNotPresent
name: cloud-collector
args:
- --warning
env:
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,18 +36,18 @@ spec:
app.kubernetes.io/instance: example
spec:
containers:
- image: "otel/opentelemetry-ebpf-k8s-watcher:v0.10.0"
- name: k8s-watcher
image: "otel/opentelemetry-ebpf-k8s-watcher:v0.10.0"
imagePullPolicy: IfNotPresent
name: k8s-watcher
args:
- --log-console
- --log-level=warning
# 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"
- name: k8s-relay
image: "otel/opentelemetry-ebpf-k8s-relay:v0.10.0"
imagePullPolicy: IfNotPresent
name: k8s-relay
args:
- --config-file=/etc/network-explorer/config.yaml
- --warning
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,7 +22,6 @@ spec:
template:
metadata:
annotations:
release_number: "3"
charts.flowmill.com/version: 0.1.0
labels:
app.kubernetes.io/name: example-opentelemetry-ebpf-kernel-collector
Expand Down

This file was deleted.

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 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: 7001
targetPort: 7001
protocol: TCP
appProtocol: http
- name: telemetry
port: 7000
targetPort: telemetry
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
30 changes: 30 additions & 0 deletions charts/opentelemetry-ebpf/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -135,4 +135,34 @@ Fully qualified app name for the reducer deployment.
{{- else -}}
{{- printf "%s-%s-reducer" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- 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 }}

{{/*
Return the appropriate apiVersion for podDisruptionBudget.
*/}}
{{- define "podSecurityPolicy.apiVersion" -}}
{{- if and (.Capabilities.APIVersions.Has "policy/v1") (semverCompare ">= 1.21-0" .Capabilities.KubeVersion.Version) -}}
{{- print "policy/v1" -}}
{{- else -}}
{{- print "policy/v1beta1" -}}
{{- end -}}
{{- end -}}
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,13 @@ 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 }}
name: cloud-collector
- name: cloud-collector
{{- if .Values.cloudCollector.image.tag }}
image: "{{ default .Values.image.registry .Values.cloudCollector.image.registry }}/{{ .Values.cloudCollector.image.name }}:{{ .Values.cloudCollector.image.tag }}"
{{- else }}
image: "{{ default .Values.image.registry .Values.cloudCollector.image.registry }}/{{ .Values.cloudCollector.image.name }}:{{ default .Chart.AppVersion .Values.image.tag }}"
{{- end }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if hasKey .Values.cloudCollector "resources" }}
resources:
{{ toYaml .Values.cloudCollector.resources | indent 10 }}
Expand Down Expand Up @@ -74,7 +78,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
27 changes: 18 additions & 9 deletions charts/opentelemetry-ebpf/templates/k8s-collector-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,13 @@ 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 }}
name: k8s-watcher
- name: k8s-watcher
{{- if .Values.k8sCollector.watcher.image.tag }}
image: "{{ default .Values.image.registry .Values.k8sCollector.watcher.image.repository }}/{{ .Values.k8sCollector.watcher.image.name }}:{{ .Values.k8sCollector.watcher.image.tag }}"
{{- else }}
image: "{{ default .Values.image.registry .Values.k8sCollector.watcher.image.repository }}/{{ .Values.k8sCollector.watcher.image.name }}:{{ default .Chart.AppVersion .Values.image.tag }}"
{{- end }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if hasKey .Values.k8sCollector.watcher "resources" }}
resources:
{{ toYaml .Values.k8sCollector.watcher.resources | indent 10 }}
Expand All @@ -52,9 +56,14 @@ 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 }}
name: k8s-relay
- name: k8s-relay
{{- if .Values.k8sCollector.relay.image.tag }}
image: "{{ default .Values.image.registry .Values.k8sCollector.relay.image.registry }}/{{ .Values.k8sCollector.relay.image.name }}:{{ .Values.k8sCollector.relay.image.tag }}"
{{- else }}
image: "{{ default .Values.image.registry .Values.k8sCollector.relay.image.registry }}/{{ .Values.k8sCollector.relay.image.name }}:{{ default .Chart.AppVersion .Values.k8sCollector.relay.image.tag }}"
{{- end }}
imagePullPolicy: {{ .Values.image.pullPolicy }}

{{- if hasKey .Values.k8sCollector.relay "resources" }}
resources:
{{ toYaml .Values.k8sCollector.relay.resources | indent 10 }}
Expand Down Expand Up @@ -99,7 +108,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 +117,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
Loading

0 comments on commit 5f92ac3

Please sign in to comment.