-
Notifications
You must be signed in to change notification settings - Fork 484
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CHORE] adding eBPF helm chart (#855)
* [CHORE] adding eBPF helm chart Signed-off-by: Nicolas Takashi <[email protected]> * Update .github/workflows/ebpf-test.yaml Co-authored-by: Tyler Helmuth <[email protected]> * Update charts/opentelemetry-ebpf/Chart.yaml Co-authored-by: Tyler Helmuth <[email protected]> * Update CONTRIBUTING.md Co-authored-by: Jared Tan <[email protected]> * Update CONTRIBUTING.md Co-authored-by: Jared Tan <[email protected]> * Update CONTRIBUTING.md Co-authored-by: Jared Tan <[email protected]> * Update README.md Co-authored-by: Jared Tan <[email protected]> * Update README.md Co-authored-by: Jared Tan <[email protected]> * Update README.md Co-authored-by: Jared Tan <[email protected]> * Update charts/opentelemetry-ebpf/CONTRIBUTING.md * Update charts/opentelemetry-ebpf/values.yaml * Update charts/opentelemetry-ebpf/values.yaml Co-authored-by: Dmitrii Anoshin <[email protected]> --------- Signed-off-by: Nicolas Takashi <[email protected]> Co-authored-by: Tyler Helmuth <[email protected]> Co-authored-by: Jared Tan <[email protected]> Co-authored-by: Dmitrii Anoshin <[email protected]>
- Loading branch information
1 parent
4c2f3cf
commit 592034a
Showing
36 changed files
with
1,901 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Test eBPF Chart | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- "charts/opentelemetry-ebpf/**" | ||
branches: | ||
- main | ||
|
||
jobs: | ||
ebpf-test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Setup | ||
uses: ./.github/actions/setup | ||
with: | ||
create-kind-cluster: "true" | ||
|
||
- name: Run chart-testing (install) | ||
run: ct install --charts charts/opentelemetry-ebpf | ||
|
||
- name: Run daemonset and deployment install test | ||
run: | | ||
kubectl apply -f ./charts/opentelemetry-collector/examples/daemonset-and-deployment/rendered | ||
kubectl rollout status deployment example-opentelemetry-collector --timeout=30s | ||
kubectl apply -f ./charts/opentelemetry-ebpf/examples/cloud-collector/rendered | ||
kubectl rollout status daemonset example-opentelemetry-ebpf-kernel-collector --timeout=30s | ||
kubectl rollout status deployment example-opentelemetry-ebpf-cloud-collector --timeout=30s | ||
kubectl rollout status deployment example-opentelemetry-ebpf-k8s-collector --timeout=30s | ||
kubectl rollout status deployment example-opentelemetry-ebpf-reducer --timeout=30s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Patterns to ignore when building packages. | ||
# This supports shell glob matching, relative path matching, and | ||
# negation (prefixed with !). Only one pattern per line. | ||
.DS_Store | ||
# Common VCS dirs | ||
.git/ | ||
.gitignore | ||
.bzr/ | ||
.bzrignore | ||
.hg/ | ||
.hgignore | ||
.svn/ | ||
# Common backup files | ||
*.swp | ||
*.bak | ||
*.tmp | ||
*.orig | ||
*~ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj | ||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# OpenTelemetry eBPF Chart Contributing Guide | ||
|
||
All changes to the chart require a bump to the version in `chart.yaml`. See the [Contributing Guide](https://github.com/open-telemetry/opentelemetry-helm-charts/blob/main/CONTRIBUTING.md#versioning) for our versioning requirements. | ||
|
||
Once the chart version is bumped, the examples must be regenerated. You can regenerate examples by running `make generate-examples CHARTS=opentelemetry-ebpf`. | ||
|
||
## Bumping Default Collector Version | ||
|
||
1. Increase the minor version of the chart by one and set the patch version to zero. | ||
2. Update the chart's `appVersion` to match the new collector version. This version will be used as the image tag by default. | ||
3. Review the corresponding release notes in [Opentelemetry eBPF](https://github.com/open-telemetry/opentelemetry-ebpf/releases). If any changes affect the helm charts, adjust the helm chart accordingly. | ||
4. Run `make generate-examples CHARTS=opentelemetry-ebpf`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
apiVersion: v2 | ||
name: opentelemetry-ebpf | ||
version: 0.1.0 | ||
description: OpenTelemetry eBPF Helm chart for Kubernetes | ||
type: application | ||
home: https://opentelemetry.io/ | ||
sources: | ||
- https://github.com/open-telemetry/opentelemetry-ebpf | ||
maintainers: | ||
- name: dmitryax | ||
- name: TylerHelmuth | ||
- name: nicolastakashi | ||
icon: https://opentelemetry.io/img/logos/opentelemetry-logo-nav.png | ||
appVersion: v0.10.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# OpenTelemetry Collector eBPF Helm Chart | ||
|
||
The helm chart installs [OpenTelemetry eBPF](https://github.com/open-telemetry/opentelemetry-ebpf) | ||
in kubernetes cluster. | ||
|
||
## Prerequisites | ||
|
||
- Kubernetes 1.24+ | ||
- Helm 3.9+ | ||
|
||
## Installing the Chart | ||
|
||
Add OpenTelemetry Helm repository: | ||
|
||
```console | ||
helm repo add open-telemetry https://open-telemetry.github.io/opentelemetry-helm-charts | ||
``` | ||
|
||
To install the chart with the release name my-opentelemetry-ebpf, run the following command: | ||
|
||
```console | ||
helm install my-opentelemetry-ebpf open-telemetry/opentelemetry-ebpf | ||
``` | ||
|
||
### Other configuration options | ||
|
||
The [values.yaml](./values.yaml) file contains information about all other configuration | ||
options for this chart. | ||
|
||
For more examples see [Examples](examples). |
44 changes: 44 additions & 0 deletions
44
charts/opentelemetry-ebpf/examples/cloud-collector/rendered/cloud-collector-deployment.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
--- | ||
# Source: opentelemetry-ebpf/templates/cloud-collector-deployment.yaml | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: example-opentelemetry-ebpf-cloud-collector | ||
labels: | ||
helm.sh/chart: opentelemetry-ebpf-0.1.0 | ||
app.kubernetes.io/name: opentelemetry-ebpf | ||
app.kubernetes.io/instance: example | ||
app.kubernetes.io/version: "v0.10.0" | ||
app.kubernetes.io/managed-by: Helm | ||
spec: | ||
progressDeadlineSeconds: 600 | ||
replicas: 1 | ||
revisionHistoryLimit: 3 | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/name: example-opentelemetry-ebpf-cloud-collector | ||
app.kubernetes.io/instance: example | ||
strategy: | ||
type: RollingUpdate | ||
template: | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: example-opentelemetry-ebpf-cloud-collector | ||
app.kubernetes.io/instance: example | ||
spec: | ||
containers: | ||
- name: cloud-collector | ||
image: "otel/opentelemetry-ebpf-cloud-collector:v0.10.0" | ||
imagePullPolicy: IfNotPresent | ||
args: | ||
- --warning | ||
env: | ||
- name: "EBPF_NET_CLUSTER_NAME" | ||
value: "" | ||
- name: "EBPF_NET_INTAKE_HOST" | ||
value: example-opentelemetry-ebpf-reducer | ||
- name: "EBPF_NET_INTAKE_PORT" | ||
value: "7000" | ||
terminationGracePeriodSeconds: 30 | ||
securityContext: {} | ||
serviceAccountName: example-opentelemetry-ebpf-cloud-collector |
12 changes: 12 additions & 0 deletions
12
.../opentelemetry-ebpf/examples/cloud-collector/rendered/cloud-collector-serviceaccount.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
# Source: opentelemetry-ebpf/templates/cloud-collector-serviceaccount.yaml | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: example-opentelemetry-ebpf-cloud-collector | ||
labels: | ||
helm.sh/chart: opentelemetry-ebpf-0.1.0 | ||
app.kubernetes.io/name: opentelemetry-ebpf | ||
app.kubernetes.io/instance: example | ||
app.kubernetes.io/version: "v0.10.0" | ||
app.kubernetes.io/managed-by: Helm |
16 changes: 16 additions & 0 deletions
16
charts/opentelemetry-ebpf/examples/cloud-collector/rendered/configmap.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
# Source: opentelemetry-ebpf/templates/configmap.yaml | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: example-opentelemetry-ebpf-config | ||
labels: | ||
helm.sh/chart: opentelemetry-ebpf-0.1.0 | ||
app.kubernetes.io/name: opentelemetry-ebpf | ||
app.kubernetes.io/instance: example | ||
app.kubernetes.io/version: "v0.10.0" | ||
app.kubernetes.io/managed-by: Helm | ||
data: | ||
config.yaml: | | ||
labels: | ||
environment: "" |
29 changes: 29 additions & 0 deletions
29
charts/opentelemetry-ebpf/examples/cloud-collector/rendered/k8s-collector-clusterrole.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
# Source: opentelemetry-ebpf/templates/k8s-collector-clusterrole.yaml | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
name: example-opentelemetry-ebpf-k8s-collector | ||
labels: | ||
helm.sh/chart: opentelemetry-ebpf-0.1.0 | ||
app.kubernetes.io/name: opentelemetry-ebpf | ||
app.kubernetes.io/instance: example | ||
app.kubernetes.io/version: "v0.10.0" | ||
app.kubernetes.io/managed-by: Helm | ||
rules: | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- pods | ||
verbs: | ||
- get | ||
- list | ||
- watch | ||
- apiGroups: | ||
- apps | ||
resources: | ||
- replicasets | ||
verbs: | ||
- get | ||
- list | ||
- watch |
20 changes: 20 additions & 0 deletions
20
...pentelemetry-ebpf/examples/cloud-collector/rendered/k8s-collector-clusterrolebinding.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
# Source: opentelemetry-ebpf/templates/k8s-collector-clusterrolebinding.yaml | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: example-opentelemetry-ebpf-k8s-collector | ||
labels: | ||
helm.sh/chart: opentelemetry-ebpf-0.1.0 | ||
app.kubernetes.io/name: opentelemetry-ebpf | ||
app.kubernetes.io/instance: example | ||
app.kubernetes.io/version: "v0.10.0" | ||
app.kubernetes.io/managed-by: Helm | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: example-opentelemetry-ebpf-k8s-collector | ||
subjects: | ||
- kind: ServiceAccount | ||
name: example-opentelemetry-ebpf-k8s-collector | ||
namespace: default |
75 changes: 75 additions & 0 deletions
75
charts/opentelemetry-ebpf/examples/cloud-collector/rendered/k8s-collector-deployment.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
--- | ||
# Source: opentelemetry-ebpf/templates/k8s-collector-deployment.yaml | ||
# The k8s-collector consists of two services: | ||
# 1) k8s-watcher: talks to the Kubernetes API server to determine the current state of | ||
# the cluster; sets up watches to be notified of subsequent changes to pods, services | ||
# and other resources. | ||
# 2) k8s-relay: relays the information collected by k8s-watcher to the reducer. | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: example-opentelemetry-ebpf-k8s-collector | ||
labels: | ||
helm.sh/chart: opentelemetry-ebpf-0.1.0 | ||
app.kubernetes.io/name: opentelemetry-ebpf | ||
app.kubernetes.io/instance: example | ||
app.kubernetes.io/version: "v0.10.0" | ||
app.kubernetes.io/managed-by: Helm | ||
spec: | ||
progressDeadlineSeconds: 600 | ||
replicas: 1 | ||
revisionHistoryLimit: 3 | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/name: example-opentelemetry-ebpf-k8s-collector | ||
app.kubernetes.io/instance: example | ||
strategy: | ||
type: RollingUpdate | ||
template: | ||
metadata: | ||
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 | ||
labels: | ||
app.kubernetes.io/name: example-opentelemetry-ebpf-k8s-collector | ||
app.kubernetes.io/instance: example | ||
spec: | ||
containers: | ||
- name: k8s-watcher | ||
image: "otel/opentelemetry-ebpf-k8s-watcher:v0.10.0" | ||
imagePullPolicy: IfNotPresent | ||
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. | ||
- name: k8s-relay | ||
image: "otel/opentelemetry-ebpf-k8s-relay:v0.10.0" | ||
imagePullPolicy: IfNotPresent | ||
args: | ||
- --config-file=/etc/network-explorer/config.yaml | ||
- --warning | ||
env: | ||
- name: "EBPF_NET_CLUSTER_NAME" | ||
value: "" | ||
- name: "EBPF_NET_INTAKE_HOST" | ||
value: example-opentelemetry-ebpf-reducer | ||
- name: "EBPF_NET_INTAKE_PORT" | ||
value: "7000" | ||
volumeMounts: | ||
- mountPath: /etc/network-explorer | ||
name: k8s-relay-config | ||
terminationGracePeriodSeconds: 30 | ||
volumes: | ||
- name: k8s-relay-config | ||
projected: | ||
sources: | ||
- configMap: | ||
name: example-opentelemetry-ebpf-config | ||
items: | ||
- key: config.yaml | ||
path: config.yaml | ||
securityContext: {} | ||
serviceAccountName: example-opentelemetry-ebpf-k8s-collector |
12 changes: 12 additions & 0 deletions
12
...ts/opentelemetry-ebpf/examples/cloud-collector/rendered/k8s-collector-serviceaccount.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
# Source: opentelemetry-ebpf/templates/k8s-collector-serviceaccount.yaml | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: example-opentelemetry-ebpf-k8s-collector | ||
labels: | ||
helm.sh/chart: opentelemetry-ebpf-0.1.0 | ||
app.kubernetes.io/name: opentelemetry-ebpf | ||
app.kubernetes.io/instance: example | ||
app.kubernetes.io/version: "v0.10.0" | ||
app.kubernetes.io/managed-by: Helm |
21 changes: 21 additions & 0 deletions
21
...ts/opentelemetry-ebpf/examples/cloud-collector/rendered/kernel-collector-clusterrole.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
# Source: opentelemetry-ebpf/templates/kernel-collector-clusterrole.yaml | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
name: example-opentelemetry-ebpf-kernel-collector | ||
labels: | ||
helm.sh/chart: opentelemetry-ebpf-0.1.0 | ||
app.kubernetes.io/name: opentelemetry-ebpf | ||
app.kubernetes.io/instance: example | ||
app.kubernetes.io/version: "v0.10.0" | ||
app.kubernetes.io/managed-by: Helm | ||
rules: | ||
- apiGroups: | ||
- policy | ||
resourceNames: | ||
- example-opentelemetry-ebpf-kernel-collector | ||
resources: | ||
- podsecuritypolicies | ||
verbs: | ||
- use |
20 changes: 20 additions & 0 deletions
20
...telemetry-ebpf/examples/cloud-collector/rendered/kernel-collector-clusterrolebinding.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
# Source: opentelemetry-ebpf/templates/kernel-collector-clusterrolebinding.yaml | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: example-opentelemetry-ebpf-kernel-collector | ||
labels: | ||
helm.sh/chart: opentelemetry-ebpf-0.1.0 | ||
app.kubernetes.io/name: opentelemetry-ebpf | ||
app.kubernetes.io/instance: example | ||
app.kubernetes.io/version: "v0.10.0" | ||
app.kubernetes.io/managed-by: Helm | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: example-opentelemetry-ebpf-kernel-collector | ||
subjects: | ||
- kind: ServiceAccount | ||
name: example-opentelemetry-ebpf-kernel-collector | ||
namespace: default |
Oops, something went wrong.