Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Helm chart #642

Merged
merged 63 commits into from
Apr 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
82976cc
test
khushijain21 Feb 22, 2024
557efec
Merge pull request #1 from nokia/helm-102
Feb 22, 2024
9a58581
chart.yaml
khushijain21 Feb 22, 2024
5b3c576
service-account
khushijain21 Feb 22, 2024
7a2e0e2
after helm create
khushijain21 Feb 22, 2024
e62e38d
Merge pull request #2 from nokia/helm-102
Feb 22, 2024
5e987ff
adding rbac with changes for labels and annotations
wasim-nihal Feb 22, 2024
b9f1558
adding rbac with changes for labels and annotations
wasim-nihal Feb 22, 2024
97ed5bc
adding rbac with changes for labels and annotations
wasim-nihal Feb 22, 2024
5666264
adding rbac with changes for labels and annotations
wasim-nihal Feb 22, 2024
7ba9686
test
khushijain21 Feb 22, 2024
632f31c
service-account
khushijain21 Feb 22, 2024
f1e31e9
after helm create
khushijain21 Feb 22, 2024
d032b98
adding rbac with changes for labels and annotations
wasim-nihal Feb 22, 2024
f75ac95
Replace BEYLA_OTEL_USE_EXPONENTIAL_HISTOGRAMS by standard environment…
mariomac Feb 22, 2024
32223dc
Automatic update of offsets.json (#639)
github-actions[bot] Feb 22, 2024
a901739
Fix missing go_trace_map cleanup (#638)
grcevski Feb 22, 2024
e037188
Merge branch 'grafana:main' into helm-chart
Feb 23, 2024
4fa2007
add release namespace
khushijain21 Feb 23, 2024
1b26750
Update cluster-role.yaml
Feb 23, 2024
8e7bf8b
Update cluster-role-binding.yaml
Feb 23, 2024
b1332f6
values.yaml
Feb 23, 2024
d9f0ac9
configmap and env
Feb 23, 2024
5c5cace
secret ref
Feb 23, 2024
5f864ac
values.yaml
Feb 23, 2024
b2879a6
Update configmap.yaml
Feb 23, 2024
ca8621c
Update configmap.yaml
Feb 23, 2024
e9ec4ab
Update values.yaml
Feb 23, 2024
2d05fc2
Update configmap.yaml
Feb 23, 2024
7c05f61
Merge pull request #6 from nokia/helm-102
Feb 23, 2024
b325729
values.yaml
Feb 23, 2024
d3e6ab4
configmap and daemonset changes
Feb 26, 2024
9e0c4e6
101
Feb 26, 2024
bee8909
changed existing configmap
Feb 26, 2024
20cf6b7
clusterolebinding
Feb 26, 2024
e317ccb
Update cluster-role-binding.yaml
Feb 26, 2024
ffe8419
Merge branch 'helm-chart' of https://github.com/nokia/beyla into helm…
Feb 26, 2024
ee0c643
added comments for external configmap
Feb 26, 2024
2123de5
Merge pull request #7 from nokia/helm-102
Feb 26, 2024
2e87a38
Merge branch 'helm-chart' of github.com:nokia/beyla into helm-101
wasim-nihal Feb 26, 2024
c2006bc
adding k8s service in helm chart to expose internal beyla metrics.
wasim-nihal Feb 26, 2024
4e847c9
Merge branch 'grafana:main' into helm-chart
Feb 27, 2024
f754ef8
affinity, updatestrategy, tolerations ...
Feb 27, 2024
f1f97ee
Merge pull request #9 from nokia/helm-102
Feb 29, 2024
c3c3e66
rebasing
wasim-nihal Feb 29, 2024
0fd2bdd
Update values.yaml
wasim-nihal Feb 29, 2024
93a3258
Merge pull request #8 from nokia/helm-101
wasim-nihal Feb 29, 2024
11d8d02
Delete deployments/helm/templates/tests/test-connection.yaml
Feb 29, 2024
3cbd2f8
Update values.yaml
khushijain21 Mar 12, 2024
cf99dc5
Update values.yaml
khushijain21 Mar 12, 2024
de676a6
Delete deployments/helm/templates/NOTES.txt
khushijain21 Mar 17, 2024
c19a0d0
add readme
Mar 17, 2024
6ec975c
Merge pull request #10 from nokia/helm-102
khushijain21 Mar 17, 2024
700dc1e
Merge branch 'helm-chart' of https://github.com/nokia/beyla into helm…
Mar 17, 2024
cd6561b
remove autoscaling
Mar 17, 2024
94a5043
remove autoscaling
Mar 17, 2024
0a675fb
Merge branch 'helm-chart' of https://github.com/nokia/beyla into helm…
Mar 17, 2024
2968217
remove ingress, update configmap
Mar 26, 2024
cf90a9d
Merge branch 'grafana:main' into helm-chart
khushijain21 Mar 26, 2024
0fe26ea
remove all ingress changes
Mar 26, 2024
b35d7b2
Merge branch 'helm-chart' of https://github.com/nokia/beyla into helm…
Mar 26, 2024
785c8f2
Merge branch 'main' of github.com:grafana/beyla into helm-chart
wasim-nihal Mar 28, 2024
6c266ea
addressed review comments
wasim-nihal Mar 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions deployments/helm/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# 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/
.github
12 changes: 12 additions & 0 deletions deployments/helm/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: v2
name: beyla
version: 0.1.0
appVersion: 1.2.0
description: eBPF-based autoinstrumentation of HTTP and HTTPS services
sources:
- https://github.com/grafana/beyla
type: application
keywords:
- observability
- autoinstrumentation
- eBPF-based
61 changes: 61 additions & 0 deletions deployments/helm/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# beyla

![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.2.0](https://img.shields.io/badge/AppVersion-1.2.0-informational?style=flat-square)

eBPF-based autoinstrumentation of HTTP and HTTPS services

## Source Code

* <https://github.com/grafana/beyla>

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| affinity | object | `{}` | used for scheduling of pods based on affinity rules |
| config.create | bool | `true` | set to true, to use the below default configurations |
| config.data | object | `{"attributes":{"kubernetes":{"enable":true}},"discovery":{"services":[{"k8s_namespace":"."}]},"prometheus_export":{"path":"/metrics","port":9090}}` | default value of beyla configuration |
| config.name | string | `""` | |
| env | object | `{"BEYLA_PRINT_TRACES":"true"}` | extra environment variables |
| envValueFrom | object | `{}` | extra environment variables to be set from resources such as k8s configMaps/secrets |
| fullnameOverride | string | `""` | Overrides the chart's computed fullname. |
| global.image.pullSecrets | list | `[]` | Optional set of global image pull secrets. |
| global.image.registry | string | `""` | Global image registry to use if it needs to be overridden for some specific use cases (e.g local registries, custom images, ...) |
| image.digest | string | `nil` | Beyla image's SHA256 digest (either in format "sha256:XYZ" or "XYZ"). When set, will override `image.tag`. |
| image.pullPolicy | string | `"IfNotPresent"` | Beyla image pull policy. |
| image.pullSecrets | list | `[]` | Optional set of image pull secrets. |
| image.registry | string | `"docker.io"` | Beyla image registry (defaults to docker.io) |
| image.repository | string | `"grafana/beyla"` | Beyla image repository. |
| image.tag | string | `nil` | Beyla image tag. When empty, the Chart's appVersion is used. |
| nameOverride | string | `""` | Overrides the chart's name |
| namespaceOverride | string | `""` | Override the deployment namespace |
| nodeSelector | object | `{}` | The nodeSelector field allows user to constrain which nodes your DaemonSet pods are scheduled to based on labels on the node |
| podSecurityContext | object | `{}` | |
| rbac.create | bool | `true` | Whether to create RBAC resources for Belya |
| rbac.extraClusterRoleRules | list | `[]` | Extra custer roles to be created for Belya |
| resources | object | `{}` | |
| securityContext | object | `{}` | |
| service.annotations | object | `{}` | Service annotations. |
| service.appProtocol | string | `""` | Adds the appProtocol field to the service. This allows to work with istio protocol selection. Ex: "http" or "tcp" |
| service.clusterIP | string | `""` | cluster IP |
| service.enabled | bool | `true` | whether to create a service for internal metrics |
| service.labels | object | `{}` | Service labels. |
| service.loadBalancerClass | string | `""` | loadbalancer class name |
| service.loadBalancerIP | string | `""` | loadbalancer IP |
| service.loadBalancerSourceRanges | list | `[]` | source ranges for loadbalancer |
| service.port | int | `80` | service port |
| service.portName | string | `"service"` | name of the port for internal metrics service. |
| service.targetPort | int | `9090` | targetPort has to be configured based on the values of `BEYLA_INTERNAL_METRICS_PROMETHEUS_PORT` environment variable or the value of `prometheus_export.port` from beyla configuration file. see more at https://grafana.com/docs/beyla/latest/configure/options/#internal-metrics-reporter |
| service.type | string | `"ClusterIP"` | type of the service |
| serviceAccount.annotations | object | `{}` | Annotations to add to the service account |
| serviceAccount.automount | bool | `true` | Automatically mount a ServiceAccount's API credentials? |
| serviceAccount.create | bool | `true` | Specifies whether a service account should be created |
| serviceAccount.labels | object | `{}` | ServiceAccount labels. |
| serviceAccount.name | string | `""` | The name of the service account to use. If not set and create is true, a name is generated using the fullname template |
| tolerations | list | `[]` | Tolerations allow pods to be scheduled on nodes with specific taints |
| updateStrategy.type | string | `"RollingUpdate"` | update strategy type |
| volumeMounts | list | `[]` | Additional volumeMounts on the output Deployment definition. |
| volumes | list | `[]` | Additional volumes on the output daemonset definition. |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1)
92 changes: 92 additions & 0 deletions deployments/helm/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "beyla.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "beyla.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- end }}

