Compare commits
29
Commits
7cbcaca6d4
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
eb91aa5c6f | ||
|
|
175eb68b1d | ||
|
|
505b3eb2c0 | ||
|
|
1acad354dc | ||
|
|
62a06a9548 | ||
|
|
594a66de6d | ||
|
|
3f34e7b3f5 | ||
|
|
e50834b21d | ||
|
|
c6c75ac732 | ||
|
|
c076de9752 | ||
|
|
ecc55ebfd6 | ||
|
|
9ef6517992 | ||
|
|
918ae5f1fa | ||
|
|
a248485c93 | ||
|
|
1915360eb1 | ||
|
|
275d95e9fa | ||
|
|
d5eddaf2c2 | ||
|
|
9b986a4953 | ||
|
|
1a2a820273 | ||
|
|
af850e4bd5 | ||
|
|
dddb91e2a7 | ||
|
|
9a125bb29d | ||
|
|
1420a0b354 | ||
|
|
3ae6d51fb2 | ||
|
|
f6a5dffe3c | ||
|
|
7ea3134ff8 | ||
|
|
e130feda8c | ||
|
|
eed6e01cee | ||
|
|
99059ae603 |
@@ -1,93 +1,62 @@
|
|||||||
# netdata_kube
|
# netdata_kube
|
||||||
|
|
||||||
|
If you plan to connect the node to Netdata Cloud, you can find the command with the right parameters by clicking the "Add Nodes" button in your Space's Nodes tab.
|
||||||
|
|
||||||
|
File generated by Claude
|
||||||
|
|
||||||
## Getting started
|
To apply:
|
||||||
|
|
||||||
To make it easy for you to get started with GitLab, here's a list of recommended next steps.
|
|
||||||
|
|
||||||
Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!
|
|
||||||
|
|
||||||
## Add your files
|
|
||||||
|
|
||||||
- [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
|
|
||||||
- [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command:
|
|
||||||
|
|
||||||
```
|
```
|
||||||
cd existing_repo
|
kubectl apply -k .
|
||||||
git remote add origin https://gitlab.tryton.geeraert.eu/pierre/nextcloud_kube.git
|
|
||||||
git branch -M main
|
|
||||||
git push -uf origin main
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Integrate with your tools
|
|
||||||
|
|
||||||
- [ ] [Set up project integrations](https://gitlab.tryton.geeraert.eu/pierre/nextcloud_kube/-/settings/integrations)
|
|
||||||
|
|
||||||
## Collaborate with your team
|
File generated using the following command
|
||||||
|
```
|
||||||
|
helm repo add netdata https://netdata.github.io/helmchart/ && helm repo update
|
||||||
|
|
||||||
- [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/)
|
helm template -n netdata netdata netdata/netdata \
|
||||||
- [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
|
--set image.tag=edge \
|
||||||
- [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
|
--set parent.claiming.enabled="true" \
|
||||||
- [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
|
--set parent.claiming.token=CIlCwV6GawNWIfhrqMVmPAJixo_BSaGvwVbHKFOCQCHbYG5J8Ac0FDxKrObJ727F1dndg8J-v6apUhzGho6RIOlkrqJ_F7DKodjLqbsSWb7Ta-GSHkkuHcTXidxKxEo5RK0jiqU \
|
||||||
- [ ] [Set auto-merge](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html)
|
--set parent.claiming.rooms=e15a4f12-89d7-4d5b-b588-6658fa835473 \
|
||||||
|
--set child.claiming.enabled="true" \
|
||||||
|
--set child.claiming.token=CIlCwV6GawNWIfhrqMVmPAJixo_BSaGvwVbHKFOCQCHbYG5J8Ac0FDxKrObJ727F1dndg8J-v6apUhzGho6RIOlkrqJ_F7DKodjLqbsSWb7Ta-GSHkkuHcTXidxKxEo5RK0jiqU \
|
||||||
|
--set child.claiming.rooms=e15a4f12-89d7-4d5b-b588-6658fa835473 > /opt/kubernetes/netdata_kube/netdata_helm.yml
|
||||||
|
```
|
||||||
|
|
||||||
## Test and Deploy
|
I had to manually add a namespace block
|
||||||
|
```
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: netdata
|
||||||
|
```
|
||||||
|
|
||||||
Use the built-in continuous integration in GitLab.
|
|
||||||
|
|
||||||
- [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/index.html)
|
Also modify the PersistentVolumeClaim
|
||||||
- [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing (SAST)](https://docs.gitlab.com/ee/user/application_security/sast/)
|
```
|
||||||
- [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
|
spec:
|
||||||
- [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/)
|
storageClassName: nfs-storage-intelligent
|
||||||
- [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)
|
```
|
||||||
|
|
||||||
***
|
example :
|
||||||
|
|
||||||
# Editing this README
|
```
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: paperless-media
|
||||||
|
spec:
|
||||||
|
storageClassName: nfs-storage-intelligent
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteMany
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 20Gi
|
||||||
|
```
|
||||||
|
|
||||||
When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thanks to [makeareadme.com](https://www.makeareadme.com/) for this template.
|
|
||||||
|
|
||||||
## Suggestions for a good README
|
|
||||||
|
|
||||||
Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
|
|
||||||
|
|
||||||
## Name
|
|
||||||
Choose a self-explaining name for your project.
|
|
||||||
|
|
||||||
## Description
|
|
||||||
Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
|
|
||||||
|
|
||||||
## Badges
|
|
||||||
On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
|
|
||||||
|
|
||||||
## Visuals
|
|
||||||
Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
|
|
||||||
|
|
||||||
## Installation
|
|
||||||
Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
|
|
||||||
|
|
||||||
## Support
|
|
||||||
Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
|
|
||||||
|
|
||||||
## Roadmap
|
|
||||||
If you have ideas for releases in the future, it is a good idea to list them in the README.
|
|
||||||
|
|
||||||
## Contributing
|
|
||||||
State if you are open to contributions and what your requirements are for accepting them.
|
|
||||||
|
|
||||||
For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
|
|
||||||
|
|
||||||
You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
|
|
||||||
|
|
||||||
## Authors and acknowledgment
|
|
||||||
Show your appreciation to those who have contributed to the project.
|
|
||||||
|
|
||||||
## License
|
|
||||||
For open source projects, say how it is licensed.
|
|
||||||
|
|
||||||
## Project status
|
|
||||||
If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.
|
|
||||||
|
|||||||
Executable
+3
@@ -0,0 +1,3 @@
|
|||||||
|
modules:
|
||||||
|
pulsar: no
|
||||||
|
prometheus: yes
|
||||||
Executable
+8
@@ -0,0 +1,8 @@
|
|||||||
|
update_every: 1
|
||||||
|
autodetection_retry: 0
|
||||||
|
jobs:
|
||||||
|
- name: local
|
||||||
|
url: http://127.0.0.1:10255/metrics
|
||||||
|
- name: local
|
||||||
|
url: https://localhost:10250/metrics
|
||||||
|
tls_skip_verify: yes
|
||||||
Executable
+5
@@ -0,0 +1,5 @@
|
|||||||
|
update_every: 1
|
||||||
|
autodetection_retry: 0
|
||||||
|
jobs:
|
||||||
|
- name: local
|
||||||
|
url: http://127.0.0.1:10249/metrics
|
||||||
Executable
+8
@@ -0,0 +1,8 @@
|
|||||||
|
[db]
|
||||||
|
mode = ram
|
||||||
|
[web]
|
||||||
|
bind to = localhost:19999
|
||||||
|
[health]
|
||||||
|
enabled = no
|
||||||
|
[ml]
|
||||||
|
enabled = no
|
||||||
Executable
+37
@@ -0,0 +1,37 @@
|
|||||||
|
# OpenTelemetry Plugin Configuration
|
||||||
|
# To customize, run: edit-config otel.yaml
|
||||||
|
# Only include the fields you want to change — missing fields keep their defaults.
|
||||||
|
|
||||||
|
endpoint:
|
||||||
|
path: "127.0.0.1:4317"
|
||||||
|
tls_cert_path: null
|
||||||
|
tls_key_path: null
|
||||||
|
tls_ca_cert_path: null
|
||||||
|
|
||||||
|
metrics:
|
||||||
|
chart_configs_dir: /etc/netdata/otel.d/v1/metrics
|
||||||
|
interval_secs: 10
|
||||||
|
grace_period_secs: 60
|
||||||
|
expiry_duration_secs: 900
|
||||||
|
max_new_charts_per_request: 100
|
||||||
|
|
||||||
|
base_dir: /var/log/netdata/otel/v2
|
||||||
|
|
||||||
|
remote_storage:
|
||||||
|
enabled: false
|
||||||
|
uri: "fs:///var/log/netdata/otel/v2/remote"
|
||||||
|
read_cache_max_size: "1GB"
|
||||||
|
|
||||||
|
auth:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
logs:
|
||||||
|
rotation:
|
||||||
|
default:
|
||||||
|
max_file_size: "25MB"
|
||||||
|
max_entries: 50000
|
||||||
|
retention:
|
||||||
|
default:
|
||||||
|
max_files: 100000
|
||||||
|
max_total_size: "1GB"
|
||||||
|
max_age: "7 days"
|
||||||
Executable
+242
@@ -0,0 +1,242 @@
|
|||||||
|
disabled: no
|
||||||
|
|
||||||
|
name: 'kubernetes'
|
||||||
|
|
||||||
|
discover:
|
||||||
|
- discoverer: k8s
|
||||||
|
k8s:
|
||||||
|
- tags: unknown
|
||||||
|
role: pod
|
||||||
|
pod:
|
||||||
|
local_mode: yes
|
||||||
|
classify:
|
||||||
|
- name: "Control-Plane"
|
||||||
|
selector: unknown
|
||||||
|
tags: -unknown control_plane
|
||||||
|
match:
|
||||||
|
- tags: kube_scheduler
|
||||||
|
expr: '{{ glob .Image "k8s.gcr.io/kube-scheduler:*" }}'
|
||||||
|
- tags: kube_controller_manager
|
||||||
|
expr: '{{ glob .Image "k8s.gcr.io/kube-controller-manager:*" }}'
|
||||||
|
- name: "Applications"
|
||||||
|
selector: unknown
|
||||||
|
tags: -unknown applications
|
||||||
|
match:
|
||||||
|
- tags: activemq
|
||||||
|
expr: '{{ and (eq .Port "8161") (glob .Image "*/activemq*") }}'
|
||||||
|
- tags: apache
|
||||||
|
expr: '{{ and (eq .Port "80" "8080") (glob .Image "httpd*" "*/httpd*") }}'
|
||||||
|
- tags: bind
|
||||||
|
expr: '{{ and (eq .Port "8653") (glob .Image "*/bind*") }}'
|
||||||
|
- tags: cockroachdb
|
||||||
|
expr: '{{ and (eq .Port "8080") (glob .Image "*/cockroach*") }}'
|
||||||
|
- tags: consul
|
||||||
|
expr: '{{ and (eq .Port "8500") (glob .Image "consul*" "*/consul*") }}'
|
||||||
|
- tags: coredns
|
||||||
|
expr: '{{ and (eq .Port "9153") (glob .Image "*/coredns*") }}'
|
||||||
|
- tags: elasticsearch
|
||||||
|
expr: '{{ and (eq .Port "9200") (glob .Image "elasticsearch:*" "*/elasticsearch:*") }}'
|
||||||
|
- tags: fluentd
|
||||||
|
expr: '{{ and (eq .Port "24220") (glob .Image "fluentd*" "*/fluentd*") }}'
|
||||||
|
- tags: freeradius
|
||||||
|
expr: '{{ and (eq .Port "18121") (glob .Image "*/freeradius*") }}'
|
||||||
|
- tags: hdfs
|
||||||
|
expr: '{{ and (eq .Port "50070") (glob .Image "*/hdfs*") }}'
|
||||||
|
- tags: lighttpd
|
||||||
|
expr: '{{ and (eq .Port "80" "8080") (glob .Image "*/lighttpd*") }}'
|
||||||
|
- tags: logstash
|
||||||
|
expr: '{{ and (eq .Port "9600") (glob .Image "logstash*" "*/logstash*") }}'
|
||||||
|
- tags: mysql
|
||||||
|
expr: '{{ and (eq .Port "3306") (glob .Image "mysql*" "*/mysql*" "mariadb*" "*/mariadb*") }}'
|
||||||
|
- tags: nginx
|
||||||
|
expr: '{{ and (eq .Port "80" "8080") (glob .Image "nginx*" "*/nginx*") }}'
|
||||||
|
- tags: openvpn
|
||||||
|
expr: '{{ and (eq .Port "7505") (glob .Image "*/openvpn") }}'
|
||||||
|
- tags: phpfpm
|
||||||
|
expr: '{{ and (eq .Port "80" "8080") (glob .Image "*/phpfpm*" "*/php-fpm*") }}'
|
||||||
|
- tags: rabbitmq
|
||||||
|
expr: '{{ and (eq .Port "15672") (glob .Image "rabbitmq*" "*/rabbitmq*") }}'
|
||||||
|
- tags: solr
|
||||||
|
expr: '{{ and (eq .Port "8983") (glob .Image "solr*" "*/solr*") }}'
|
||||||
|
- tags: tengine
|
||||||
|
expr: '{{ and (eq .Port "80" "8080") (glob .Image "*/tengine*") }}'
|
||||||
|
- tags: unbound
|
||||||
|
expr: '{{ and (eq .Port "8953") (glob .Image "*/unbound*") }}'
|
||||||
|
- tags: vernemq
|
||||||
|
expr: '{{ and (eq .Port "8888") (glob .Image "*/vernemq*") }}'
|
||||||
|
- tags: zookeeper
|
||||||
|
expr: '{{ and (eq .Port "2181") (glob .Image "zookeeper*" "*/zookeeper*") }}'
|
||||||
|
- tags: consul_envoy
|
||||||
|
expr: |
|
||||||
|
{{ $imageOK := glob .Image "*/consul-dataplane*" -}}
|
||||||
|
{{ $scrapeOK := eq (get .Annotations "prometheus.io/scrape") "true" -}}
|
||||||
|
{{ $promPort := get .Annotations "prometheus.io/port" -}}
|
||||||
|
{{ $portOK1 := and (eq .Port $promPort) (not (empty .Port)) -}}
|
||||||
|
{{ $portOK2 := and (empty .Port) (not (empty $promPort)) -}}
|
||||||
|
{{ and $imageOK $scrapeOK (or $portOK1 $portOK2) }}
|
||||||
|
- name: "Prometheus Generic Applications"
|
||||||
|
selector: unknown
|
||||||
|
tags: -unknown prometheus_generic
|
||||||
|
match:
|
||||||
|
- tags: prometheus_generic
|
||||||
|
expr: |
|
||||||
|
{{ $scrapeOK := eq (get .Annotations "prometheus.io/scrape") "true" -}}
|
||||||
|
{{ $portOK := eq (default .Port (get .Annotations "prometheus.io/port")) .Port -}}
|
||||||
|
{{ $imageOK := not (glob .Image "netdata/netdata*" "*pulsar*" "*telegraf*") -}}
|
||||||
|
{{ and $scrapeOK $portOK $imageOK }}
|
||||||
|
compose:
|
||||||
|
- name: "Control-Plane"
|
||||||
|
selector: '!unknown control_plane'
|
||||||
|
config:
|
||||||
|
- selector: kube_scheduler
|
||||||
|
template: |
|
||||||
|
- module: prometheus
|
||||||
|
name: prometheus-{{.TUID}}
|
||||||
|
url: http://{{.PodIP}}:{{default "10251" .Port}}/metrics
|
||||||
|
app: '{{.ContName}}'
|
||||||
|
update_every: 10
|
||||||
|
max_time_series: 1000
|
||||||
|
- selector: kube_controller_manager
|
||||||
|
template: |
|
||||||
|
- module: prometheus
|
||||||
|
name: prometheus-{{.TUID}}
|
||||||
|
url: http://{{.PodIP}}:{{default "10252" .Port}}/metrics
|
||||||
|
app: '{{.ContName}}'
|
||||||
|
update_every: 10
|
||||||
|
max_time_series: 2000
|
||||||
|
- name: "Prometheus Generic Applications"
|
||||||
|
selector: '!unknown prometheus_generic'
|
||||||
|
config:
|
||||||
|
- selector: prometheus_generic
|
||||||
|
template: |
|
||||||
|
{{ $path := default "/metrics" (get .Annotations "prometheus.io/path") -}}
|
||||||
|
- module: prometheus
|
||||||
|
name: prometheus-{{.TUID}}
|
||||||
|
url: http://{{.Address}}{{$path}}
|
||||||
|
app: '{{.ContName}}'
|
||||||
|
update_every: 10
|
||||||
|
max_time_series: 4000
|
||||||
|
- name: "Applications"
|
||||||
|
selector: '!unknown applications'
|
||||||
|
tags: file
|
||||||
|
config:
|
||||||
|
- selector: activemq
|
||||||
|
template: |
|
||||||
|
- module: activemq
|
||||||
|
name: activemq-{{.TUID}}
|
||||||
|
url: http://{{.Address}}
|
||||||
|
- selector: apache
|
||||||
|
template: |
|
||||||
|
- module: apache
|
||||||
|
name: apache-{{.TUID}}
|
||||||
|
url: http://{{.Address}}/server-status?auto
|
||||||
|
- selector: bind
|
||||||
|
template: |
|
||||||
|
- module: bind
|
||||||
|
name: bind-{{.TUID}}
|
||||||
|
url: http://{{.Address}}/json/v1
|
||||||
|
- selector: cockroachdb
|
||||||
|
template: |
|
||||||
|
- module: cockroachdb
|
||||||
|
name: cockroachdb-{{.TUID}}
|
||||||
|
url: http://{{.Address}}/_status/vars
|
||||||
|
- selector: consul
|
||||||
|
template: |
|
||||||
|
- module: consul
|
||||||
|
name: consul-{{.TUID}}
|
||||||
|
url: http://{{.Address}}
|
||||||
|
- selector: coredns
|
||||||
|
template: |
|
||||||
|
- module: coredns
|
||||||
|
name: coredns-{{.TUID}}
|
||||||
|
url: http://{{.Address}}/metrics
|
||||||
|
- selector: elasticsearch
|
||||||
|
template: |
|
||||||
|
- module: elasticsearch
|
||||||
|
name: elasticsearch-{{.TUID}}
|
||||||
|
url: http://{{.Address}}
|
||||||
|
- selector: consul_envoy
|
||||||
|
template: |
|
||||||
|
{{ $path := default "/metrics" (get .Annotations "prometheus.io/path") -}}
|
||||||
|
{{ $promPort := get .Annotations "prometheus.io/port" -}}
|
||||||
|
{{ $port := ternary .Port $promPort (not (empty .Port)) -}}
|
||||||
|
- module: envoy
|
||||||
|
name: {{.TUID}}
|
||||||
|
url: http://{{ .PodIP }}:{{ $port }}{{ $path }}
|
||||||
|
- selector: fluentd
|
||||||
|
template: |
|
||||||
|
- module: fluentd
|
||||||
|
name: fluentd-{{.TUID}}
|
||||||
|
url: http://{{.Address}}
|
||||||
|
- selector: freeradius
|
||||||
|
template: |
|
||||||
|
- module: freeradius
|
||||||
|
name: freeradius-{{.TUID}}
|
||||||
|
address: {{.PodIP}}
|
||||||
|
port: {{.Port}}
|
||||||
|
- selector: hdfs
|
||||||
|
template: |
|
||||||
|
- module: hdfs
|
||||||
|
name: hdfs-{{.TUID}}
|
||||||
|
url: http://{{.Address}}/jmx
|
||||||
|
- selector: lighttpd
|
||||||
|
template: |
|
||||||
|
- module: lighttpd
|
||||||
|
name: lighttpd-{{.TUID}}
|
||||||
|
url: http://{{.Address}}/server-status?auto
|
||||||
|
- selector: logstash
|
||||||
|
template: |
|
||||||
|
- module: logstash
|
||||||
|
name: logstash-{{.TUID}}
|
||||||
|
url: http://{{.Address}}
|
||||||
|
- selector: mysql
|
||||||
|
template: |
|
||||||
|
- module: mysql
|
||||||
|
name: mysql-{{.TUID}}
|
||||||
|
dsn: 'netdata@tcp({{.Address}})/'
|
||||||
|
- selector: nginx
|
||||||
|
template: |
|
||||||
|
- module: nginx
|
||||||
|
name: nginx-{{.TUID}}
|
||||||
|
url: http://{{.Address}}/stub_status
|
||||||
|
- selector: openvpn
|
||||||
|
template: |
|
||||||
|
- module: openvpn
|
||||||
|
name: openvpn-{{.TUID}}
|
||||||
|
address: {{.Address}}
|
||||||
|
- selector: phpfpm
|
||||||
|
template: |
|
||||||
|
- module: phpfpm
|
||||||
|
name: phpfpm-{{.TUID}}
|
||||||
|
url: http://{{.Address}}/status?full&json
|
||||||
|
- selector: rabbitmq
|
||||||
|
template: |
|
||||||
|
- module: rabbitmq
|
||||||
|
name: rabbitmq-{{.TUID}}
|
||||||
|
url: http://{{.Address}}
|
||||||
|
- selector: solr
|
||||||
|
template: |
|
||||||
|
- module: solr
|
||||||
|
name: solr-{{.TUID}}
|
||||||
|
url: http://{{.Address}}
|
||||||
|
- selector: tengine
|
||||||
|
template: |
|
||||||
|
- module: tengine
|
||||||
|
name: tengine-{{.TUID}}
|
||||||
|
url: http://{{.Address}}/us
|
||||||
|
- selector: unbound
|
||||||
|
template: |
|
||||||
|
- module: unbound
|
||||||
|
name: unbound-{{.TUID}}
|
||||||
|
address: {{.Address}}
|
||||||
|
use_tls: false
|
||||||
|
- selector: vernemq
|
||||||
|
template: |
|
||||||
|
- module: vernemq
|
||||||
|
name: vernemq-{{.TUID}}
|
||||||
|
url: http://{{.Address}}/metrics
|
||||||
|
- selector: zookeeper
|
||||||
|
template: |
|
||||||
|
- module: zookeeper
|
||||||
|
name: zookeeper-{{.TUID}}
|
||||||
|
address: {{.Address}}
|
||||||
Executable
+8
@@ -0,0 +1,8 @@
|
|||||||
|
[stream]
|
||||||
|
enabled = yes
|
||||||
|
destination = netdata:19999
|
||||||
|
api key = 11111111-2222-3333-4444-555555555555
|
||||||
|
timeout seconds = 60
|
||||||
|
buffer size bytes = 1048576
|
||||||
|
reconnect delay seconds = 5
|
||||||
|
initial clock resync iterations = 60
|
||||||
Executable
+7
@@ -0,0 +1,7 @@
|
|||||||
|
jobs:
|
||||||
|
- name: django_testing
|
||||||
|
path: /host/var/log/pods/django-testing_django-testing-7f89d9ffc5-mcm9g_ad5b3bbf-33ca-410f-aa0e-457664c6345b/django-testing/0.log
|
||||||
|
log_type: auto
|
||||||
|
- name: nginx
|
||||||
|
path: /host/var/log/pods/reverse-proxy_reverse-proxy-67c767c86f-pxvdz_af6033a7-dfcb-4430-a67b-ee75ea424cf7/reverse-proxy/0.log
|
||||||
|
log_type: auto
|
||||||
Executable
+153
@@ -0,0 +1,153 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: DaemonSet
|
||||||
|
metadata:
|
||||||
|
name: netdata-child
|
||||||
|
labels:
|
||||||
|
app: netdata
|
||||||
|
role: child
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: netdata
|
||||||
|
role: child
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
annotations:
|
||||||
|
container.apparmor.security.beta.kubernetes.io/netdata: unconfined
|
||||||
|
labels:
|
||||||
|
app: netdata
|
||||||
|
role: child
|
||||||
|
spec:
|
||||||
|
serviceAccountName: netdata
|
||||||
|
restartPolicy: Always
|
||||||
|
hostPID: true
|
||||||
|
hostIPC: true
|
||||||
|
hostNetwork: true
|
||||||
|
initContainers:
|
||||||
|
- name: init-persistence
|
||||||
|
image: "alpine:latest"
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 10m
|
||||||
|
imagePullPolicy: Always
|
||||||
|
volumeMounts:
|
||||||
|
- name: persistencevarlibdir
|
||||||
|
mountPath: "/persistencevarlibdir"
|
||||||
|
command: ["/bin/sh"]
|
||||||
|
args:
|
||||||
|
- "-c"
|
||||||
|
- "chmod 777 /persistencevarlibdir;"
|
||||||
|
containers:
|
||||||
|
- name: netdata
|
||||||
|
image: "netdata/netdata:edge"
|
||||||
|
imagePullPolicy: Always
|
||||||
|
env:
|
||||||
|
- name: NETDATA_CLAIM_URL
|
||||||
|
value: "https://api.netdata.cloud"
|
||||||
|
- name: NETDATA_CLAIM_TOKEN
|
||||||
|
value: "CIlCwV6GawNWIfhrqMVmPAJixo_BSaGvwVbHKFOCQCHbYG5J8Ac0FDxKrObJ727F1dndg8J-v6apUhzGho6RIOlkrqJ_F7DKodjLqbsSWb7Ta-GSHkkuHcTXidxKxEo5RK0jiqU"
|
||||||
|
- name: NETDATA_CLAIM_ROOMS
|
||||||
|
value: "e15a4f12-89d7-4d5b-b588-6658fa835473"
|
||||||
|
- name: MY_POD_NAME
|
||||||
|
valueFrom:
|
||||||
|
fieldRef:
|
||||||
|
fieldPath: metadata.name
|
||||||
|
- name: MY_NODE_NAME
|
||||||
|
valueFrom:
|
||||||
|
fieldRef:
|
||||||
|
fieldPath: spec.nodeName
|
||||||
|
- name: MY_POD_NAMESPACE
|
||||||
|
valueFrom:
|
||||||
|
fieldRef:
|
||||||
|
fieldPath: metadata.namespace
|
||||||
|
- name: NETDATA_LISTENER_PORT
|
||||||
|
value: '19999'
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
containerPort: 19999
|
||||||
|
protocol: TCP
|
||||||
|
livenessProbe:
|
||||||
|
exec:
|
||||||
|
command: ["/usr/sbin/netdatacli", "ping"]
|
||||||
|
initialDelaySeconds: 0
|
||||||
|
failureThreshold: 3
|
||||||
|
periodSeconds: 30
|
||||||
|
successThreshold: 1
|
||||||
|
timeoutSeconds: 1
|
||||||
|
readinessProbe:
|
||||||
|
exec:
|
||||||
|
command: ["/usr/sbin/netdatacli", "ping"]
|
||||||
|
initialDelaySeconds: 0
|
||||||
|
failureThreshold: 3
|
||||||
|
periodSeconds: 30
|
||||||
|
successThreshold: 1
|
||||||
|
timeoutSeconds: 1
|
||||||
|
volumeMounts:
|
||||||
|
- name: proc
|
||||||
|
readOnly: true
|
||||||
|
mountPath: /host/proc
|
||||||
|
- name: sys
|
||||||
|
mountPath: /host/sys
|
||||||
|
- name: os-release
|
||||||
|
mountPath: /host/etc/os-release
|
||||||
|
- name: varlog
|
||||||
|
mountPath: /host/var/log
|
||||||
|
- name: configmap
|
||||||
|
mountPath: /etc/netdata/go.d.conf
|
||||||
|
subPath: go.d
|
||||||
|
- name: configmap
|
||||||
|
mountPath: /etc/netdata/go.d/k8s_kubelet.conf
|
||||||
|
subPath: kubelet
|
||||||
|
- name: configmap
|
||||||
|
mountPath: /etc/netdata/go.d/k8s_kubeproxy.conf
|
||||||
|
subPath: kubeproxy
|
||||||
|
- name: configmap
|
||||||
|
mountPath: /etc/netdata/go.d/web_log.conf
|
||||||
|
subPath: web_log
|
||||||
|
- name: configmap
|
||||||
|
mountPath: /etc/netdata/netdata.conf
|
||||||
|
subPath: netdata
|
||||||
|
- name: configmap
|
||||||
|
mountPath: /etc/netdata/stream.conf
|
||||||
|
subPath: stream
|
||||||
|
- name: persistencevarlibdir
|
||||||
|
mountPath: /var/lib/netdata
|
||||||
|
- name: sdconfigmap
|
||||||
|
mountPath: "/etc/netdata/go.d/sd/k8s.conf"
|
||||||
|
subPath: config.yml
|
||||||
|
securityContext:
|
||||||
|
capabilities:
|
||||||
|
add:
|
||||||
|
- SYS_PTRACE
|
||||||
|
- SYS_ADMIN
|
||||||
|
resources: {}
|
||||||
|
tolerations:
|
||||||
|
- effect: NoSchedule
|
||||||
|
operator: Exists
|
||||||
|
terminationGracePeriodSeconds: 30
|
||||||
|
volumes:
|
||||||
|
- name: proc
|
||||||
|
hostPath:
|
||||||
|
path: /proc
|
||||||
|
- name: sys
|
||||||
|
hostPath:
|
||||||
|
path: /sys
|
||||||
|
- name: os-release
|
||||||
|
hostPath:
|
||||||
|
path: /etc/os-release
|
||||||
|
- name: varlog
|
||||||
|
hostPath:
|
||||||
|
path: /var/log
|
||||||
|
- name: configmap
|
||||||
|
configMap:
|
||||||
|
name: netdata-conf-child
|
||||||
|
optional: true
|
||||||
|
- name: persistencevarlibdir
|
||||||
|
hostPath:
|
||||||
|
path: /var/lib/netdata-k8s-child/var/lib/netdata
|
||||||
|
type: DirectoryOrCreate
|
||||||
|
- name: sdconfigmap
|
||||||
|
configMap:
|
||||||
|
name: netdata-child-sd-config-map
|
||||||
|
optional: true
|
||||||
|
dnsPolicy: ClusterFirstWithHostNet
|
||||||
Executable
+14
@@ -0,0 +1,14 @@
|
|||||||
|
update_every: 3600
|
||||||
|
autodetection_retry: 0
|
||||||
|
jobs:
|
||||||
|
- name: job1
|
||||||
|
record_types:
|
||||||
|
- A
|
||||||
|
- AAAA
|
||||||
|
domains:
|
||||||
|
- google.com
|
||||||
|
- github.com
|
||||||
|
- gitea.tryton.geeraert.eu
|
||||||
|
servers:
|
||||||
|
- 8.8.8.8
|
||||||
|
- 8.8.4.4
|
||||||
Executable
+3
@@ -0,0 +1,3 @@
|
|||||||
|
jobs:
|
||||||
|
- name: k8s_state
|
||||||
|
update_every: 1
|
||||||
Executable
+6
@@ -0,0 +1,6 @@
|
|||||||
|
default_run: no
|
||||||
|
modules:
|
||||||
|
k8s_state: yes
|
||||||
|
httpcheck: yes
|
||||||
|
dnsquery: yes
|
||||||
|
x509check: yes
|
||||||
Executable
+11
@@ -0,0 +1,11 @@
|
|||||||
|
update_every: 1
|
||||||
|
autodetection_retry: 0
|
||||||
|
jobs:
|
||||||
|
#- name: gitea
|
||||||
|
# url: https://gitea.tryton.geeraert.eu:443
|
||||||
|
# headers:
|
||||||
|
# Host: localhost:8080
|
||||||
|
# User-Agent: netdata/go.d.plugin
|
||||||
|
# Accept: "*/*"
|
||||||
|
#- name: bitwarden
|
||||||
|
# url: https://bitwarden.tryton.geeraert.eu:443
|
||||||
Executable
+28
@@ -0,0 +1,28 @@
|
|||||||
|
[global]
|
||||||
|
hostname = netdata-k8s-state
|
||||||
|
[db]
|
||||||
|
mode = ram
|
||||||
|
[web]
|
||||||
|
bind to = localhost:19999
|
||||||
|
[health]
|
||||||
|
enabled = no
|
||||||
|
[ml]
|
||||||
|
enabled = no
|
||||||
|
[plugins]
|
||||||
|
timex = no
|
||||||
|
checks = no
|
||||||
|
idlejitter = no
|
||||||
|
tc = no
|
||||||
|
diskspace = no
|
||||||
|
proc = no
|
||||||
|
cgroups = no
|
||||||
|
enable running new plugins = no
|
||||||
|
slabinfo = no
|
||||||
|
perf = no
|
||||||
|
go.d = yes
|
||||||
|
ioping = no
|
||||||
|
ebpf = no
|
||||||
|
charts.d = no
|
||||||
|
apps = no
|
||||||
|
python.d = no
|
||||||
|
fping = no
|
||||||
Executable
+8
@@ -0,0 +1,8 @@
|
|||||||
|
[stream]
|
||||||
|
enabled = yes
|
||||||
|
destination = netdata:19999
|
||||||
|
api key = 11111111-2222-3333-4444-555555555555
|
||||||
|
timeout seconds = 60
|
||||||
|
buffer size bytes = 1048576
|
||||||
|
reconnect delay seconds = 5
|
||||||
|
initial clock resync iterations = 60
|
||||||
Executable
+3
@@ -0,0 +1,3 @@
|
|||||||
|
jobs:
|
||||||
|
- name: my_site_cert
|
||||||
|
source: https://gitea.tryton.geeraert.eu:443
|
||||||
Executable
+101
@@ -0,0 +1,101 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: netdata-k8s-state
|
||||||
|
labels:
|
||||||
|
app: netdata
|
||||||
|
role: k8sState
|
||||||
|
spec:
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: netdata
|
||||||
|
role: k8sState
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
annotations:
|
||||||
|
container.apparmor.security.beta.kubernetes.io/netdata: unconfined
|
||||||
|
labels:
|
||||||
|
app: netdata
|
||||||
|
role: k8sState
|
||||||
|
spec:
|
||||||
|
securityContext:
|
||||||
|
fsGroup: 201
|
||||||
|
serviceAccountName: netdata
|
||||||
|
restartPolicy: Always
|
||||||
|
containers:
|
||||||
|
- name: netdata
|
||||||
|
image: "netdata/netdata:edge"
|
||||||
|
imagePullPolicy: Always
|
||||||
|
env:
|
||||||
|
- name: MY_POD_NAME
|
||||||
|
valueFrom:
|
||||||
|
fieldRef:
|
||||||
|
fieldPath: metadata.name
|
||||||
|
- name: MY_POD_NAMESPACE
|
||||||
|
valueFrom:
|
||||||
|
fieldRef:
|
||||||
|
fieldPath: metadata.namespace
|
||||||
|
- name: NETDATA_LISTENER_PORT
|
||||||
|
value: '19999'
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
containerPort: 19999
|
||||||
|
protocol: TCP
|
||||||
|
livenessProbe:
|
||||||
|
exec:
|
||||||
|
command: ["/usr/sbin/netdatacli", "ping"]
|
||||||
|
initialDelaySeconds: 0
|
||||||
|
failureThreshold: 3
|
||||||
|
periodSeconds: 30
|
||||||
|
successThreshold: 1
|
||||||
|
timeoutSeconds: 1
|
||||||
|
readinessProbe:
|
||||||
|
exec:
|
||||||
|
command: ["/usr/sbin/netdatacli", "ping"]
|
||||||
|
initialDelaySeconds: 0
|
||||||
|
failureThreshold: 3
|
||||||
|
periodSeconds: 30
|
||||||
|
successThreshold: 1
|
||||||
|
timeoutSeconds: 1
|
||||||
|
volumeMounts:
|
||||||
|
- name: os-release
|
||||||
|
mountPath: /host/etc/os-release
|
||||||
|
- name: configmap
|
||||||
|
mountPath: /etc/netdata/go.d.conf
|
||||||
|
subPath: go.d
|
||||||
|
- name: configmap
|
||||||
|
mountPath: /etc/netdata/go.d/httpcheck.conf
|
||||||
|
subPath: httpcheck
|
||||||
|
- name: configmap
|
||||||
|
mountPath: /etc/netdata/go.d/dns_query.conf
|
||||||
|
subPath: dnsquery
|
||||||
|
- name: configmap
|
||||||
|
mountPath: /etc/netdata/go.d/x509check.conf
|
||||||
|
subPath: x509check
|
||||||
|
- name: configmap
|
||||||
|
mountPath: /etc/netdata/go.d/k8s_state.conf
|
||||||
|
subPath: go.d-k8s_state
|
||||||
|
- name: configmap
|
||||||
|
mountPath: /etc/netdata/netdata.conf
|
||||||
|
subPath: netdata
|
||||||
|
- name: configmap
|
||||||
|
mountPath: /etc/netdata/stream.conf
|
||||||
|
subPath: stream
|
||||||
|
- name: varlib
|
||||||
|
mountPath: /var/lib/netdata
|
||||||
|
resources: {}
|
||||||
|
terminationGracePeriodSeconds: 30
|
||||||
|
volumes:
|
||||||
|
- name: os-release
|
||||||
|
hostPath:
|
||||||
|
path: /etc/os-release
|
||||||
|
- name: configmap
|
||||||
|
configMap:
|
||||||
|
name: netdata-conf-k8s-state
|
||||||
|
optional: true
|
||||||
|
- name: varlib
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: netdata-k8s-state-varlib
|
||||||
|
dnsPolicy: ClusterFirstWithHostNet
|
||||||
Executable
+13
@@ -0,0 +1,13 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: netdata-k8s-state-varlib
|
||||||
|
labels:
|
||||||
|
app: netdata
|
||||||
|
role: k8sState
|
||||||
|
spec:
|
||||||
|
storageClassName: nfs-storage-intelligent
|
||||||
|
accessModes: ["ReadWriteOnce"]
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 1Gi
|
||||||
Executable
+51
@@ -0,0 +1,51 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
|
||||||
|
namespace: netdata
|
||||||
|
|
||||||
|
resources:
|
||||||
|
- namespace.yaml
|
||||||
|
- rbac.yaml
|
||||||
|
- child/daemonset.yaml
|
||||||
|
- k8s-state/deployment.yaml
|
||||||
|
- k8s-state/pvc.yaml
|
||||||
|
- parent/deployment.yaml
|
||||||
|
- parent/service.yaml
|
||||||
|
- parent/pvc.yaml
|
||||||
|
- parent/ingress.yaml
|
||||||
|
|
||||||
|
# configMapGenerator content-hashes each ConfigMap's name (e.g. netdata-conf-child-a1b2c3d4).
|
||||||
|
# Kustomize automatically rewrites every Deployment/DaemonSet reference to the new hashed
|
||||||
|
# name whenever any file below changes. Since the pod template's volume spec then differs,
|
||||||
|
# Kubernetes rolls the pods automatically on `kubectl apply` — no manual checksum bump,
|
||||||
|
# no manual `rollout restart`, ever again.
|
||||||
|
configMapGenerator:
|
||||||
|
- name: netdata-conf-child
|
||||||
|
files:
|
||||||
|
- go.d=child/conf/go.d.yaml
|
||||||
|
- kubelet=child/conf/kubelet.yaml
|
||||||
|
- kubeproxy=child/conf/kubeproxy.yaml
|
||||||
|
- web_log=child/conf/web_log.yaml
|
||||||
|
- netdata=child/conf/netdata.conf
|
||||||
|
- stream=child/conf/stream.conf
|
||||||
|
|
||||||
|
- name: netdata-child-sd-config-map
|
||||||
|
files:
|
||||||
|
- config.yml=child/conf/sd-config.yml
|
||||||
|
|
||||||
|
- name: netdata-conf-k8s-state
|
||||||
|
files:
|
||||||
|
- go.d=k8s-state/conf/go.d.yaml
|
||||||
|
- go.d-k8s_state=k8s-state/conf/go.d-k8s_state.yaml
|
||||||
|
- netdata=k8s-state/conf/netdata.conf
|
||||||
|
- stream=k8s-state/conf/stream.conf
|
||||||
|
- httpcheck=k8s-state/conf/httpcheck.yaml
|
||||||
|
- dnsquery=k8s-state/conf/dnsquery.yaml
|
||||||
|
- x509check=k8s-state/conf/x509check.yaml
|
||||||
|
|
||||||
|
- name: netdata-conf-parent
|
||||||
|
files:
|
||||||
|
- health=parent/conf/health.conf
|
||||||
|
- netdata=parent/conf/netdata.conf
|
||||||
|
- stream=parent/conf/stream.conf
|
||||||
|
- otel=parent/conf/otel.yaml
|
||||||
Executable
+4
@@ -0,0 +1,4 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: netdata
|
||||||
@@ -1,85 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: Namespace
|
|
||||||
metadata:
|
|
||||||
name: netdata
|
|
||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: ServiceAccount
|
|
||||||
metadata:
|
|
||||||
name: netdata-sa-clusteradmin
|
|
||||||
namespace: netdata
|
|
||||||
---
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
kind: ClusterRoleBinding
|
|
||||||
metadata:
|
|
||||||
name: netdata-crb-clusteradmin
|
|
||||||
roleRef:
|
|
||||||
apiGroup: rbac.authorization.k8s.io
|
|
||||||
kind: ClusterRole
|
|
||||||
name: cluster-admin
|
|
||||||
subjects:
|
|
||||||
- kind: ServiceAccount
|
|
||||||
name: netdata-sa-clusteradmin
|
|
||||||
namespace: netdata
|
|
||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: netdata-agent
|
|
||||||
namespace: netdata
|
|
||||||
spec:
|
|
||||||
# type: NodePort
|
|
||||||
selector:
|
|
||||||
app: netdata-agent
|
|
||||||
ports:
|
|
||||||
- name: http
|
|
||||||
protocol: TCP
|
|
||||||
port: 19999
|
|
||||||
# targetPort: 80
|
|
||||||
# nodePort: 30999
|
|
||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: netdata-agent-headless
|
|
||||||
namespace: netdata
|
|
||||||
spec:
|
|
||||||
clusterIP: None
|
|
||||||
selector:
|
|
||||||
app: netdata-agent
|
|
||||||
---
|
|
||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: netdata-agent
|
|
||||||
namespace: netdata
|
|
||||||
spec:
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
app: netdata-agent
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: netdata-agent
|
|
||||||
spec:
|
|
||||||
serviceAccountName: netdata-sa-clusteradmin
|
|
||||||
containers:
|
|
||||||
- name: netdata-agent
|
|
||||||
image: netdata/netdata
|
|
||||||
imagePullPolicy: Always
|
|
||||||
env:
|
|
||||||
- name: LOG_LEVEL
|
|
||||||
value: DEBUG
|
|
||||||
- name: AGENT_CLUSTER_ADDR
|
|
||||||
value: "netdata-agent-headless"
|
|
||||||
- name: KUBERNETES_POD_IP
|
|
||||||
valueFrom:
|
|
||||||
fieldRef:
|
|
||||||
fieldPath: status.podIP
|
|
||||||
resources:
|
|
||||||
limits:
|
|
||||||
cpu: 200m
|
|
||||||
memory: 200Mi
|
|
||||||
ports:
|
|
||||||
- containerPort: 19999
|
|
||||||
protocol: TCP
|
|
||||||
@@ -1,970 +0,0 @@
|
|||||||
---
|
|
||||||
# Source: netdata/templates/serviceaccount.yaml
|
|
||||||
kind: ServiceAccount
|
|
||||||
apiVersion: v1
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: netdata
|
|
||||||
chart: netdata-3.7.88
|
|
||||||
release: netdata
|
|
||||||
heritage: Helm
|
|
||||||
name: netdata
|
|
||||||
namespace: netdata
|
|
||||||
---
|
|
||||||
# Source: netdata/templates/child/configmap.yaml
|
|
||||||
apiVersion: v1
|
|
||||||
kind: ConfigMap
|
|
||||||
metadata:
|
|
||||||
name: netdata-conf-child
|
|
||||||
namespace: netdata
|
|
||||||
labels:
|
|
||||||
app: netdata
|
|
||||||
chart: netdata-3.7.88
|
|
||||||
release: netdata
|
|
||||||
heritage: Helm
|
|
||||||
data:
|
|
||||||
|
|
||||||
go.d: |
|
|
||||||
modules:
|
|
||||||
pulsar: no
|
|
||||||
prometheus: yes
|
|
||||||
kubelet: |
|
|
||||||
update_every: 1
|
|
||||||
autodetection_retry: 0
|
|
||||||
jobs:
|
|
||||||
- url: http://127.0.0.1:10255/metrics
|
|
||||||
- url: https://localhost:10250/metrics
|
|
||||||
tls_skip_verify: yes
|
|
||||||
kubeproxy: |
|
|
||||||
update_every: 1
|
|
||||||
autodetection_retry: 0
|
|
||||||
jobs:
|
|
||||||
- url: http://127.0.0.1:10249/metrics
|
|
||||||
netdata: |
|
|
||||||
[db]
|
|
||||||
mode = ram
|
|
||||||
[health]
|
|
||||||
enabled = no
|
|
||||||
[ml]
|
|
||||||
enabled = no
|
|
||||||
stream: |
|
|
||||||
[stream]
|
|
||||||
enabled = yes
|
|
||||||
destination = netdata:19999
|
|
||||||
api key = 11111111-2222-3333-4444-555555555555
|
|
||||||
timeout seconds = 60
|
|
||||||
buffer size bytes = 1048576
|
|
||||||
reconnect delay seconds = 5
|
|
||||||
initial clock resync iterations = 60
|
|
||||||
---
|
|
||||||
# Source: netdata/templates/child/configmap.yaml
|
|
||||||
apiVersion: v1
|
|
||||||
kind: ConfigMap
|
|
||||||
metadata:
|
|
||||||
name: netdata-child-sd-config-map
|
|
||||||
namespace: netdata
|
|
||||||
labels:
|
|
||||||
app: netdata
|
|
||||||
chart: netdata-3.7.88
|
|
||||||
release: netdata
|
|
||||||
heritage: Helm
|
|
||||||
data:
|
|
||||||
config.yml: |
|
|
||||||
name: kubernetes
|
|
||||||
discovery:
|
|
||||||
k8s:
|
|
||||||
- tags: unknown
|
|
||||||
role: pod
|
|
||||||
local_mode: true
|
|
||||||
tag:
|
|
||||||
- name: "Control-Plane"
|
|
||||||
selector: unknown
|
|
||||||
tags: -unknown control_plane
|
|
||||||
match:
|
|
||||||
- tags: kube_scheduler
|
|
||||||
expr: '{{ glob .Image "k8s.gcr.io/kube-scheduler:*" }}'
|
|
||||||
- tags: kube_controller_manager
|
|
||||||
expr: '{{ glob .Image "k8s.gcr.io/kube-controller-manager:*" }}'
|
|
||||||
- name: "Applications"
|
|
||||||
selector: unknown
|
|
||||||
tags: -unknown applications
|
|
||||||
match:
|
|
||||||
- tags: activemq
|
|
||||||
expr: '{{ and (eq .Port "8161") (glob .Image "**/activemq*") }}'
|
|
||||||
- tags: apache
|
|
||||||
expr: '{{ and (eq .Port "80" "8080") (glob .Image "httpd*" "**/httpd*") }}'
|
|
||||||
- tags: bind
|
|
||||||
expr: '{{ and (eq .Port "8653") (glob .Image "**/bind*") }}'
|
|
||||||
- tags: cockroachdb
|
|
||||||
expr: '{{ and (eq .Port "8080") (glob .Image "**/cockroach*") }}'
|
|
||||||
- tags: consul
|
|
||||||
expr: '{{ and (eq .Port "8500") (glob .Image "consul*" "**/consul*") }}'
|
|
||||||
- tags: coredns
|
|
||||||
expr: '{{ and (eq .Port "9153") (glob .Image "**/coredns*") }}'
|
|
||||||
- tags: elasticsearch
|
|
||||||
expr: '{{ and (eq .Port "9200") (glob .Image "elasticsearch:*" "**/elasticsearch:*") }}'
|
|
||||||
- tags: fluentd
|
|
||||||
expr: '{{ and (eq .Port "24220") (glob .Image "fluentd*" "**/fluentd*") }}'
|
|
||||||
- tags: freeradius
|
|
||||||
expr: '{{ and (eq .Port "18121") (glob .Image "**/freeradius*") }}'
|
|
||||||
- tags: hdfs
|
|
||||||
expr: '{{ and (eq .Port "50070") (glob .Image "**/hdfs*") }}'
|
|
||||||
- tags: lighttpd
|
|
||||||
expr: '{{ and (eq .Port "80" "8080") (glob .Image "**/lighttpd*") }}'
|
|
||||||
- tags: logstash
|
|
||||||
expr: '{{ and (eq .Port "9600") (glob .Image "logstash*" "**/logstash*") }}'
|
|
||||||
- tags: mysql
|
|
||||||
expr: '{{ and (eq .Port "3306") (glob .Image "mysql*" "**/mysql*" "mariadb*" "**/mariadb*") }}'
|
|
||||||
- tags: nginx
|
|
||||||
expr: '{{ and (eq .Port "80" "8080") (glob .Image "nginx*" "**/nginx*") }}'
|
|
||||||
- tags: openvpn
|
|
||||||
expr: '{{ and (eq .Port "7505") (glob .Image "**/openvpn") }}'
|
|
||||||
- tags: phpfpm
|
|
||||||
expr: '{{ and (eq .Port "80" "8080") (glob .Image "**/phpfpm*" "**/php-fpm*") }}'
|
|
||||||
- tags: rabbitmq
|
|
||||||
expr: '{{ and (eq .Port "15672") (glob .Image "rabbitmq*" "**/rabbitmq*") }}'
|
|
||||||
- tags: solr
|
|
||||||
expr: '{{ and (eq .Port "8983") (glob .Image "solr*" "**/solr*") }}'
|
|
||||||
- tags: tengine
|
|
||||||
expr: '{{ and (eq .Port "80" "8080") (glob .Image "**/tengine*") }}'
|
|
||||||
- tags: unbound
|
|
||||||
expr: '{{ and (eq .Port "8953") (glob .Image "**/unbound*") }}'
|
|
||||||
- tags: vernemq
|
|
||||||
expr: '{{ and (eq .Port "8888") (glob .Image "**/vernemq*") }}'
|
|
||||||
- tags: zookeeper
|
|
||||||
expr: '{{ and (eq .Port "2181") (glob .Image "zookeeper*" "**/zookeeper*") }}'
|
|
||||||
- tags: consul_envoy
|
|
||||||
expr: |
|
|
||||||
{{ $imageOK := glob .Image "*/consul-dataplane*" -}}
|
|
||||||
{{ $scrapeOK := eq (get .Annotations "prometheus.io/scrape") "true" -}}
|
|
||||||
{{ $promPort := get .Annotations "prometheus.io/port" -}}
|
|
||||||
{{ $portOK1 := and (eq .Port $promPort) (not (empty .Port)) -}}
|
|
||||||
{{ $portOK2 := and (empty .Port) (not (empty $promPort)) -}}
|
|
||||||
{{ and $imageOK $scrapeOK (or $portOK1 $portOK2) }}
|
|
||||||
- name: "Prometheus Generic Applications"
|
|
||||||
selector: unknown
|
|
||||||
tags: -unknown prometheus_generic
|
|
||||||
match:
|
|
||||||
- tags: prometheus_generic
|
|
||||||
expr: |
|
|
||||||
{{ $scrapeOK := eq (get .Annotations "prometheus.io/scrape") "true" -}}
|
|
||||||
{{ $portOK := eq (default .Port (get .Annotations "prometheus.io/port")) .Port -}}
|
|
||||||
{{ $imageOK := not (glob .Image "netdata/netdata*" "**pulsar*" "**telegraf*") -}}
|
|
||||||
{{ and $scrapeOK $portOK $imageOK }}
|
|
||||||
build:
|
|
||||||
- name: "Control-Plane"
|
|
||||||
selector: '!unknown control_plane'
|
|
||||||
tags: file
|
|
||||||
apply:
|
|
||||||
- selector: kube_scheduler
|
|
||||||
template: |
|
|
||||||
- module: prometheus
|
|
||||||
name: prometheus-{{.TUID}}
|
|
||||||
url: http://{{.PodIP}}:{{default "10251" .Port}}/metrics
|
|
||||||
app: '{{.ContName}}'
|
|
||||||
update_every: 10
|
|
||||||
max_time_series: 1000
|
|
||||||
- selector: kube_controller_manager
|
|
||||||
template: |
|
|
||||||
- module: prometheus
|
|
||||||
name: prometheus-{{.TUID}}
|
|
||||||
url: http://{{.PodIP}}:{{default "10252" .Port}}/metrics
|
|
||||||
app: '{{.ContName}}'
|
|
||||||
update_every: 10
|
|
||||||
max_time_series: 2000
|
|
||||||
- name: "Prometheus Generic Applications"
|
|
||||||
selector: '!unknown prometheus_generic'
|
|
||||||
tags: file
|
|
||||||
apply:
|
|
||||||
- selector: prometheus_generic
|
|
||||||
template: |
|
|
||||||
{{ $path := default "/metrics" (get .Annotations "prometheus.io/path") -}}
|
|
||||||
- module: prometheus
|
|
||||||
name: prometheus-{{.TUID}}
|
|
||||||
url: http://{{.Address}}{{$path}}
|
|
||||||
app: '{{.ContName}}'
|
|
||||||
update_every: 10
|
|
||||||
max_time_series: 4000
|
|
||||||
- name: "Applications"
|
|
||||||
selector: '!unknown applications'
|
|
||||||
tags: file
|
|
||||||
apply:
|
|
||||||
- selector: activemq
|
|
||||||
template: |
|
|
||||||
- module: activemq
|
|
||||||
name: activemq-{{.TUID}}
|
|
||||||
url: http://{{.Address}}
|
|
||||||
- selector: apache
|
|
||||||
template: |
|
|
||||||
- module: apache
|
|
||||||
name: apache-{{.TUID}}
|
|
||||||
url: http://{{.Address}}/server-status?auto
|
|
||||||
- selector: bind
|
|
||||||
template: |
|
|
||||||
- module: bind
|
|
||||||
name: bind-{{.TUID}}
|
|
||||||
url: http://{{.Address}}/json/v1
|
|
||||||
- selector: cockroachdb
|
|
||||||
template: |
|
|
||||||
- module: cockroachdb
|
|
||||||
name: cockroachdb-{{.TUID}}
|
|
||||||
url: http://{{.Address}}/_status/vars
|
|
||||||
- selector: consul
|
|
||||||
template: |
|
|
||||||
- module: consul
|
|
||||||
name: consul-{{.TUID}}
|
|
||||||
url: http://{{.Address}}
|
|
||||||
- selector: coredns
|
|
||||||
template: |
|
|
||||||
- module: coredns
|
|
||||||
name: coredns-{{.TUID}}
|
|
||||||
url: http://{{.Address}}/metrics
|
|
||||||
- selector: elasticsearch
|
|
||||||
template: |
|
|
||||||
- module: elasticsearch
|
|
||||||
name: elasticsearch-{{.TUID}}
|
|
||||||
url: http://{{.Address}}
|
|
||||||
- selector: consul_envoy
|
|
||||||
template: |
|
|
||||||
{{ $path := default "/metrics" (get .Annotations "prometheus.io/path") -}}
|
|
||||||
{{ $promPort := get .Annotations "prometheus.io/port" -}}
|
|
||||||
{{ $port := ternary .Port $promPort (not (empty .Port)) -}}
|
|
||||||
- module: envoy
|
|
||||||
name: {{.TUID}}
|
|
||||||
url: http://{{ .PodIP }}:{{ $port }}{{ $path }}
|
|
||||||
- selector: fluentd
|
|
||||||
template: |
|
|
||||||
- module: fluentd
|
|
||||||
name: fluentd-{{.TUID}}
|
|
||||||
url: http://{{.Address}}
|
|
||||||
- selector: freeradius
|
|
||||||
template: |
|
|
||||||
- module: freeradius
|
|
||||||
name: freeradius-{{.TUID}}
|
|
||||||
address: {{.PodIP}}
|
|
||||||
port: {{.Port}}
|
|
||||||
- selector: hdfs
|
|
||||||
template: |
|
|
||||||
- module: hdfs
|
|
||||||
name: hdfs-{{.TUID}}
|
|
||||||
url: http://{{.Address}}/jmx
|
|
||||||
- selector: lighttpd
|
|
||||||
template: |
|
|
||||||
- module: lighttpd
|
|
||||||
name: lighttpd-{{.TUID}}
|
|
||||||
url: http://{{.Address}}/server-status?auto
|
|
||||||
- selector: logstash
|
|
||||||
template: |
|
|
||||||
- module: logstash
|
|
||||||
name: logstash-{{.TUID}}
|
|
||||||
url: http://{{.Address}}
|
|
||||||
- selector: mysql
|
|
||||||
template: |
|
|
||||||
- module: mysql
|
|
||||||
name: mysql-{{.TUID}}
|
|
||||||
dsn: 'netdata@tcp({{.Address}})/'
|
|
||||||
- selector: nginx
|
|
||||||
template: |
|
|
||||||
- module: nginx
|
|
||||||
name: nginx-{{.TUID}}
|
|
||||||
url: http://{{.Address}}/stub_status
|
|
||||||
- selector: openvpn
|
|
||||||
template: |
|
|
||||||
- module: openvpn
|
|
||||||
name: openvpn-{{.TUID}}
|
|
||||||
address: {{.Address}}
|
|
||||||
- selector: phpfpm
|
|
||||||
template: |
|
|
||||||
- module: phpfpm
|
|
||||||
name: phpfpm-{{.TUID}}
|
|
||||||
url: http://{{.Address}}/status?full&json
|
|
||||||
- selector: rabbitmq
|
|
||||||
template: |
|
|
||||||
- module: rabbitmq
|
|
||||||
name: rabbitmq-{{.TUID}}
|
|
||||||
url: http://{{.Address}}
|
|
||||||
- selector: solr
|
|
||||||
template: |
|
|
||||||
- module: solr
|
|
||||||
name: solr-{{.TUID}}
|
|
||||||
url: http://{{.Address}}
|
|
||||||
- selector: tengine
|
|
||||||
template: |
|
|
||||||
- module: tengine
|
|
||||||
name: tengine-{{.TUID}}
|
|
||||||
url: http://{{.Address}}/us
|
|
||||||
- selector: unbound
|
|
||||||
template: |
|
|
||||||
- module: unbound
|
|
||||||
name: unbound-{{.TUID}}
|
|
||||||
address: {{.Address}}
|
|
||||||
use_tls: false
|
|
||||||
- selector: vernemq
|
|
||||||
template: |
|
|
||||||
- module: vernemq
|
|
||||||
name: vernemq-{{.TUID}}
|
|
||||||
url: http://{{.Address}}/metrics
|
|
||||||
- selector: zookeeper
|
|
||||||
template: |
|
|
||||||
- module: zookeeper
|
|
||||||
name: zookeeper-{{.TUID}}
|
|
||||||
address: {{.Address}}
|
|
||||||
export:
|
|
||||||
file:
|
|
||||||
- selector: file
|
|
||||||
filename: "/export/go.d.yml"
|
|
||||||
---
|
|
||||||
# Source: netdata/templates/k8s-state/configmap.yaml
|
|
||||||
apiVersion: v1
|
|
||||||
kind: ConfigMap
|
|
||||||
metadata:
|
|
||||||
name: netdata-conf-k8s-state
|
|
||||||
namespace: netdata
|
|
||||||
labels:
|
|
||||||
app: netdata
|
|
||||||
chart: netdata-3.7.88
|
|
||||||
release: netdata
|
|
||||||
heritage: Helm
|
|
||||||
data:
|
|
||||||
|
|
||||||
go.d: |
|
|
||||||
default_run: no
|
|
||||||
modules:
|
|
||||||
k8s_state: yes
|
|
||||||
go.d-k8s_state: |
|
|
||||||
jobs:
|
|
||||||
- name: k8s_state
|
|
||||||
update_every: 1
|
|
||||||
netdata: |
|
|
||||||
[global]
|
|
||||||
hostname = netdata-k8s-state
|
|
||||||
[db]
|
|
||||||
mode = ram
|
|
||||||
[health]
|
|
||||||
enabled = no
|
|
||||||
[ml]
|
|
||||||
enabled = no
|
|
||||||
[plugins]
|
|
||||||
timex = no
|
|
||||||
checks = no
|
|
||||||
idlejitter = no
|
|
||||||
tc = no
|
|
||||||
diskspace = no
|
|
||||||
proc = no
|
|
||||||
cgroups = no
|
|
||||||
enable running new plugins = no
|
|
||||||
slabinfo = no
|
|
||||||
perf = no
|
|
||||||
go.d = yes
|
|
||||||
ioping = no
|
|
||||||
ebpf = no
|
|
||||||
charts.d = no
|
|
||||||
apps = no
|
|
||||||
python.d = no
|
|
||||||
fping = no
|
|
||||||
stream: |
|
|
||||||
[stream]
|
|
||||||
enabled = yes
|
|
||||||
destination = netdata:19999
|
|
||||||
api key = 11111111-2222-3333-4444-555555555555
|
|
||||||
timeout seconds = 60
|
|
||||||
buffer size bytes = 1048576
|
|
||||||
reconnect delay seconds = 5
|
|
||||||
initial clock resync iterations = 60
|
|
||||||
---
|
|
||||||
# Source: netdata/templates/parent/configmap.yaml
|
|
||||||
apiVersion: v1
|
|
||||||
kind: ConfigMap
|
|
||||||
metadata:
|
|
||||||
name: netdata-conf-parent
|
|
||||||
namespace: netdata
|
|
||||||
labels:
|
|
||||||
app: netdata
|
|
||||||
chart: netdata-3.7.88
|
|
||||||
release: netdata
|
|
||||||
heritage: Helm
|
|
||||||
data:
|
|
||||||
|
|
||||||
health: |
|
|
||||||
SEND_EMAIL="NO"
|
|
||||||
SEND_SLACK="YES"
|
|
||||||
SLACK_WEBHOOK_URL=""
|
|
||||||
DEFAULT_RECIPIENT_SLACK=""
|
|
||||||
netdata: |
|
|
||||||
[global]
|
|
||||||
hostname = netdata-parent
|
|
||||||
[db]
|
|
||||||
mode = dbengine
|
|
||||||
|
|
||||||
[plugins]
|
|
||||||
cgroups = no
|
|
||||||
tc = no
|
|
||||||
enable running new plugins = no
|
|
||||||
check for new plugins every = 72000
|
|
||||||
python.d = no
|
|
||||||
charts.d = no
|
|
||||||
go.d = no
|
|
||||||
node.d = no
|
|
||||||
apps = no
|
|
||||||
proc = no
|
|
||||||
idlejitter = no
|
|
||||||
diskspace = no
|
|
||||||
stream: |
|
|
||||||
[11111111-2222-3333-4444-555555555555]
|
|
||||||
enabled = yes
|
|
||||||
history = 3600
|
|
||||||
default memory mode = dbengine
|
|
||||||
health enabled by default = auto
|
|
||||||
allow from = *
|
|
||||||
---
|
|
||||||
# Source: netdata/templates/k8s-state/persistentvolumeclaim.yaml
|
|
||||||
apiVersion: v1
|
|
||||||
kind: PersistentVolumeClaim
|
|
||||||
metadata:
|
|
||||||
name: netdata-k8s-state-varlib
|
|
||||||
namespace: netdata
|
|
||||||
labels:
|
|
||||||
app: netdata
|
|
||||||
chart: netdata-3.7.88
|
|
||||||
release: netdata
|
|
||||||
heritage: Helm
|
|
||||||
role: k8sState
|
|
||||||
spec:
|
|
||||||
accessModes: [ "ReadWriteOnce" ]
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
storage: 1Gi
|
|
||||||
---
|
|
||||||
# Source: netdata/templates/parent/persistentvolumeclaim.yaml
|
|
||||||
apiVersion: v1
|
|
||||||
kind: PersistentVolumeClaim
|
|
||||||
metadata:
|
|
||||||
name: netdata-parent-database
|
|
||||||
namespace: netdata
|
|
||||||
labels:
|
|
||||||
app: netdata
|
|
||||||
chart: netdata-3.7.88
|
|
||||||
release: netdata
|
|
||||||
heritage: Helm
|
|
||||||
role: parent
|
|
||||||
spec:
|
|
||||||
accessModes: [ "ReadWriteOnce" ]
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
storage: 2Gi
|
|
||||||
---
|
|
||||||
# Source: netdata/templates/parent/persistentvolumeclaim.yaml
|
|
||||||
apiVersion: v1
|
|
||||||
kind: PersistentVolumeClaim
|
|
||||||
metadata:
|
|
||||||
name: netdata-parent-alarms
|
|
||||||
namespace: netdata
|
|
||||||
labels:
|
|
||||||
app: netdata
|
|
||||||
chart: netdata-3.7.88
|
|
||||||
release: netdata
|
|
||||||
heritage: Helm
|
|
||||||
role: parent
|
|
||||||
spec:
|
|
||||||
accessModes: [ "ReadWriteOnce" ]
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
storage: 1Gi
|
|
||||||
---
|
|
||||||
# Source: netdata/templates/clusterrole.yaml
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
kind: ClusterRole
|
|
||||||
metadata:
|
|
||||||
name: netdata
|
|
||||||
labels:
|
|
||||||
app: netdata
|
|
||||||
chart: netdata-3.7.88
|
|
||||||
release: netdata
|
|
||||||
heritage: Helm
|
|
||||||
rules:
|
|
||||||
- apiGroups: [""]
|
|
||||||
resources:
|
|
||||||
- "pods" # used by sd, go.d/k8s_state, netdata (cgroup-name.sh, get-kubernetes-labels.sh)
|
|
||||||
- "services" # used by sd
|
|
||||||
- "configmaps" # used by sd
|
|
||||||
- "secrets" # used by sd
|
|
||||||
- "nodes" # used by go.d/k8s_state
|
|
||||||
- "nodes/metrics" # used by go.d/k8s_kubelet when querying Kubelet HTTPS endpoint
|
|
||||||
- "nodes/proxy" # used by netdata (cgroup-name.sh) when querying Kubelet /pods endpoint
|
|
||||||
verbs:
|
|
||||||
- "get"
|
|
||||||
- "list"
|
|
||||||
- "watch"
|
|
||||||
- apiGroups: [""]
|
|
||||||
resources:
|
|
||||||
- "namespaces" # used by go.d/k8s_state, netdata (cgroup-name.sh, get-kubernetes-labels.sh)
|
|
||||||
verbs:
|
|
||||||
- "get"
|
|
||||||
---
|
|
||||||
# Source: netdata/templates/clusterrolebinding.yaml
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
kind: ClusterRoleBinding
|
|
||||||
metadata:
|
|
||||||
name: netdata
|
|
||||||
labels:
|
|
||||||
app: netdata
|
|
||||||
chart: netdata-3.7.88
|
|
||||||
release: netdata
|
|
||||||
heritage: Helm
|
|
||||||
roleRef:
|
|
||||||
apiGroup: rbac.authorization.k8s.io
|
|
||||||
kind: ClusterRole
|
|
||||||
name: netdata
|
|
||||||
subjects:
|
|
||||||
- kind: ServiceAccount
|
|
||||||
name: netdata
|
|
||||||
namespace: netdata
|
|
||||||
---
|
|
||||||
# Source: netdata/templates/parent/service.yaml
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: netdata
|
|
||||||
namespace: netdata
|
|
||||||
labels:
|
|
||||||
app: netdata
|
|
||||||
chart: netdata-3.7.88
|
|
||||||
release: netdata
|
|
||||||
heritage: Helm
|
|
||||||
role: parent
|
|
||||||
annotations:
|
|
||||||
spec:
|
|
||||||
type: ClusterIP
|
|
||||||
ports:
|
|
||||||
- port: 19999
|
|
||||||
targetPort: http
|
|
||||||
protocol: TCP
|
|
||||||
name: http
|
|
||||||
selector:
|
|
||||||
app: netdata
|
|
||||||
release: netdata
|
|
||||||
role: parent
|
|
||||||
---
|
|
||||||
# Source: netdata/templates/child/daemonset.yaml
|
|
||||||
apiVersion: apps/v1
|
|
||||||
kind: DaemonSet
|
|
||||||
metadata:
|
|
||||||
name: netdata-child
|
|
||||||
namespace: netdata
|
|
||||||
labels:
|
|
||||||
app: netdata
|
|
||||||
chart: netdata-3.7.88
|
|
||||||
release: netdata
|
|
||||||
heritage: Helm
|
|
||||||
role: child
|
|
||||||
spec:
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
app: netdata
|
|
||||||
release: netdata
|
|
||||||
role: child
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
annotations:
|
|
||||||
container.apparmor.security.beta.kubernetes.io/netdata: unconfined
|
|
||||||
checksum/config: 8a8e545f0dc48a2f506bad9fcb687a4a86525f3b66f3622d6db28d8fef66fb29
|
|
||||||
labels:
|
|
||||||
app: netdata
|
|
||||||
release: netdata
|
|
||||||
role: child
|
|
||||||
spec:
|
|
||||||
serviceAccountName: netdata
|
|
||||||
restartPolicy: Always
|
|
||||||
hostPID: true
|
|
||||||
hostIPC: true
|
|
||||||
hostNetwork: true
|
|
||||||
initContainers:
|
|
||||||
- name: init-persistence
|
|
||||||
image: "alpine:latest"
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
cpu: 10m
|
|
||||||
imagePullPolicy: Always
|
|
||||||
volumeMounts:
|
|
||||||
- name: persistencevarlibdir
|
|
||||||
mountPath: "/persistencevarlibdir"
|
|
||||||
command:
|
|
||||||
- "/bin/sh"
|
|
||||||
args:
|
|
||||||
- "-c"
|
|
||||||
- '
|
|
||||||
chmod 777 /persistencevarlibdir;
|
|
||||||
'
|
|
||||||
containers:
|
|
||||||
- name: netdata
|
|
||||||
image: "netdata/netdata:v1.45.3"
|
|
||||||
imagePullPolicy: Always
|
|
||||||
env:
|
|
||||||
- name: MY_POD_NAME
|
|
||||||
valueFrom:
|
|
||||||
fieldRef:
|
|
||||||
fieldPath: metadata.name
|
|
||||||
- name: MY_NODE_NAME
|
|
||||||
valueFrom:
|
|
||||||
fieldRef:
|
|
||||||
fieldPath: spec.nodeName
|
|
||||||
- name: MY_POD_NAMESPACE
|
|
||||||
valueFrom:
|
|
||||||
fieldRef:
|
|
||||||
fieldPath: metadata.namespace
|
|
||||||
- name: NETDATA_LISTENER_PORT
|
|
||||||
value: '19999'
|
|
||||||
- name: NETDATA_PLUGINS_GOD_WATCH_PATH
|
|
||||||
value: "/etc/netdata/go.d/sd/go.d.yml"
|
|
||||||
ports:
|
|
||||||
- name: http
|
|
||||||
containerPort: 19999
|
|
||||||
protocol: TCP
|
|
||||||
livenessProbe:
|
|
||||||
httpGet:
|
|
||||||
path: /api/v1/info
|
|
||||||
port: http
|
|
||||||
initialDelaySeconds: 0
|
|
||||||
failureThreshold: 3
|
|
||||||
periodSeconds: 30
|
|
||||||
successThreshold: 1
|
|
||||||
timeoutSeconds: 1
|
|
||||||
readinessProbe:
|
|
||||||
httpGet:
|
|
||||||
path: /api/v1/info
|
|
||||||
port: http
|
|
||||||
initialDelaySeconds: 0
|
|
||||||
failureThreshold: 3
|
|
||||||
periodSeconds: 30
|
|
||||||
successThreshold: 1
|
|
||||||
timeoutSeconds: 1
|
|
||||||
volumeMounts:
|
|
||||||
- name: proc
|
|
||||||
readOnly: true
|
|
||||||
mountPath: /host/proc
|
|
||||||
- name: sys
|
|
||||||
mountPath: /host/sys
|
|
||||||
- name: os-release
|
|
||||||
mountPath: /host/etc/os-release
|
|
||||||
- name: varlog
|
|
||||||
mountPath: /host/var/log
|
|
||||||
- name: configmap
|
|
||||||
mountPath: /etc/netdata/go.d.conf
|
|
||||||
subPath: go.d
|
|
||||||
- name: configmap
|
|
||||||
mountPath: /etc/netdata/go.d/k8s_kubelet.conf
|
|
||||||
subPath: kubelet
|
|
||||||
- name: configmap
|
|
||||||
mountPath: /etc/netdata/go.d/k8s_kubeproxy.conf
|
|
||||||
subPath: kubeproxy
|
|
||||||
- name: configmap
|
|
||||||
mountPath: /etc/netdata/netdata.conf
|
|
||||||
subPath: netdata
|
|
||||||
- name: configmap
|
|
||||||
mountPath: /etc/netdata/stream.conf
|
|
||||||
subPath: stream
|
|
||||||
- name: persistencevarlibdir
|
|
||||||
mountPath: /var/lib/netdata
|
|
||||||
- name: sd-shared
|
|
||||||
mountPath: "/etc/netdata/go.d/sd/"
|
|
||||||
securityContext:
|
|
||||||
capabilities:
|
|
||||||
add:
|
|
||||||
- SYS_PTRACE
|
|
||||||
- SYS_ADMIN
|
|
||||||
resources:
|
|
||||||
{}
|
|
||||||
- name: sd
|
|
||||||
image: "netdata/agent-sd:v0.2.9"
|
|
||||||
imagePullPolicy: Always
|
|
||||||
volumeMounts:
|
|
||||||
- name: sd-shared
|
|
||||||
mountPath: "/export/"
|
|
||||||
resources:
|
|
||||||
limits:
|
|
||||||
cpu: 50m
|
|
||||||
memory: 150Mi
|
|
||||||
requests:
|
|
||||||
cpu: 50m
|
|
||||||
memory: 100Mi
|
|
||||||
env:
|
|
||||||
- name: NETDATA_SD_CONFIG_MAP
|
|
||||||
value: "netdata-child-sd-config-map:config.yml"
|
|
||||||
- name: MY_POD_NAMESPACE
|
|
||||||
valueFrom:
|
|
||||||
fieldRef:
|
|
||||||
fieldPath: metadata.namespace
|
|
||||||
- name: MY_NODE_NAME
|
|
||||||
valueFrom:
|
|
||||||
fieldRef:
|
|
||||||
fieldPath: spec.nodeName
|
|
||||||
tolerations:
|
|
||||||
- effect: NoSchedule
|
|
||||||
operator: Exists
|
|
||||||
terminationGracePeriodSeconds: 30
|
|
||||||
volumes:
|
|
||||||
- name: proc
|
|
||||||
hostPath:
|
|
||||||
path: /proc
|
|
||||||
- name: sys
|
|
||||||
hostPath:
|
|
||||||
path: /sys
|
|
||||||
- name: os-release
|
|
||||||
hostPath:
|
|
||||||
path: /etc/os-release
|
|
||||||
- name: varlog
|
|
||||||
hostPath:
|
|
||||||
path: /var/log
|
|
||||||
- name: configmap
|
|
||||||
configMap:
|
|
||||||
name: netdata-conf-child
|
|
||||||
optional: true
|
|
||||||
- name: configsecret
|
|
||||||
secret:
|
|
||||||
secretName: netdata-conf-child
|
|
||||||
optional: true
|
|
||||||
- name: persistencevarlibdir
|
|
||||||
hostPath:
|
|
||||||
path: /var/lib/netdata-k8s-child/var/lib/netdata
|
|
||||||
type: DirectoryOrCreate
|
|
||||||
- name: sd-shared
|
|
||||||
emptyDir: { }
|
|
||||||
dnsPolicy: ClusterFirstWithHostNet
|
|
||||||
---
|
|
||||||
# Source: netdata/templates/k8s-state/deployment.yaml
|
|
||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: netdata-k8s-state
|
|
||||||
namespace: netdata
|
|
||||||
labels:
|
|
||||||
app: netdata
|
|
||||||
chart: netdata-3.7.88
|
|
||||||
release: netdata
|
|
||||||
heritage: Helm
|
|
||||||
role: k8sState
|
|
||||||
spec:
|
|
||||||
strategy:
|
|
||||||
type: Recreate
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
app: netdata
|
|
||||||
release: netdata
|
|
||||||
role: k8sState
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
annotations:
|
|
||||||
container.apparmor.security.beta.kubernetes.io/netdata: unconfined
|
|
||||||
checksum/config: 4376cdf86723c0d12ab8579f65590ceb5471790269a6e69073e5ca43f5a3622e
|
|
||||||
labels:
|
|
||||||
app: netdata
|
|
||||||
release: netdata
|
|
||||||
role: k8sState
|
|
||||||
spec:
|
|
||||||
securityContext:
|
|
||||||
fsGroup: 201
|
|
||||||
serviceAccountName: netdata
|
|
||||||
restartPolicy: Always
|
|
||||||
initContainers:
|
|
||||||
containers:
|
|
||||||
- name: netdata
|
|
||||||
image: "netdata/netdata:v1.45.3"
|
|
||||||
imagePullPolicy: Always
|
|
||||||
env:
|
|
||||||
- name: NETDATA_LISTENER_PORT
|
|
||||||
value: '19999'
|
|
||||||
ports:
|
|
||||||
- name: http
|
|
||||||
containerPort: 19999
|
|
||||||
protocol: TCP
|
|
||||||
livenessProbe:
|
|
||||||
httpGet:
|
|
||||||
path: /api/v1/info
|
|
||||||
port: http
|
|
||||||
initialDelaySeconds: 0
|
|
||||||
failureThreshold: 3
|
|
||||||
periodSeconds: 30
|
|
||||||
successThreshold: 1
|
|
||||||
timeoutSeconds: 1
|
|
||||||
readinessProbe:
|
|
||||||
httpGet:
|
|
||||||
path: /api/v1/info
|
|
||||||
port: http
|
|
||||||
initialDelaySeconds: 0
|
|
||||||
failureThreshold: 3
|
|
||||||
periodSeconds: 30
|
|
||||||
successThreshold: 1
|
|
||||||
timeoutSeconds: 1
|
|
||||||
volumeMounts:
|
|
||||||
- name: os-release
|
|
||||||
mountPath: /host/etc/os-release
|
|
||||||
- name: configmap
|
|
||||||
mountPath: /etc/netdata/go.d.conf
|
|
||||||
subPath: go.d
|
|
||||||
- name: configmap
|
|
||||||
mountPath: /etc/netdata/go.d/k8s_state.conf
|
|
||||||
subPath: go.d-k8s_state
|
|
||||||
- name: configmap
|
|
||||||
mountPath: /etc/netdata/netdata.conf
|
|
||||||
subPath: netdata
|
|
||||||
- name: configmap
|
|
||||||
mountPath: /etc/netdata/stream.conf
|
|
||||||
subPath: stream
|
|
||||||
- name: varlib
|
|
||||||
mountPath: /var/lib/netdata
|
|
||||||
resources:
|
|
||||||
{}
|
|
||||||
terminationGracePeriodSeconds: 30
|
|
||||||
volumes:
|
|
||||||
- name: os-release
|
|
||||||
hostPath:
|
|
||||||
path: /etc/os-release
|
|
||||||
- name: configmap
|
|
||||||
configMap:
|
|
||||||
name: netdata-conf-k8s-state
|
|
||||||
optional: true
|
|
||||||
- name: configsecret
|
|
||||||
secret:
|
|
||||||
secretName: netdata-conf-k8s-state
|
|
||||||
optional: true
|
|
||||||
- name: varlib
|
|
||||||
persistentVolumeClaim:
|
|
||||||
claimName: netdata-k8s-state-varlib
|
|
||||||
dnsPolicy: ClusterFirstWithHostNet
|
|
||||||
---
|
|
||||||
# Source: netdata/templates/parent/deployment.yaml
|
|
||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: netdata-parent
|
|
||||||
namespace: netdata
|
|
||||||
labels:
|
|
||||||
app: netdata
|
|
||||||
chart: netdata-3.7.88
|
|
||||||
release: netdata
|
|
||||||
heritage: Helm
|
|
||||||
role: parent
|
|
||||||
spec:
|
|
||||||
replicas: 1
|
|
||||||
strategy:
|
|
||||||
type: Recreate
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
app: netdata
|
|
||||||
release: netdata
|
|
||||||
role: parent
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: netdata
|
|
||||||
release: netdata
|
|
||||||
role: parent
|
|
||||||
annotations:
|
|
||||||
checksum/config: ddb93add72023d942465d0159ea638549f579f448126dd65a6212c1f8a13b9a3
|
|
||||||
spec:
|
|
||||||
securityContext:
|
|
||||||
fsGroup: 201
|
|
||||||
serviceAccountName: netdata
|
|
||||||
initContainers:
|
|
||||||
containers:
|
|
||||||
- name: netdata
|
|
||||||
image: "netdata/netdata:v1.45.3"
|
|
||||||
imagePullPolicy: Always
|
|
||||||
env:
|
|
||||||
- name: MY_POD_NAME
|
|
||||||
valueFrom:
|
|
||||||
fieldRef:
|
|
||||||
fieldPath: metadata.name
|
|
||||||
- name: MY_POD_NAMESPACE
|
|
||||||
valueFrom:
|
|
||||||
fieldRef:
|
|
||||||
fieldPath: metadata.namespace
|
|
||||||
- name: NETDATA_LISTENER_PORT
|
|
||||||
value: '19999'
|
|
||||||
ports:
|
|
||||||
- name: http
|
|
||||||
containerPort: 19999
|
|
||||||
protocol: TCP
|
|
||||||
livenessProbe:
|
|
||||||
httpGet:
|
|
||||||
path: /api/v1/info
|
|
||||||
port: http
|
|
||||||
initialDelaySeconds: 0
|
|
||||||
failureThreshold: 3
|
|
||||||
periodSeconds: 30
|
|
||||||
successThreshold: 1
|
|
||||||
timeoutSeconds: 1
|
|
||||||
readinessProbe:
|
|
||||||
httpGet:
|
|
||||||
path: /api/v1/info
|
|
||||||
port: http
|
|
||||||
initialDelaySeconds: 0
|
|
||||||
failureThreshold: 3
|
|
||||||
periodSeconds: 30
|
|
||||||
successThreshold: 1
|
|
||||||
timeoutSeconds: 1
|
|
||||||
volumeMounts:
|
|
||||||
- name: os-release
|
|
||||||
mountPath: /host/etc/os-release
|
|
||||||
- name: configmap
|
|
||||||
mountPath: /etc/netdata/health_alarm_notify.conf
|
|
||||||
subPath: health
|
|
||||||
- name: configmap
|
|
||||||
mountPath: /etc/netdata/netdata.conf
|
|
||||||
subPath: netdata
|
|
||||||
- name: configmap
|
|
||||||
mountPath: /etc/netdata/stream.conf
|
|
||||||
subPath: stream
|
|
||||||
- name: database
|
|
||||||
mountPath: /var/cache/netdata
|
|
||||||
- name: alarms
|
|
||||||
mountPath: /var/lib/netdata
|
|
||||||
resources:
|
|
||||||
{}
|
|
||||||
terminationGracePeriodSeconds: 300
|
|
||||||
volumes:
|
|
||||||
- name: os-release
|
|
||||||
hostPath:
|
|
||||||
path: /etc/os-release
|
|
||||||
- name: configmap
|
|
||||||
configMap:
|
|
||||||
name: netdata-conf-parent
|
|
||||||
optional: true
|
|
||||||
- name: configsecret
|
|
||||||
secret:
|
|
||||||
secretName: netdata-conf-parent
|
|
||||||
optional: true
|
|
||||||
- name: database
|
|
||||||
persistentVolumeClaim:
|
|
||||||
claimName: netdata-parent-database
|
|
||||||
- name: alarms
|
|
||||||
persistentVolumeClaim:
|
|
||||||
claimName: netdata-parent-alarms
|
|
||||||
dnsPolicy: Default
|
|
||||||
---
|
|
||||||
# Source: netdata/templates/parent/ingress.yaml
|
|
||||||
apiVersion: networking.k8s.io/v1
|
|
||||||
kind: Ingress
|
|
||||||
metadata:
|
|
||||||
name: netdata
|
|
||||||
namespace: netdata
|
|
||||||
labels:
|
|
||||||
app: netdata
|
|
||||||
chart: netdata-3.7.88
|
|
||||||
release: netdata
|
|
||||||
heritage: Helm
|
|
||||||
annotations:
|
|
||||||
kubernetes.io/ingress.class: nginx
|
|
||||||
kubernetes.io/tls-acme: "true"
|
|
||||||
spec:
|
|
||||||
rules:
|
|
||||||
- host: netdata.k8s.local
|
|
||||||
http:
|
|
||||||
paths:
|
|
||||||
- path: /
|
|
||||||
pathType: Prefix
|
|
||||||
backend:
|
|
||||||
service:
|
|
||||||
name: netdata
|
|
||||||
port:
|
|
||||||
name: http
|
|
||||||
Executable
+4
@@ -0,0 +1,4 @@
|
|||||||
|
SEND_EMAIL="NO"
|
||||||
|
SEND_SLACK="YES"
|
||||||
|
SLACK_WEBHOOK_URL=""
|
||||||
|
DEFAULT_RECIPIENT_SLACK=""
|
||||||
Executable
+19
@@ -0,0 +1,19 @@
|
|||||||
|
[global]
|
||||||
|
hostname = netdata-parent
|
||||||
|
[db]
|
||||||
|
mode = dbengine
|
||||||
|
|
||||||
|
[plugins]
|
||||||
|
cgroups = no
|
||||||
|
tc = no
|
||||||
|
enable running new plugins = no
|
||||||
|
check for new plugins every = 72000
|
||||||
|
python.d = no
|
||||||
|
charts.d = no
|
||||||
|
go.d = no
|
||||||
|
node.d = no
|
||||||
|
apps = no
|
||||||
|
proc = no
|
||||||
|
idlejitter = no
|
||||||
|
diskspace = no
|
||||||
|
otel = yes
|
||||||
Executable
+26
@@ -0,0 +1,26 @@
|
|||||||
|
# OpenTelemetry Plugin Configuration (otel.plugin)
|
||||||
|
# Documented config surface only — see:
|
||||||
|
# https://learn.netdata.cloud/docs/collecting-metrics/opentelemetry/opentelemetry-metrics
|
||||||
|
#
|
||||||
|
# Any field can also be overridden via NETDATA_OTEL_<FIELD> env vars
|
||||||
|
# (dots -> underscores, e.g. endpoint.tls_cert_path -> NETDATA_OTEL_ENDPOINT_TLS_CERT_PATH).
|
||||||
|
#
|
||||||
|
# NOTE: fields like logs.rotation/retention, remote_storage, and auth appeared in an
|
||||||
|
# earlier version of this config but are NOT present in the current documented schema.
|
||||||
|
# Left out here rather than guessed — reintroduce only once confirmed against the
|
||||||
|
# running agent version (e.g. via `otel.plugin --help` in the container, or Ask Nedi).
|
||||||
|
|
||||||
|
endpoint:
|
||||||
|
# 0.0.0.0 so traffic arriving via the ClusterIP Service actually reaches the process
|
||||||
|
# (127.0.0.1 would only accept connections from inside the same network namespace).
|
||||||
|
path: "0.0.0.0:4317"
|
||||||
|
tls_cert_path: null
|
||||||
|
tls_key_path: null
|
||||||
|
tls_ca_cert_path: null
|
||||||
|
|
||||||
|
metrics:
|
||||||
|
chart_configs_dir: /etc/netdata/otel.d/v1/metrics
|
||||||
|
interval_secs: 10
|
||||||
|
grace_period_secs: 60
|
||||||
|
expiry_duration_secs: 900
|
||||||
|
max_new_charts_per_request: 100
|
||||||
Executable
+6
@@ -0,0 +1,6 @@
|
|||||||
|
[11111111-2222-3333-4444-555555555555]
|
||||||
|
enabled = yes
|
||||||
|
history = 3600
|
||||||
|
default memory mode = dbengine
|
||||||
|
health enabled by default = auto
|
||||||
|
allow from = *
|
||||||
Executable
+107
@@ -0,0 +1,107 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: netdata-parent
|
||||||
|
labels:
|
||||||
|
app: netdata
|
||||||
|
role: parent
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: netdata
|
||||||
|
role: parent
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: netdata
|
||||||
|
role: parent
|
||||||
|
spec:
|
||||||
|
securityContext:
|
||||||
|
fsGroup: 201
|
||||||
|
serviceAccountName: netdata
|
||||||
|
containers:
|
||||||
|
- name: netdata
|
||||||
|
image: "netdata/netdata:edge"
|
||||||
|
imagePullPolicy: Always
|
||||||
|
env:
|
||||||
|
- name: NETDATA_CLAIM_URL
|
||||||
|
value: "https://api.netdata.cloud"
|
||||||
|
- name: NETDATA_CLAIM_TOKEN
|
||||||
|
value: "CIlCwV6GawNWIfhrqMVmPAJixo_BSaGvwVbHKFOCQCHbYG5J8Ac0FDxKrObJ727F1dndg8J-v6apUhzGho6RIOlkrqJ_F7DKodjLqbsSWb7Ta-GSHkkuHcTXidxKxEo5RK0jiqU"
|
||||||
|
- name: NETDATA_CLAIM_ROOMS
|
||||||
|
value: "e15a4f12-89d7-4d5b-b588-6658fa835473"
|
||||||
|
- name: MY_POD_NAME
|
||||||
|
valueFrom:
|
||||||
|
fieldRef:
|
||||||
|
fieldPath: metadata.name
|
||||||
|
- name: MY_POD_NAMESPACE
|
||||||
|
valueFrom:
|
||||||
|
fieldRef:
|
||||||
|
fieldPath: metadata.namespace
|
||||||
|
- name: NETDATA_LISTENER_PORT
|
||||||
|
value: '19999'
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
containerPort: 19999
|
||||||
|
protocol: TCP
|
||||||
|
- name: otel-grpc
|
||||||
|
containerPort: 4317
|
||||||
|
protocol: TCP
|
||||||
|
livenessProbe:
|
||||||
|
exec:
|
||||||
|
command: ["/usr/sbin/netdatacli", "ping"]
|
||||||
|
initialDelaySeconds: 0
|
||||||
|
failureThreshold: 3
|
||||||
|
periodSeconds: 30
|
||||||
|
successThreshold: 1
|
||||||
|
timeoutSeconds: 1
|
||||||
|
readinessProbe:
|
||||||
|
exec:
|
||||||
|
command: ["/usr/sbin/netdatacli", "ping"]
|
||||||
|
initialDelaySeconds: 0
|
||||||
|
failureThreshold: 3
|
||||||
|
periodSeconds: 30
|
||||||
|
successThreshold: 1
|
||||||
|
timeoutSeconds: 1
|
||||||
|
securityContext:
|
||||||
|
runAsUser: 201
|
||||||
|
runAsGroup: 201
|
||||||
|
volumeMounts:
|
||||||
|
- name: os-release
|
||||||
|
mountPath: /host/etc/os-release
|
||||||
|
- name: configmap
|
||||||
|
mountPath: /etc/netdata/health_alarm_notify.conf
|
||||||
|
subPath: health
|
||||||
|
- name: configmap
|
||||||
|
mountPath: /etc/netdata/netdata.conf
|
||||||
|
subPath: netdata
|
||||||
|
- name: configmap
|
||||||
|
mountPath: /etc/netdata/stream.conf
|
||||||
|
subPath: stream
|
||||||
|
- name: configmap
|
||||||
|
mountPath: /etc/netdata/otel.yaml
|
||||||
|
subPath: otel
|
||||||
|
- name: database
|
||||||
|
mountPath: /var/cache/netdata
|
||||||
|
- name: alarms
|
||||||
|
mountPath: /var/lib/netdata
|
||||||
|
resources: {}
|
||||||
|
terminationGracePeriodSeconds: 300
|
||||||
|
volumes:
|
||||||
|
- name: os-release
|
||||||
|
hostPath:
|
||||||
|
path: /etc/os-release
|
||||||
|
- name: configmap
|
||||||
|
configMap:
|
||||||
|
name: netdata-conf-parent
|
||||||
|
optional: true
|
||||||
|
- name: database
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: netdata-parent-database
|
||||||
|
- name: alarms
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: netdata-parent-alarms
|
||||||
|
dnsPolicy: Default
|
||||||
Executable
+21
@@ -0,0 +1,21 @@
|
|||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: netdata
|
||||||
|
labels:
|
||||||
|
app: netdata
|
||||||
|
annotations:
|
||||||
|
kubernetes.io/ingress.class: nginx
|
||||||
|
kubernetes.io/tls-acme: "true"
|
||||||
|
spec:
|
||||||
|
rules:
|
||||||
|
- host: netdata.k8s.local
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: netdata
|
||||||
|
port:
|
||||||
|
name: http
|
||||||
Executable
+27
@@ -0,0 +1,27 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: netdata-parent-database
|
||||||
|
labels:
|
||||||
|
app: netdata
|
||||||
|
role: parent
|
||||||
|
spec:
|
||||||
|
storageClassName: nfs-storage-intelligent
|
||||||
|
accessModes: ["ReadWriteOnce"]
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 15Gi
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: netdata-parent-alarms
|
||||||
|
labels:
|
||||||
|
app: netdata
|
||||||
|
role: parent
|
||||||
|
spec:
|
||||||
|
storageClassName: nfs-storage-intelligent
|
||||||
|
accessModes: ["ReadWriteOnce"]
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 1Gi
|
||||||
Executable
+21
@@ -0,0 +1,21 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: netdata
|
||||||
|
labels:
|
||||||
|
app: netdata
|
||||||
|
role: parent
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
ports:
|
||||||
|
- port: 19999
|
||||||
|
targetPort: http
|
||||||
|
protocol: TCP
|
||||||
|
name: http
|
||||||
|
- port: 4317
|
||||||
|
targetPort: otel-grpc
|
||||||
|
protocol: TCP
|
||||||
|
name: otel-grpc
|
||||||
|
selector:
|
||||||
|
app: netdata
|
||||||
|
role: parent
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: netdata
|
||||||
|
labels:
|
||||||
|
app: netdata
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRole
|
||||||
|
metadata:
|
||||||
|
name: netdata
|
||||||
|
labels:
|
||||||
|
app: netdata
|
||||||
|
rules:
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources:
|
||||||
|
- "pods"
|
||||||
|
- "services"
|
||||||
|
- "configmaps"
|
||||||
|
- "secrets"
|
||||||
|
- "nodes"
|
||||||
|
- "nodes/metrics"
|
||||||
|
- "nodes/proxy"
|
||||||
|
verbs: ["get", "list", "watch"]
|
||||||
|
- apiGroups: ["apps"]
|
||||||
|
resources: ["deployments"]
|
||||||
|
verbs: ["get", "list", "watch"]
|
||||||
|
- apiGroups: ["batch"]
|
||||||
|
resources: ["cronjobs", "jobs"]
|
||||||
|
verbs: ["get", "list", "watch"]
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["namespaces"]
|
||||||
|
verbs: ["get"]
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRoleBinding
|
||||||
|
metadata:
|
||||||
|
name: netdata
|
||||||
|
labels:
|
||||||
|
app: netdata
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: ClusterRole
|
||||||
|
name: netdata
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: netdata
|
||||||
|
namespace: netdata
|
||||||
Reference in New Issue
Block a user