added repo

This commit is contained in:
Your Name
2026-08-26 03:39:42 +05:30
parent 45c25a95af
commit b8575bb8b9
6889 changed files with 1217125 additions and 0 deletions
@@ -0,0 +1,61 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "node-agent.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 "node-agent.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 "node-agent.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Common labels
*/}}
{{- define "node-agent.labels" -}}
helm.sh/chart: {{ include "node-agent.chart" . }}
{{ include "node-agent.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}
{{/*
Selector labels
*/}}
{{- define "node-agent.selectorLabels" -}}
app.kubernetes.io/name: {{ include "node-agent.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
{{/*
Affinity for pod assignment
*/}}
{{- define "node-agent.affinity" -}}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 2 }}
{{- end }}
{{- end }}
@@ -0,0 +1,105 @@
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: {{ include "node-agent.fullname" . }}
labels:
{{- include "node-agent.labels" . | nindent 4 }}
spec:
{{- with .Values.updateStrategy }}
updateStrategy:
{{- toYaml . | nindent 4 }}
{{- end }}
selector:
matchLabels:
{{- include "node-agent.selectorLabels" . | nindent 6 }}
template:
metadata:
labels:
{{- include "node-agent.selectorLabels" . | nindent 8 }}
app: coroot-node-agent
annotations:
prometheus.io/scrape: '{{ .Values.scrape | default true}}'
prometheus.io/port: '{{ .Values.port }}'
{{- if .Values.podAnnotations }}
{{- toYaml .Values.podAnnotations | nindent 8 }}
{{- end }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- include "node-agent.affinity" . | nindent 6 }}
{{- if .Values.tolerations }}
tolerations: {{ toYaml .Values.tolerations | nindent 8 }}
{{- end }}
priorityClassName: {{ .Values.priorityClassName }}
hostPID: true
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
command: ["coroot-node-agent", "--listen=0.0.0.0:{{ .Values.port }}", "--cgroupfs-root", "/host/sys/fs/cgroup"]
imagePullPolicy: {{ .Values.image.pullPolicy }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
env:
{{- if .Values.collectorEndpoint }}
- name: COLLECTOR_ENDPOINT
value: "{{ .Values.collectorEndpoint }}"
{{- end }}
{{- if .Values.apiKey }}
- name: API_KEY
value: "{{ .Values.apiKey }}"
{{- end }}
{{- if .Values.tracesEndpoint }}
- name: TRACES_ENDPOINT
value: "{{ .Values.tracesEndpoint }}"
{{- end }}
{{- if .Values.logsEndpoint }}
- name: LOGS_ENDPOINT
value: "{{ .Values.logsEndpoint }}"
{{- end }}
{{- if .Values.profilesEndpoint }}
- name: PROFILES_ENDPOINT
value: "{{ .Values.profilesEndpoint }}"
{{- end }}
{{- if .Values.metricsEndpoint }}
- name: METRICS_ENDPOINT
value: "{{ .Values.metricsEndpoint }}"
{{- end }}
{{- if .Values.scrapeInterval }}
- name: SCRAPE_INTERVAL
value: "{{ .Values.scrapeInterval }}"
{{- end }}
{{- with .Values.env }}
{{- . | toYaml | nindent 12 }}
{{- end }}
ports:
- containerPort: {{ .Values.port }}
name: http
securityContext:
privileged: true
volumeMounts:
- mountPath: /host/sys/fs/cgroup
name: cgroupfs
readOnly: true
- mountPath: /sys/kernel/tracing
name: tracefs
readOnly: false
- mountPath: /sys/kernel/debug
name: debugfs
readOnly: false
- mountPath: /tmp
name: tmp
readOnly: false
volumes:
- hostPath:
path: /sys/fs/cgroup
name: cgroupfs
- hostPath:
path: /sys/kernel/tracing
name: tracefs
- hostPath:
path: /sys/kernel/debug
name: debugfs
- emptyDir: {}
name: tmp