Skip to content

Commit

Permalink
Add alaz
Browse files Browse the repository at this point in the history
  • Loading branch information
fatihbaltaci committed Aug 28, 2023
1 parent 24c3585 commit db05606
Show file tree
Hide file tree
Showing 9 changed files with 223 additions and 0 deletions.
23 changes: 23 additions & 0 deletions charts/alaz/.helmignore
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/
24 changes: 24 additions & 0 deletions charts/alaz/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: v2
name: alaz
description: Alaz is an open-source Ddosify eBPF agent that can inspect and collect Kubernetes (K8s) service traffic without the need for code instrumentation, sidecars, or service restarts. This is possible due to its use of eBPF technology. Alaz can create a Service Map that helps identify golden signals and problems like high latencies, 5xx errors, zombie services, SQL queries. Additionally, it can gather system information and resources via the Prometheus Node Exporter, which is readily available on the agent.

# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "0.1.0"
3 changes: 3 additions & 0 deletions charts/alaz/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
This is a Helm Chart for the Alaz - Ddosify eBPF Agent

Alaz is an open-source Ddosify eBPF agent that can inspect and collect Kubernetes (K8s) service traffic without the need for code instrumentation, sidecars, or service restarts. This is possible due to its use of eBPF technology. Alaz can create a Service Map that helps identify golden signals and problems like high latencies, 5xx errors, zombie services, SQL queries. Additionally, it can gather system information and resources via the Prometheus Node Exporter, which is readily available on the agent.
62 changes: 62 additions & 0 deletions charts/alaz/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "alaz.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 "alaz.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 }}

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

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

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

{{/*
Create the name of the service account to use
*/}}
{{- define "alaz.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "alaz.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}
19 changes: 19 additions & 0 deletions charts/alaz/templates/clusterrole.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: alaz-role
namespace: {{ .Values.namespace }}
rules:
- apiGroups:
- "*"
resources:
- pods
- services
- endpoints
- replicasets
- deployments
- daemonsets
verbs:
- "get"
- "list"
- "watch"
13 changes: 13 additions & 0 deletions charts/alaz/templates/clusterrolebinding.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: alaz-role-binding
namespace: {{ .Values.namespace }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: alaz-role
subjects:
- kind: ServiceAccount
name: alaz-serviceaccount
namespace: {{ .Values.namespace }}
69 changes: 69 additions & 0 deletions charts/alaz/templates/daemonset.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: alaz-daemonset
namespace: {{ .Values.namespace }}
spec:
selector:
matchLabels:
app: alaz
template:
metadata:
labels:
app: alaz
spec:
hostPID: true
containers:
- env:
- name: METRICS_BACKEND
value: "true"
- name: BACKEND_HOST
value: {{ .Values.backendHost }}
- name: LOG_LEVEL
value: "{{ .Values.logLevel }}"
- name: MONITORING_ID
value: {{ .Values.monitoringID }}
- name: NODE_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: spec.nodeName
args:
- --no-collector.wifi
- --no-collector.hwmon
- --collector.filesystem.ignored-mount-points=^/(dev|proc|sys|var/lib/docker/.+|var/lib/kubelet/pods/.+)($|/)
- --collector.netclass.ignored-devices=^(veth.*)$
image: ddosify/alaz:v0.1.0
imagePullPolicy: IfNotPresent
name: alaz-pod
ports:
- containerPort: 8181
protocol: TCP
resources:
limits:
cpu: "1"
memory: 1Gi
requests:
cpu: 500m
memory: 400Mi
securityContext:
privileged: true
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
# needed for linking ebpf trace programs
volumeMounts:
- mountPath: /sys/kernel/debug
name: debugfs
readOnly: false
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
serviceAccount: alaz-serviceaccount
serviceAccountName: alaz-serviceaccount
terminationGracePeriodSeconds: 30
# needed for linking ebpf trace programs
volumes:
- name: debugfs
hostPath:
path: /sys/kernel/debug
5 changes: 5 additions & 0 deletions charts/alaz/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: alaz-serviceaccount
namespace: {{ .Values.namespace }}
5 changes: 5 additions & 0 deletions charts/alaz/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace: ddosify

backendHost: https://api.ddosify.com:443
monitoringID: <monitoringID>
logLevel: 1 # zero log levels: -1: trace, 0: debug, 1: info, 2: warn, 3: error, 4: fatal, 5: panic

0 comments on commit db05606

Please sign in to comment.