Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

avoid child open port and fix liveness probe on public worker nodes #402

Open
alexfouche opened this issue Jan 16, 2024 · 1 comment
Open

Comments

@alexfouche
Copy link

alexfouche commented Jan 16, 2024

On a k8s cluster with public worker node, the child daemonset will be available publicly on port 19999, since it runs with hostNetwork: true

From the Securing Netdata pages, and since there is a Netdata parent accessible from a ClusterIP service, it is possible to avoid that by setting :

child:
  configs:
    netdata:
      data: |
        [web]
          mode = none
(...)

Unfortunately this breaks the liveness and readiness probes.

So i am using

child:
  configs:
    netdata:
      data: |
        [web]
          bind to = localhost:19999
(...)

The issue i have is that the Helm values.yaml does not allow to set the httpGet.host: field, so that it can be set to 127.0.0.1

I tested by editing the daemonset livenessProbe and readinessProbe manually, and it works:

livenessProbe:
      httpGet:
        host: 127.0.0.1
        path: /api/v1/info
        port: http
        scheme: HTTP
(...)

Shouldn't it even be set by default for the Netdata child to not listen on all interfaces, since there will be the Netdata parent it streams to anyway ?

@ilyam8
Copy link
Member

ilyam8 commented Jan 30, 2024

Unfortunately this breaks the liveness and readiness probes.

You can use livenessProbe exec - netdatacli ping. We use it for Docker health checks with disabled web server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants