* fix(netdata): make host mounts readonly * actually mount hostpaths as host paths
119 lines
2.3 KiB
YAML
119 lines
2.3 KiB
YAML
image:
|
|
repository: netdata/netdata
|
|
tag: v1.34.1@sha256:f6cac082c234ac0fac0d0d464a4b4fe68fe3ec53d18a03b553307c8286e92f0c
|
|
pullPolicy: IfNotPresent
|
|
|
|
securityContext:
|
|
readOnlyRootFilesystem: false
|
|
runAsNonRoot: false
|
|
capabilities:
|
|
add:
|
|
- SYS_PTRACE
|
|
|
|
podSecurityContext:
|
|
runAsUser: 0
|
|
runAsGroup: 0
|
|
fsGroup: 201
|
|
|
|
serviceAccount:
|
|
create: true
|
|
|
|
rbac:
|
|
enabled: true
|
|
rules:
|
|
- apiGroups:
|
|
- ""
|
|
resources:
|
|
- "pods"
|
|
- "services"
|
|
- "configmaps"
|
|
- "secrets"
|
|
- "nodes"
|
|
- "nodes/metrics"
|
|
verbs:
|
|
- "get"
|
|
- "list"
|
|
- "watch"
|
|
- apiGroups: [""]
|
|
resources:
|
|
- "namespaces"
|
|
verbs:
|
|
- "get"
|
|
|
|
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
|
|
type: hostPath
|
|
hostPath: "/etc/passwd"
|
|
mountPath: "/host/etc/passwd"
|
|
readOnly: true
|
|
group:
|
|
enabled: true
|
|
type: hostPath
|
|
hostPath: "/etc/group"
|
|
mountPath: "/host/etc/group"
|
|
readOnly: true
|
|
proc:
|
|
enabled: true
|
|
type: hostPath
|
|
hostPath: "/proc"
|
|
mountPath: "/host/proc"
|
|
readOnly: true
|
|
sys:
|
|
enabled: true
|
|
type: hostPath
|
|
hostPath: "/sys"
|
|
mountPath: "/host/sys"
|
|
readOnly: true
|
|
os:
|
|
enabled: true
|
|
type: hostPath
|
|
hostPath: "/etc/os-release"
|
|
mountPath: "/host/etc/os-release"
|
|
readOnly: true
|
|
|
|
initContainers:
|
|
create-config:
|
|
name: create-config
|
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
|
volumeMounts:
|
|
- name: config
|
|
mountPath: "/etc/netdata"
|
|
command: ["/bin/sh", "-c"]
|
|
args:
|
|
- >
|
|
echo "Creating config file...";
|
|
export configfile=/etc/netdata/netdata.conf;
|
|
if [ ! -f $configfile ]; then
|
|
echo '[global]' > $configfile;
|
|
echo ' memory mode = dbengine' >> $configfile;
|
|
echo ' dbengine multihost disk space = 4096' >> $configfile;
|
|
echo ' page cache size = 64' >> $configfile;
|
|
else
|
|
echo "Config file exists, skipping...";
|
|
fi;
|