{{/*
Allow the release namespace to be overridden for multi-namespace deployments in combined charts
*/}}
{{- define "beyla.namespace" -}}
{{- if .Values.namespaceOverride }}
{{- .Values.namespaceOverride }}
{{- else }}
{{- .Release.Namespace }}
{{- end }}
{{- end }}


{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "beyla.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Common labels
*/}}
{{- define "beyla.labels" -}}
helm.sh/chart: {{ include "beyla.chart" . }}
{{ include "beyla.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{/*
Selector labels
*/}}
{{- define "beyla.selectorLabels" -}}
app.kubernetes.io/name: {{ include "beyla.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Create the name of the service account to use
*/}}
{{- define "beyla.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "beyla.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}


{{/*
Calculate name of image ID to use for "beyla".
*/}}
{{- define "beyla.imageId" -}}
{{- if .Values.image.digest }}
{{- $digest := .Values.image.digest }}
{{- if not (hasPrefix "sha256:" $digest) }}
{{- $digest = printf "sha256:%s" $digest }}
{{- end }}
{{- printf "@%s" $digest }}
{{- else if .Values.image.tag }}
{{- printf ":%s" .Values.image.tag }}
{{- else }}
{{- printf ":%s" .Chart.AppVersion }}
{{- end }}
{{- end }}
20 changes: 20 additions & 0 deletions deployments/helm/templates/cluster-role-binding.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{{- if .Values.rbac.create }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ include "beyla.fullname" . }}
labels:
{{- include "beyla.labels" . | nindent 4 }}
{{- with .Values.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
subjects:
- kind: ServiceAccount
name: {{ include "beyla.serviceAccountName" . }}
namespace: {{ include "beyla.namespace" .}}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: {{ include "beyla.fullname" . }}
{{- end }}
22 changes: 22 additions & 0 deletions deployments/helm/templates/cluster-role.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{{- if .Values.rbac.create }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ include "beyla.fullname" . }}
labels:
{{- include "beyla.labels" . | nindent 4 }}
{{- with .Values.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
rules:
- apiGroups: ["apps"]
resources: ["replicasets"]
verbs: ["list", "watch"]
- apiGroups: [""]
resources: ["pods"]
verbs: ["list", "watch"]
{{- with .Values.rbac.extraClusterRoleRules }}
{{- toYaml . | nindent 2 }}
{{- end}}
{{- end }}
19 changes: 19 additions & 0 deletions deployments/helm/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{{- if and (not .Values.config.create) (eq .Values.config.name "") }}
{{- fail "if .Values.config.name is not set, then .Values.config.create should be set to true to use default configuration" }}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤩

{{- end }}
{{- if and (.Values.config.create) (eq .Values.config.name "") }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "beyla.fullname" . }}
namespace: {{ include "beyla.namespace" . }}
labels:
{{- include "beyla.labels" . | nindent 4 }}
{{- with .Values.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
data:
beyla-config.yml: |
{{- toYaml .Values.config.data | nindent 4}}
{{- end }}
76 changes: 76 additions & 0 deletions deployments/helm/templates/daemon-set.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: {{ include "beyla.fullname" . }}
namespace: {{ include "beyla.namespace" .}}
labels:
{{- include "beyla.labels" . | nindent 4 }}
{{- with .Values.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
selector:
matchLabels:
{{ include "beyla.selectorLabels" . | indent 6 }}
{{- with .Values.updateStrategy }}
updateStrategy:
{{- toYaml . | trim | nindent 4 }}
{{- end }}
template:
metadata:
labels:
{{ include "beyla.selectorLabels" . | indent 8 }}
spec:
{{- if .Values.serviceAccount.create }}
serviceAccountName: {{ include "beyla.serviceAccountName" . }}
{{- end }}
hostPID: true #important!
containers:
- name: beyla
image: {{ .Values.global.image.registry | default .Values.image.registry }}/{{ .Values.image.repository }}{{ include "beyla.imageId" . }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
securityContext:
privileged: true
ports:
- containerPort: {{ .Values.service.targetPort }}
protocol: TCP
env:
- name: BEYLA_CONFIG_PATH
value: "/etc/beyla/config/beyla-config.yml"
{{- range $key, $value := .Values.env }}
- name: {{ $key }}
value: "{{ $value }}"
{{- end }}
{{- range $key, $value := .Values.envValueFrom }}
- name: {{ $key | quote }}
valueFrom:
{{- tpl (toYaml $value) $ | nindent 16 }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- tpl (toYaml .) $ | nindent 12 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 12 }}
{{- end }}
volumeMounts:
- mountPath: /etc/beyla/config
name: beyla-config
{{- if or .Values.global.image.pullSecrets .Values.image.pullSecrets }}
imagePullSecrets:
{{- if .Values.global.image.pullSecrets }}
{{- toYaml .Values.global.image.pullSecrets | nindent 4 }}
{{- else }}
{{- toYaml .Values.image.pullSecrets | nindent 4 }}
{{- end }}
{{- end }}
volumes:
- name: beyla-config
configMap:
name: {{ default (include "beyla.fullname" .) .Values.config.name }}
58 changes: 58 additions & 0 deletions deployments/helm/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{{- if .Values.service.enabled }}
{{- $root := . }}
apiVersion: v1
kind: Service
metadata:
name: {{ include "beyla.fullname" . }}
namespace: {{ include "beyla.namespace" .}}
labels:
{{- include "beyla.labels" . | nindent 4 }}
{{- with .Values.service.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.service.annotations }}
annotations:
{{- tpl (toYaml . | nindent 4) $root }}
{{- end }}
spec:
{{- if (or (eq .Values.service.type "ClusterIP") (empty .Values.service.type)) }}
type: ClusterIP
{{- with .Values.service.clusterIP }}
clusterIP: {{ . }}
{{- end }}
{{- else if eq .Values.service.type "LoadBalancer" }}
type: LoadBalancer
{{- with .Values.service.loadBalancerIP }}
loadBalancerIP: {{ . }}
{{- end }}
{{- with .Values.service.loadBalancerClass }}
loadBalancerClass: {{ . }}
{{- end }}
{{- with .Values.service.loadBalancerSourceRanges }}
loadBalancerSourceRanges:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- else }}
type: {{ .Values.service.type }}
{{- end }}
{{- with .Values.service.externalIPs }}
externalIPs:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.service.externalTrafficPolicy }}
externalTrafficPolicy: {{ . }}
{{- end }}
ports:
- name: {{ .Values.service.portName }}
port: {{ .Values.service.port }}
protocol: TCP
targetPort: {{ .Values.service.targetPort }}
{{- with .Values.service.appProtocol }}
appProtocol: {{ . }}
{{- end }}
{{- if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.nodePort))) }}
nodePort: {{ .Values.service.nodePort }}
{{- end }}
selector:
{{- include "beyla.selectorLabels" . | nindent 4 }}
{{- end }}
Loading
Loading