chore(netdata): add pod/namespace/node env's (#2600)

* feat(netdata): try to add agent for k8s discovery

* hell

* remove sd agent, as it only supports a handful of services

* try rootless

* root

* add gui options for cloud claim

* we don't use sd currently
This commit is contained in:
Stavros Kois
2022-05-02 07:59:40 +00:00
committed by GitHub
parent de8c9db2ed
commit 35f8ad266f
3 changed files with 45 additions and 6 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ maintainers:
name: netdata
sources:
- https://github.com/netdata
version: 0.0.3
version: 0.0.4
annotations:
truecharts.org/catagories: |
- utilities
+24 -1
View File
@@ -74,7 +74,30 @@ questions:
- value: "OnDelete"
description: "(Legacy) OnDelete: ignore .spec.template changes"
# Include{controllerExpert}
# Docker specific env
- variable: secret
group: "Container Configuration"
label: "Image Secrets"
schema:
additional_attrs: true
type: dict
attrs:
- variable: NETDATA_CLAIM_URL
label: "NETDATA_CLAIM_URL"
schema:
type: string
default: "https://app.netdata.cloud"
- variable: NETDATA_CLAIM_TOKEN
label: "NETDATA_CLAIM_TOKEN"
schema:
type: string
private: true
default: ""
- variable: NETDATA_CLAIM_ROOMS
label: "NETDATA_CLAIM_ROOMS"
schema:
type: string
private: true
default: ""
# Include{containerConfig}
- variable: service
+20 -4
View File
@@ -25,9 +25,9 @@ rbac:
- ""
resources:
- "pods"
- "services"
- "configmaps"
- "secrets"
# - "services" # used by sd
# - "configmaps" # used by sd
# - "secrets" # used by sd
- "nodes"
- "nodes/metrics"
verbs:
@@ -40,6 +40,22 @@ rbac:
verbs:
- "get"
envValueFrom:
MY_NODE_NAME:
fieldRef:
fieldPath: spec.nodeName
MY_POD_NAMESPACE:
fieldRef:
fieldPath: metadata.namespace
MY_POD_NAME:
fieldRef:
fieldPath: metadata.name
secret:
NETDATA_CLAIM_URL: ""
NETDATA_CLAIM_TOKEN: ""
NETDATA_CLAIM_ROOMS: ""
service:
main:
ports:
@@ -106,9 +122,9 @@ initContainers:
command: ["/bin/sh", "-c"]
args:
- >
echo "Creating config file...";
export configfile=/etc/netdata/netdata.conf;
if [ ! -f $configfile ]; then
echo "Creating config file...";
echo '[global]' > $configfile;
echo ' memory mode = dbengine' >> $configfile;
echo ' dbengine multihost disk space = 4096' >> $configfile;