2022-05-01 16:50:57 -04:00
|
|
|
image:
|
2023-11-17 05:22:57 -05:00
|
|
|
repository: netdata/netdata
|
2024-02-12 13:36:16 -05:00
|
|
|
tag: v1.44.3@sha256:9e89531a5ee14383cd400e6feafbff37cacbf5c3c4f5792e100d8d10b1f0aa2d
|
2022-05-01 16:50:57 -04:00
|
|
|
pullPolicy: IfNotPresent
|
2022-06-07 13:41:19 -04:00
|
|
|
# -- The service account the pods will use to interact with the Kubernetes API
|
2022-05-01 16:50:57 -04:00
|
|
|
serviceAccount:
|
2022-06-07 13:41:19 -04:00
|
|
|
main:
|
2022-09-03 13:22:28 -04:00
|
|
|
enabled: true
|
2023-04-11 06:07:17 -04:00
|
|
|
primary: true
|
2022-06-07 13:41:19 -04:00
|
|
|
configmap:
|
|
|
|
configs:
|
|
|
|
enabled: true
|
|
|
|
data:
|
|
|
|
netdata-conf: |-
|
2022-07-22 14:23:01 -04:00
|
|
|
[global]
|
2022-08-14 08:03:46 -04:00
|
|
|
memory mode = dbengine
|
|
|
|
dbengine multihost disk space = 4096
|
|
|
|
page cache size = 64
|
|
|
|
go-d-conf: |-
|
|
|
|
modules:
|
|
|
|
k8s_state: yes
|
|
|
|
go-d-k8s-state-conf: |-
|
|
|
|
jobs:
|
|
|
|
- name: k8s_state
|
|
|
|
update_every: 1
|
2022-05-01 16:50:57 -04:00
|
|
|
rbac:
|
2022-06-07 13:41:19 -04:00
|
|
|
main:
|
|
|
|
enabled: true
|
2023-04-11 06:07:17 -04:00
|
|
|
primary: true
|
2022-06-07 13:41:19 -04:00
|
|
|
rules:
|
2022-07-22 14:23:01 -04:00
|
|
|
- apiGroups:
|
|
|
|
- ""
|
|
|
|
resources:
|
|
|
|
- "pods"
|
|
|
|
- "nodes"
|
|
|
|
- "nodes/metrics"
|
|
|
|
# - "services" # used by agent service discovery
|
|
|
|
# - "configmaps" # used by agent service discovery
|
|
|
|
# - "secrets" # used by agent service discovery
|
|
|
|
verbs:
|
|
|
|
- "get"
|
|
|
|
- "list"
|
|
|
|
- "watch"
|
2023-05-23 04:26:41 -04:00
|
|
|
- apiGroups:
|
|
|
|
- ""
|
2022-07-22 14:23:01 -04:00
|
|
|
resources:
|
|
|
|
- "namespaces"
|
|
|
|
verbs:
|
|
|
|
- "get"
|
2022-05-01 16:50:57 -04:00
|
|
|
service:
|
|
|
|
main:
|
|
|
|
ports:
|
|
|
|
main:
|
|
|
|
port: 19999
|
|
|
|
targetPort: 19999
|
|
|
|
persistence:
|
|
|
|
config:
|
|
|
|
enabled: true
|
|
|
|
mountPath: "/etc/netdata"
|
2023-04-11 06:07:17 -04:00
|
|
|
targetSelectAll: true
|
2022-05-01 16:50:57 -04:00
|
|
|
lib:
|
|
|
|
enabled: true
|
|
|
|
mountPath: "/var/lib/netdata"
|
|
|
|
cache:
|
|
|
|
enabled: true
|
|
|
|
mountPath: "/var/cache/netdata"
|
|
|
|
passwd:
|
|
|
|
enabled: true
|
2022-05-01 18:14:40 -04:00
|
|
|
type: hostPath
|
2022-05-01 16:50:57 -04:00
|
|
|
hostPath: "/etc/passwd"
|
|
|
|
mountPath: "/host/etc/passwd"
|
2022-05-01 18:14:40 -04:00
|
|
|
readOnly: true
|
2022-05-01 16:50:57 -04:00
|
|
|
group:
|
|
|
|
enabled: true
|
2022-05-01 18:14:40 -04:00
|
|
|
type: hostPath
|
2022-05-01 16:50:57 -04:00
|
|
|
hostPath: "/etc/group"
|
|
|
|
mountPath: "/host/etc/group"
|
2022-05-01 18:14:40 -04:00
|
|
|
readOnly: true
|
2022-05-01 16:50:57 -04:00
|
|
|
proc:
|
|
|
|
enabled: true
|
2022-05-01 18:14:40 -04:00
|
|
|
type: hostPath
|
2022-05-01 16:50:57 -04:00
|
|
|
hostPath: "/proc"
|
|
|
|
mountPath: "/host/proc"
|
2022-05-01 18:14:40 -04:00
|
|
|
readOnly: true
|
2022-05-02 11:23:29 -04:00
|
|
|
dev:
|
|
|
|
enabled: true
|
|
|
|
type: hostPath
|
|
|
|
hostPath: "/dev"
|
|
|
|
mountPath: "/host/dev"
|
|
|
|
readOnly: true
|
2022-05-01 16:50:57 -04:00
|
|
|
sys:
|
|
|
|
enabled: true
|
2022-05-01 18:14:40 -04:00
|
|
|
type: hostPath
|
2022-05-01 16:50:57 -04:00
|
|
|
hostPath: "/sys"
|
|
|
|
mountPath: "/host/sys"
|
2022-05-01 18:14:40 -04:00
|
|
|
readOnly: true
|
2022-05-01 16:50:57 -04:00
|
|
|
os:
|
|
|
|
enabled: true
|
2022-05-01 18:14:40 -04:00
|
|
|
type: hostPath
|
2022-05-01 16:50:57 -04:00
|
|
|
hostPath: "/etc/os-release"
|
|
|
|
mountPath: "/host/etc/os-release"
|
2022-05-01 18:14:40 -04:00
|
|
|
readOnly: true
|
2022-06-07 13:41:19 -04:00
|
|
|
netdata-configs:
|
2023-04-11 06:07:17 -04:00
|
|
|
enabled: true
|
2022-06-07 13:41:19 -04:00
|
|
|
mountPath: "/etc/netdata/truecharts-defaults/.netdata.conf"
|
|
|
|
subPath: "netdata-conf"
|
2023-04-11 06:07:17 -04:00
|
|
|
type: configmap
|
|
|
|
objectName: configs
|
|
|
|
targetSelectAll: true
|
2022-08-14 08:03:46 -04:00
|
|
|
go-d-configs:
|
2023-04-11 06:07:17 -04:00
|
|
|
enabled: true
|
2022-08-14 08:03:46 -04:00
|
|
|
mountPath: "/etc/netdata/truecharts-defaults/.go.d.conf"
|
|
|
|
subPath: "go-d-conf"
|
2023-04-11 06:07:17 -04:00
|
|
|
type: configmap
|
|
|
|
objectName: configs
|
|
|
|
targetSelectAll: true
|
2022-08-14 08:03:46 -04:00
|
|
|
go-d-k8s-state-configs:
|
2023-04-11 06:07:17 -04:00
|
|
|
enabled: true
|
2022-08-14 08:03:46 -04:00
|
|
|
mountPath: "/etc/netdata/truecharts-defaults/go.d/.k8s_state.conf"
|
|
|
|
subPath: "go-d-k8s-state-conf"
|
2023-04-11 06:07:17 -04:00
|
|
|
type: configmap
|
|
|
|
objectName: configs
|
|
|
|
targetSelectAll: true
|
|
|
|
portal:
|
|
|
|
open:
|
|
|
|
enabled: true
|
|
|
|
securityContext:
|
|
|
|
container:
|
|
|
|
readOnlyRootFilesystem: false
|
|
|
|
runAsNonRoot: false
|
|
|
|
capabilities:
|
|
|
|
add:
|
|
|
|
- SYS_PTRACE
|
|
|
|
runAsUser: 0
|
|
|
|
runAsGroup: 0
|
|
|
|
fsGroup: 201
|
|
|
|
workload:
|
|
|
|
main:
|
|
|
|
podSpec:
|
2023-07-30 14:56:12 -04:00
|
|
|
automountServiceAccountToken: true
|
2023-04-11 06:07:17 -04:00
|
|
|
initContainers:
|
|
|
|
create-config:
|
|
|
|
enabled: true
|
|
|
|
imageSelector: image
|
|
|
|
type: init
|
2023-05-23 04:26:41 -04:00
|
|
|
command:
|
|
|
|
- /bin/bash
|
|
|
|
- -c
|
2023-04-11 06:07:17 -04:00
|
|
|
args:
|
|
|
|
- |-
|
|
|
|
copy_config () {
|
|
|
|
local confSource="$1"
|
|
|
|
local confTarget="$2"
|
|
|
|
local dirTarget
|
|
|
|
dirTarget="$(dirname "${confTarget}")"
|
2022-08-14 08:03:46 -04:00
|
|
|
|
2023-04-11 06:07:17 -04:00
|
|
|
if [ ! -f "$confTarget" ]; then
|
|
|
|
if [ ! -d "${dirTarget}" ]; then
|
|
|
|
mkdir -p "$dirTarget"
|
|
|
|
fi;
|
|
|
|
cp "$confSource" "$confTarget"
|
|
|
|
echo "Content of $(basename "${confTarget}")"
|
|
|
|
cat "$confTarget"
|
|
|
|
else
|
|
|
|
echo "Config $confTarget exists, skipping..."
|
|
|
|
fi;
|
|
|
|
}
|
|
|
|
export -f copy_config
|
2022-08-08 17:25:02 -04:00
|
|
|
|
2023-04-11 06:07:17 -04:00
|
|
|
copy_config "/etc/netdata/truecharts-defaults/.netdata.conf" "/etc/netdata/netdata.conf"
|
|
|
|
copy_config "/etc/netdata/truecharts-defaults/.go.d.conf" "/etc/netdata/go.d.conf"
|
|
|
|
copy_config "/etc/netdata/truecharts-defaults/go.d/.k8s_state.conf" "/etc/netdata/go.d/k8s_state.conf"
|
|
|
|
containers:
|
|
|
|
main:
|
|
|
|
probes:
|
|
|
|
liveness:
|
|
|
|
path: "/api/v1/info"
|
|
|
|
readiness:
|
|
|
|
path: "/api/v1/info"
|
|
|
|
startup:
|
|
|
|
path: "/api/v1/info"
|
|
|
|
env:
|
|
|
|
MY_NODE_NAME:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: spec.nodeName
|
|
|
|
MY_POD_NAMESPACE:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: metadata.namespace
|
|
|
|
MY_POD_NAME:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: metadata.name
|
|
|
|
NETDATA_CLAIM_URL: ""
|
|
|
|
NETDATA_CLAIM_TOKEN: ""
|
|
|
|
NETDATA_CLAIM_ROOMS: ""
|