chore(netdata): add some more default confs (#3473)
* chore(netdata): add some more default confs * bump * use bash * invert logic * fix output
This commit is contained in:
@@ -19,7 +19,7 @@ name: netdata
|
|||||||
sources:
|
sources:
|
||||||
- https://github.com/truecharts/charts/tree/master/charts/stable/netdata
|
- https://github.com/truecharts/charts/tree/master/charts/stable/netdata
|
||||||
- https://github.com/netdata
|
- https://github.com/netdata
|
||||||
version: 2.0.28
|
version: 2.0.29
|
||||||
annotations:
|
annotations:
|
||||||
truecharts.org/catagories: |
|
truecharts.org/catagories: |
|
||||||
- utilities
|
- utilities
|
||||||
|
|||||||
@@ -26,9 +26,16 @@ configmap:
|
|||||||
data:
|
data:
|
||||||
netdata-conf: |-
|
netdata-conf: |-
|
||||||
[global]
|
[global]
|
||||||
memory mode = dbengine
|
memory mode = dbengine
|
||||||
dbengine multihost disk space = 4096
|
dbengine multihost disk space = 4096
|
||||||
page cache size = 64
|
page cache size = 64
|
||||||
|
go-d-conf: |-
|
||||||
|
modules:
|
||||||
|
k8s_state: yes
|
||||||
|
go-d-k8s-state-conf: |-
|
||||||
|
jobs:
|
||||||
|
- name: k8s_state
|
||||||
|
update_every: 1
|
||||||
|
|
||||||
rbac:
|
rbac:
|
||||||
main:
|
main:
|
||||||
@@ -138,6 +145,22 @@ persistence:
|
|||||||
volumeSpec:
|
volumeSpec:
|
||||||
configMap:
|
configMap:
|
||||||
name: '{{ printf "%v-configs" (include "tc.common.names.fullname" .) }}'
|
name: '{{ printf "%v-configs" (include "tc.common.names.fullname" .) }}'
|
||||||
|
go-d-configs:
|
||||||
|
enabled: "true"
|
||||||
|
mountPath: "/etc/netdata/truecharts-defaults/.go.d.conf"
|
||||||
|
subPath: "go-d-conf"
|
||||||
|
type: "custom"
|
||||||
|
volumeSpec:
|
||||||
|
configMap:
|
||||||
|
name: '{{ printf "%v-configs" (include "tc.common.names.fullname" .) }}'
|
||||||
|
go-d-k8s-state-configs:
|
||||||
|
enabled: "true"
|
||||||
|
mountPath: "/etc/netdata/truecharts-defaults/go.d/.k8s_state.conf"
|
||||||
|
subPath: "go-d-k8s-state-conf"
|
||||||
|
type: "custom"
|
||||||
|
volumeSpec:
|
||||||
|
configMap:
|
||||||
|
name: '{{ printf "%v-configs" (include "tc.common.names.fullname" .) }}'
|
||||||
|
|
||||||
initContainers:
|
initContainers:
|
||||||
create-config:
|
create-config:
|
||||||
@@ -150,16 +173,39 @@ initContainers:
|
|||||||
mountPath: "/etc/netdata/truecharts-defaults/.netdata.conf"
|
mountPath: "/etc/netdata/truecharts-defaults/.netdata.conf"
|
||||||
subPath: netdata-conf
|
subPath: netdata-conf
|
||||||
readOnly: true
|
readOnly: true
|
||||||
command: ["/bin/sh", "-c"]
|
- name: go-d-configs
|
||||||
|
mountPath: "/etc/netdata/truecharts-defaults/.go.d.conf"
|
||||||
|
subPath: go-d-conf
|
||||||
|
readOnly: true
|
||||||
|
- name: go-d-k8s-state-configs
|
||||||
|
mountPath: "/etc/netdata/truecharts-defaults/go.d/.k8s_state.conf"
|
||||||
|
subPath: go-d-k8s-state-conf
|
||||||
|
readOnly: true
|
||||||
|
command: ["/bin/bash", "-c"]
|
||||||
args:
|
args:
|
||||||
- >
|
- |-
|
||||||
export configfile=/etc/netdata/netdata.conf;
|
copy_config () {
|
||||||
if [ ! -f $configfile ]; then
|
local confSource="$1"
|
||||||
cp /etc/netdata/truecharts-defaults/.netdata.conf $configfile
|
local confTarget="$2"
|
||||||
else
|
local dirTarget
|
||||||
echo "Config file exists, skipping...";
|
dirTarget="$(dirname "${confTarget}")"
|
||||||
fi;
|
|
||||||
cat $configfile
|
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
|
||||||
|
|
||||||
|
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"
|
||||||
|
|
||||||
portal:
|
portal:
|
||||||
enabled: true
|
enabled: true
|
||||||
|
|||||||
@@ -14,8 +14,10 @@ words:
|
|||||||
- cloudflared
|
- cloudflared
|
||||||
- Cloudflareddns
|
- Cloudflareddns
|
||||||
- collabora
|
- collabora
|
||||||
|
- configfile
|
||||||
- configmap
|
- configmap
|
||||||
- daemonset
|
- daemonset
|
||||||
|
- dbengine
|
||||||
- ddns
|
- ddns
|
||||||
- Djava
|
- Djava
|
||||||
- dockerized
|
- dockerized
|
||||||
@@ -23,6 +25,7 @@ words:
|
|||||||
- dynmap
|
- dynmap
|
||||||
- eptgmk
|
- eptgmk
|
||||||
- Fireshare
|
- Fireshare
|
||||||
|
- fullname
|
||||||
- gibibyte
|
- gibibyte
|
||||||
- gluster
|
- gluster
|
||||||
- healthcheck
|
- healthcheck
|
||||||
@@ -63,7 +66,9 @@ words:
|
|||||||
- modelstore
|
- modelstore
|
||||||
- modports
|
- modports
|
||||||
- mountpoint
|
- mountpoint
|
||||||
|
- multihost
|
||||||
- neko
|
- neko
|
||||||
|
- netdata
|
||||||
- nextcloud
|
- nextcloud
|
||||||
- nobind
|
- nobind
|
||||||
- nodeport
|
- nodeport
|
||||||
|
|||||||
Reference in New Issue
Block a user