2022-05-01 20:50:57 +00:00
|
|
|
image:
|
2022-05-07 21:59:53 +00:00
|
|
|
repository: tccr.io/truecharts/netdata
|
2022-07-25 18:36:51 +00:00
|
|
|
tag: v1.35.1@sha256:ce565f3fcad1ef4d204c20fc86936cf468072d88c1f50754c05e7ffff4cb868e
|
2022-05-01 20:50:57 +00:00
|
|
|
pullPolicy: IfNotPresent
|
|
|
|
|
|
|
|
securityContext:
|
|
|
|
readOnlyRootFilesystem: false
|
|
|
|
runAsNonRoot: false
|
|
|
|
capabilities:
|
|
|
|
add:
|
|
|
|
- SYS_PTRACE
|
|
|
|
|
|
|
|
podSecurityContext:
|
|
|
|
runAsUser: 0
|
|
|
|
runAsGroup: 0
|
|
|
|
fsGroup: 201
|
|
|
|
|
2022-06-07 17:41:19 +00:00
|
|
|
# -- The service account the pods will use to interact with the Kubernetes API
|
2022-05-01 20:50:57 +00:00
|
|
|
serviceAccount:
|
2022-06-07 17:41:19 +00:00
|
|
|
main:
|
|
|
|
create: true
|
|
|
|
|
|
|
|
configmap:
|
|
|
|
configs:
|
|
|
|
enabled: true
|
|
|
|
data:
|
|
|
|
netdata-conf: |-
|
2022-07-22 18:23:01 +00:00
|
|
|
[global]
|
|
|
|
memory mode = dbengine
|
|
|
|
dbengine multihost disk space = 4096
|
|
|
|
page cache size = 64
|
2022-05-01 20:50:57 +00:00
|
|
|
|
|
|
|
rbac:
|
2022-06-07 17:41:19 +00:00
|
|
|
main:
|
|
|
|
enabled: true
|
|
|
|
rules:
|
2022-07-22 18:23:01 +00: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"
|
|
|
|
- apiGroups: [""]
|
|
|
|
resources:
|
|
|
|
- "namespaces"
|
|
|
|
verbs:
|
|
|
|
- "get"
|
2022-05-01 20:50:57 +00:00
|
|
|
|
2022-06-07 17:41:19 +00:00
|
|
|
env:
|
2022-05-02 07:59:40 +00:00
|
|
|
MY_NODE_NAME:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: spec.nodeName
|
|
|
|
MY_POD_NAMESPACE:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: metadata.namespace
|
|
|
|
MY_POD_NAME:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: metadata.name
|
|
|
|
|
2022-06-07 17:41:19 +00:00
|
|
|
secretEnv:
|
2022-05-02 07:59:40 +00:00
|
|
|
NETDATA_CLAIM_URL: ""
|
|
|
|
NETDATA_CLAIM_TOKEN: ""
|
|
|
|
NETDATA_CLAIM_ROOMS: ""
|
|
|
|
|
2022-05-01 20:50:57 +00:00
|
|
|
service:
|
|
|
|
main:
|
|
|
|
ports:
|
|
|
|
main:
|
|
|
|
port: 19999
|
|
|
|
targetPort: 19999
|
|
|
|
|
|
|
|
probes:
|
|
|
|
liveness:
|
|
|
|
path: "/api/v1/info"
|
|
|
|
readiness:
|
|
|
|
path: "/api/v1/info"
|
|
|
|
startup:
|
|
|
|
path: "/api/v1/info"
|
|
|
|
|
|
|
|
persistence:
|
|
|
|
config:
|
|
|
|
enabled: true
|
|
|
|
mountPath: "/etc/netdata"
|
|
|
|
lib:
|
|
|
|
enabled: true
|
|
|
|
mountPath: "/var/lib/netdata"
|
|
|
|
cache:
|
|
|
|
enabled: true
|
|
|
|
mountPath: "/var/cache/netdata"
|
|
|
|
passwd:
|
|
|
|
enabled: true
|
2022-05-01 22:14:40 +00:00
|
|
|
type: hostPath
|
2022-05-01 20:50:57 +00:00
|
|
|
hostPath: "/etc/passwd"
|
|
|
|
mountPath: "/host/etc/passwd"
|
2022-05-01 22:14:40 +00:00
|
|
|
readOnly: true
|
2022-05-01 20:50:57 +00:00
|
|
|
group:
|
|
|
|
enabled: true
|
2022-05-01 22:14:40 +00:00
|
|
|
type: hostPath
|
2022-05-01 20:50:57 +00:00
|
|
|
hostPath: "/etc/group"
|
|
|
|
mountPath: "/host/etc/group"
|
2022-05-01 22:14:40 +00:00
|
|
|
readOnly: true
|
2022-05-01 20:50:57 +00:00
|
|
|
proc:
|
|
|
|
enabled: true
|
2022-05-01 22:14:40 +00:00
|
|
|
type: hostPath
|
2022-05-01 20:50:57 +00:00
|
|
|
hostPath: "/proc"
|
|
|
|
mountPath: "/host/proc"
|
2022-05-01 22:14:40 +00:00
|
|
|
readOnly: true
|
2022-05-02 15:23:29 +00:00
|
|
|
dev:
|
|
|
|
enabled: true
|
|
|
|
type: hostPath
|
|
|
|
hostPath: "/dev"
|
|
|
|
mountPath: "/host/dev"
|
|
|
|
readOnly: true
|
2022-05-01 20:50:57 +00:00
|
|
|
sys:
|
|
|
|
enabled: true
|
2022-05-01 22:14:40 +00:00
|
|
|
type: hostPath
|
2022-05-01 20:50:57 +00:00
|
|
|
hostPath: "/sys"
|
|
|
|
mountPath: "/host/sys"
|
2022-05-01 22:14:40 +00:00
|
|
|
readOnly: true
|
2022-05-01 20:50:57 +00:00
|
|
|
os:
|
|
|
|
enabled: true
|
2022-05-01 22:14:40 +00:00
|
|
|
type: hostPath
|
2022-05-01 20:50:57 +00:00
|
|
|
hostPath: "/etc/os-release"
|
|
|
|
mountPath: "/host/etc/os-release"
|
2022-05-01 22:14:40 +00:00
|
|
|
readOnly: true
|
2022-06-07 17:41:19 +00:00
|
|
|
netdata-configs:
|
|
|
|
enabled: "true"
|
|
|
|
mountPath: "/etc/netdata/truecharts-defaults/.netdata.conf"
|
|
|
|
subPath: "netdata-conf"
|
|
|
|
type: "custom"
|
|
|
|
volumeSpec:
|
|
|
|
configMap:
|
|
|
|
name: '{{ printf "%v-configs" (include "tc.common.names.fullname" .) }}'
|
2022-05-01 20:50:57 +00:00
|
|
|
|
|
|
|
initContainers:
|
|
|
|
create-config:
|
|
|
|
name: create-config
|
|
|
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
|
|
|
volumeMounts:
|
2022-07-22 18:23:01 +00:00
|
|
|
- name: config
|
|
|
|
mountPath: "/etc/netdata"
|
|
|
|
- name: netdata-configs
|
|
|
|
mountPath: "/etc/netdata/truecharts-defaults/.netdata.conf"
|
|
|
|
subPath: netdata-conf
|
|
|
|
readOnly: true
|
2022-05-01 20:50:57 +00:00
|
|
|
command: ["/bin/sh", "-c"]
|
|
|
|
args:
|
|
|
|
- >
|
|
|
|
export configfile=/etc/netdata/netdata.conf;
|
|
|
|
if [ ! -f $configfile ]; then
|
2022-05-02 15:23:29 +00:00
|
|
|
cp /etc/netdata/truecharts-defaults/.netdata.conf $configfile
|
2022-05-01 20:50:57 +00:00
|
|
|
else
|
|
|
|
echo "Config file exists, skipping...";
|
|
|
|
fi;
|
2022-05-02 15:23:29 +00:00
|
|
|
cat $configfile
|