Icinga / helm-charts

Kubernetes Helm charts to deploy a ready-to-use Icinga monitoring stack.
https://icinga.com
Apache License 2.0
9 stars 13 forks source link

[Feature]: Make satellite configuration possible #36

Open ngoeddel-openi opened 9 months ago

ngoeddel-openi commented 9 months ago

Affected Chart

icinga2

Please describe your feature request

We've got a multi cluster setup here and want to have an Icinga2 master in our main cluster and Icinga2 satellites in the other ones.

While digging through the templates there seems to be no way to define a parent for a zone as you can see here: https://github.com/Icinga/helm-charts/blob/main/charts/icinga-stack/charts/icinga2/templates/_core_config.tpl#L28C13-L28C21

On the other hand there is the environment variable ICINGA_PARENT_ZONE in the underlying container image which triggers the node wizard on startup but can not be set with the Helm Chart. Here are all environment variables: https://github.com/Icinga/docker-icinga2#environment-variables

What exactly happens when the node wizard is executed? Won't it override the configuration made in the Helm template again?

To create a master-satellite setup we also would like to have the possibility to define some static Endpoints and Zones using the Helm Chart instead of configuring them through the Director afterwards.

If I have overlooked something and the feature is already there, I apologize. Then just point me to the correct configuration values. Thank you.

tbauriedel commented 4 months ago

ref/NC/822198

mocdaniel commented 4 months ago

Regarding the node wizard of the official Icinga2 image:

The wizard wraps some bootstrapping logic to populate /data/{multiple paths}/icinga2 with the needed files from /data-init/{multiple paths}/icinga2 for Icinga2 to start successfully. The resulting directories again get linked to the destinations Icinga2 is looking for its files.

The environment variables available for the official Icinga2 images further tweak this bootstrapping process. The startup routine is a script-like golang binary, you can read through the exact startup logic here.

Regarding satellite functionality:

At the moment, satellite setups are not possible, though that might change in the future - time at my hands is very sparse at the moment and there aren't many other maintainers/contributors around.

ngoeddel-openi commented 4 months ago

I already changed a few things in the HelmChart to allow Satellite deployment.

I got it working with one master pod and two satellite pods living in the same zone in HA configuration. The most complex thing is the CA the master creates automatically and to get the satellites to use it. At the moment the CA on masters and satellites seem to be the same but the certificates of the satellites can not be verified against the CA. I am not sure yet what's happening there.

I also don not have a lot of time to work on that problem but we want to use it that way very soon. We want to have a master in our management cluster and then a satellite pair for each workload cluster.

ngoeddel-openi commented 3 months ago

I added a first pull request as a draft with all the changes I needed to get a master-satellite configuration working. I also found a few bugs here and there that I fixed too to get my example deployments working.

The whole thing is still a work in progress so there is nothing to be merged for now, but if you are interested already, please have a look here: https://github.com/Icinga/helm-charts/pull/58