re-add netdata 1.0.40 (#2173)

* re-add netdata 1.0.40

* make ci happy
This commit is contained in:
Stavros Kois
2024-02-16 11:21:47 +02:00
committed by GitHub
parent 431e5d781b
commit acf1ed5835
20 changed files with 641 additions and 1 deletions

View File

@@ -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
*~
# Various IDEs
.project
.idea/
*.tmproj
# OWNERS file for Kubernetes
OWNERS

View File

@@ -0,0 +1,6 @@
dependencies:
- name: common
repository: file://../../../common/2304.0.1
version: 2304.0.1
digest: sha256:1ed155c6760e1166e2cb75b52bc5e81c6bdf0252c16ff5ede001157077c41670
generated: "2023-04-24T13:40:33.182127877+03:00"

View File

@@ -0,0 +1,26 @@
name: netdata
description: Real-time performance monitoring, done right!
annotations:
title: Netdata
type: application
version: 1.0.40
apiVersion: v2
appVersion: v1.44.1
kubeVersion: '>=1.16.0-0'
maintainers:
- name: truenas
url: https://www.truenas.com/
email: dev@ixsystems.com
dependencies:
- name: common
repository: file://../../../common/2304.0.1
version: 2304.0.1
home: https://www.netdata.cloud/
icon: https://media.sys.truenas.net/apps/netdata/icons/icon.png
sources:
- https://github.com/netdata/helmchart
- https://github.com/netdata/netdata
keywords:
- alerting
- metric
- monitoring

10
charts/netdata/1.0.40/README.md Executable file
View File

@@ -0,0 +1,10 @@
Netdata
=====
[Netdata](https://www.netdata.cloud/) is a fast, easy monitoring and troubleshooting system.
Introduction
------------
This chart bootstraps Netdata deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.

View File

@@ -0,0 +1 @@
[Netdata](https://www.netdata.cloud/) is a fast, easy monitoring and troubleshooting system.

Binary file not shown.

View File

@@ -0,0 +1,38 @@
appVolumeMounts:
netdatacache:
emptyDir: true
mountPath: /var/cache/netdata
netdataconfig:
emptyDir: true
mountPath: /etc/netdata
netdatalib:
emptyDir: true
mountPath: /var/lib/netdata
dnsConfig:
options: []
environmentVariables: []
extraAppVolumeMounts: []
global:
ixChartContext:
isInstall: true
isUpdate: false
isUpgrade: false
operation: INSTALL
storageClassName: ix-storage-class-netdata
upgradeMetadata: {}
ixCertificateAuthorities: {}
ixCertificates: {}
ixChartContext:
isInstall: true
isUpdate: false
isUpgrade: false
operation: INSTALL
storageClassName: ix-storage-class-netdata
upgradeMetadata: {}
ixExternalInterfacesConfiguration: []
ixExternalInterfacesConfigurationNames: []
ixVolumes: []
runAsGroup: 201
runAsUser: 201
service:
nodePort: 32189

View File

@@ -0,0 +1,6 @@
image:
pullPolicy: IfNotPresent
repository: netdata/netdata
tag: v1.44.1
runAsGroup: 201
runAsUser: 201

View File

@@ -0,0 +1,46 @@
runAsContext:
- userName: root
groupName: root
gid: 0
uid: 0
description: Netdata runs as root user.
capabilities:
- name: CHOWN
description: Netdata is able to chown files.
- name: FOWNER
description: Netdata is able to bypass permission checks for it's sub-processes.
- name: SYS_CHROOT
description: Netdata is able to use chroot.
- name: MKNOD
description: Netdata is able to create device nodes.
- name: DAC_OVERRIDE
description: Netdata is able to bypass permission checks.
- name: FSETID
description: Netdata is able to set file capabilities.
- name: KILL
description: Netdata is able to kill processes.
- name: SETGID
description: Netdata is able to set group ID for it's sub-processes.
- name: SETUID
description: Netdata is able to set user ID for it's sub-processes.
- name: SETPCAP
description: Netdata is able to set process capabilities.
- name: NET_BIND_SERVICE
description: Netdata is able to bind to privileged ports.
- name: NET_RAW
description: Netdata is able to use raw sockets.
- name: SETFCAP
description: Netdata is able to set file capabilities.
- name: PTRACE
description: Netdata is able to trace processes.
- name: AUDIT_WRITE
description: Netdata is able to write to audit log.
hostMounts:
- hostPath: /etc/os-release
description: Required to read the OS release information.
- hostPath: /etc/passwd
description: Required to read the user information.
- hostPath: /etc/group
description: Required to read the group information.
- hostPath: /proc
description: Required to read the processes information.

View File

@@ -0,0 +1,253 @@
groups:
- name: "Container Images"
description: "Image to be used for container"
- name: "Workload Configuration"
description: "Configure workload deployment"
- name: "Netdata Configuration"
description: "Configure Netdata credentials"
- name: "Storage"
description: "Configure Storage for Netdata"
- name: "Advanced DNS Settings"
description: "Configure DNS settings"
- name: "Resource Limits"
description: "Set CPU/memory limits for Kubernetes Pod"
portals:
web_portal:
protocols:
- "http"
host:
- "$node_ip"
ports:
- "$variable-service.nodePort"
questions:
- variable: dnsConfig
label: "DNS Configuration"
group: "Advanced DNS Settings"
schema:
type: dict
attrs:
- variable: options
label: "DNS Options"
schema:
type: list
items:
- variable: optionsEntry
label: "Option Entry Configuration"
schema:
type: dict
attrs:
- variable: name
label: "Option Name"
schema:
type: string
required: true
- variable: value
label: "Option Value"
schema:
type: string
required: true
- variable: environmentVariables
label: "Netdata image environment"
group: "Netdata Configuration"
schema:
type: list
default: []
items:
- variable: environmentVariable
label: "Environment Variable"
schema:
type: dict
attrs:
- variable: name
label: "Name"
schema:
type: string
- variable: value
label: "Value"
schema:
type: string
- variable: service
description: "Netdata Service Configuration"
label: "Netdata Service Configuration"
group: "Netdata Configuration"
schema:
type: dict
required: true
attrs:
- variable: nodePort
label: "Node Port to use for Netdata UI"
schema:
type: int
min: 9000
max: 65535
default: 20489
required: true
- variable: appVolumeMounts
label: "Netdata Storage"
group: "Storage"
schema:
type: dict
attrs:
- variable: netdataconfig
label: "Configuration Volume"
schema:
type: dict
attrs:
- variable: datasetName
label: "Configuration Volume Name"
schema:
type: string
hidden: true
$ref:
- "normalize/ixVolume"
show_if: [ [ "hostPathEnabled", "=", false ] ]
default: "ix-config"
editable: false
- variable: mountPath
label: "Configuration Mount Path"
description: "Path where the volume will be mounted inside the pod"
schema:
type: path
hidden: true
editable: false
default: "/etc/netdata"
- variable: hostPathEnabled
label: "Enable Host Path for Netdata Configuration Volume"
schema:
type: boolean
default: false
show_subquestions_if: true
subquestions:
- variable: hostPath
label: "Host Path for Netdata Configuration Volume"
schema:
type: hostpath
required: true
immutable: true
- variable: netdatacache
label: "Cache Volume"
schema:
type: dict
attrs:
- variable: datasetName
label: "Cache Volume Name"
schema:
type: string
hidden: true
$ref:
- "normalize/ixVolume"
show_if: [["hostPathEnabled", "=", false]]
default: "ix-cache"
editable: false
- variable: mountPath
label: "Cache Mount Path"
description: "Path where the volume will be mounted inside the pod"
schema:
type: path
hidden: true
editable: false
default: "/var/cache/netdata"
- variable: hostPathEnabled
label: "Enable Host Path for Netdata Cache Volume"
schema:
type: boolean
default: false
show_subquestions_if: true
subquestions:
- variable: hostPath
label: "Host Path for Netdata Cache Volume"
schema:
type: hostpath
required: true
immutable: true
- variable: netdatalib
label: "Netdata Library Volume"
schema:
type: dict
attrs:
- variable: datasetName
label: "Netdata Library Volume Name"
schema:
type: string
hidden: true
$ref:
- "normalize/ixVolume"
show_if: [ [ "hostPathEnabled", "=", false ] ]
default: "ix-lib"
editable: false
- variable: mountPath
label: "Netdata Library Mount Path"
description: "Path where the volume will be mounted inside the pod"
schema:
type: path
hidden: true
editable: false
default: "/var/lib/netdata"
- variable: hostPathEnabled
label: "Enable Host Path for Netdata Library Volume"
schema:
type: boolean
default: false
show_subquestions_if: true
subquestions:
- variable: hostPath
label: "Host Path for Netdata Library Volume"
schema:
type: hostpath
required: true
immutable: true
- variable: extraAppVolumeMounts
label: "Extra Host Path Volumes"
group: "Storage"
schema:
type: list
items:
- variable: extraAppVolume
label: "Host Path Volume"
description: "Add an extra host path volume for Netdata application"
schema:
type: dict
attrs:
- variable: mountPath
label: "Mount Path in Pod"
description: "Path where the volume will be mounted inside the pod"
schema:
type: path
required: true
- variable: hostPath
label: "Host Path"
description: "Host path"
schema:
type: hostpath
required: true
- variable: enableResourceLimits
label: "Enable Pod resource limits"
group: "Resource Limits"
schema:
type: boolean
default: false
- variable: cpuLimit
label: "CPU Limit"
description: "CPU resource limit allow plain integer values with suffix m(milli) e.g 1000m, 100."
group: "Resource Limits"
schema:
type: string
show_if: [["enableResourceLimits", "=", true]]
valid_chars: "^\\d+(?:\\.\\d+(?!.*m$)|m?$)"
default: "4000m"
- variable: memLimit
label: "Memory Limit"
group: "Resource Limits"
description: "Memory limits is specified by number of bytes. Followed by quantity suffix like E,P,T,G,M,k and Ei,Pi,Ti,Mi,Gi,Ki can also be used. e.g 129e6, 129M, 128974848000m, 123Mi"
schema:
type: string
show_if: [["enableResourceLimits", "=", true]]
valid_chars: "^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$"
default: "8Gi"

View File

@@ -0,0 +1,32 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "netdata.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 "netdata.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 "netdata.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

View File

@@ -0,0 +1,25 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ template "netdata.fullname" . }}
labels:
app: {{ template "netdata.name" . }}
chart: {{ template "netdata.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
rules:
- apiGroups: [""]
resources:
- "pods" # used by sd, netdata (cgroup-name.sh, get-kubernetes-labels.sh)
- "services" # used by sd
- "configmaps" # used by sd
- "secrets" # used by sd
verbs:
- "get"
- "list"
- "watch"
- apiGroups: [""]
resources:
- "namespaces" # used by netdata (cgroup-name.sh, get-kubernetes-labels.sh)
verbs:
- "get"

View File

@@ -0,0 +1,17 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ template "netdata.fullname" . }}
labels:
app: {{ template "netdata.name" . }}
chart: {{ template "netdata.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: {{ template "netdata.fullname" . }}
subjects:
- kind: ServiceAccount
name: {{ .Release.Name }}
namespace: {{ .Release.Namespace }}

View File

@@ -0,0 +1,103 @@
{{ include "common.storage.hostPathValidate" .Values }}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ template "netdata.name" . }}-netdata
labels:
app: {{ template "netdata.name" . }}
chart: {{ template "netdata.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
role: parent
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels: {{ include "common.labels.selectorLabels" . | nindent 6 }}
template:
metadata:
labels: {{ include "common.labels.selectorLabels" . | nindent 8 }}
annotations:
rollme: {{ randAlphaNum 5 | quote }}
spec:
securityContext:
fsGroup: 201
serviceAccountName: {{ .Release.Name }}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ tpl .Values.image.tag . }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{ include "common.resources.limitation" . | nindent 10 }}
env:
{{ $envList := (default list .Values.environmentVariables) }}
{{ include "common.containers.environmentVariables" (dict "environmentVariables" $envList) | nindent 12 }}
ports:
- name: http
containerPort: 19999
protocol: TCP
livenessProbe:
httpGet:
path: /api/v1/info
port: http
initialDelaySeconds: 10
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 5
successThreshold: 1
readinessProbe:
httpGet:
path: /api/v1/info
port: http
initialDelaySeconds: 10
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 5
successThreshold: 2
startupProbe:
httpGet:
path: /api/v1/info
port: http
initialDelaySeconds: 10
periodSeconds: 5
timeoutSeconds: 2
failureThreshold: 60
successThreshold: 1
volumeMounts: {{ include "common.storage.configureAppVolumeMountsInContainer" .Values | nindent 12 }}
- name: os-release
mountPath: /host/etc/os-release
readOnly: true
- name: sys
mountPath: /host/sys
readOnly: true
- name: proc
mountPath: /host/proc
readOnly: true
- name: user
mountPath: /host/etc/passwd
readOnly: true
- name: group
mountPath: /host/etc/group
readOnly: true
securityContext:
capabilities:
add:
- SYS_PTRACE
terminationGracePeriodSeconds: 60
{{ include "common.networking.dnsConfiguration" .Values | nindent 6 }}
volumes: {{ include "common.storage.configureAppVolumes" .Values | nindent 8 }}
- name: os-release
hostPath:
path: /etc/os-release
- name: proc
hostPath:
path: /proc
- name: sys
hostPath:
path: /sys
- name: user
hostPath:
path: /etc/passwd
- name: group
hostPath:
path: /etc/group

View File

@@ -0,0 +1,34 @@
apiVersion: batch/v1
kind: Job
metadata:
name: "{{ template "common.names.fullname" . }}-preinstall-job"
labels:
app.kubernetes.io/managed-by: {{ .Release.Service | quote }}
app.kubernetes.io/instance: {{ .Release.Name | quote }}
app.kubernetes.io/version: {{ .Chart.AppVersion }}
helm.sh/chart: {{ template "common.names.chart" . }}
annotations:
"helm.sh/hook": pre-install
"helm.sh/hook-delete-policy": hook-succeeded
spec:
template:
metadata:
name: "{{ template "common.names.fullname" . }}-preinstall-hook"
labels:
app.kubernetes.io/managed-by: {{ .Release.Service | quote }}
app.kubernetes.io/instance: {{ .Release.Name | quote }}
helm.sh/chart: {{ template "common.names.chart" . }}
spec:
restartPolicy: Never
containers:
- name: pre-install-job
image: "alpine:latest"
command:
- chown
- -R
- {{ .Values.runAsUser }}:{{ .Values.runAsGroup }}
- {{ .Values.appVolumeMounts.netdatacache.mountPath }}
- {{ .Values.appVolumeMounts.netdatalib.mountPath }}
- {{ .Values.appVolumeMounts.netdataconfig.mountPath }}
volumeMounts: {{ include "common.storage.configureAppVolumeMountsInContainer" .Values | nindent 12 }}
volumes: {{ include "common.storage.configureAppVolumes" .Values | nindent 8 }}

View File

@@ -0,0 +1,6 @@
{{ $svc := .Values.service }}
{{ $ports := list }}
{{ $ports = mustAppend $ports (dict "name" "ui" "port" $svc.nodePort "nodePort" $svc.nodePort "targetPort" 19999) }}
{{ $params := . }}
{{ $_ := set $params "commonService" (dict "type" "NodePort" "ports" $ports ) }}
{{ include "common.classes.service" $params }}

View File

@@ -0,0 +1,9 @@
kind: ServiceAccount
apiVersion: v1
metadata:
labels:
app: {{ template "netdata.name" . }}
chart: {{ template "netdata.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
name: {{ .Release.Name }}

View File

@@ -3,7 +3,7 @@ description: Real-time performance monitoring, done right!
annotations:
title: Netdata
type: application
version: 2.0.2
version: 2.0.3
apiVersion: v2
appVersion: v1.44.3
kubeVersion: '>=1.16.0-0'

View File

@@ -0,0 +1,4 @@
# 1.0.40
This version is kept because it contains a fix that is needed for migration to v2.x.x
It should be safe to remove few months after v2.x.x is released.

View File

@@ -0,0 +1 @@
- 1.0.40