thanos-io / kube-thanos

Kubernetes specific configuration for deploying Thanos.
Apache License 2.0
520 stars 177 forks source link

Possible misconfiguration with rules and serviceMonitor #311

Open jmtt89 opened 11 months ago

jmtt89 commented 11 months ago

on kube-thanos-rule.libsonnet

...
            containers: [c] +
                        (
                          if std.length(tr.config.rulesConfig) > 0 || std.length(tr.config.extraVolumeMounts) > 0 || tr.config.alertmanagerConfigFile != {} || tr.config.remoteWriteConfigFile != {} then [
                            reloadContainer,
                          ] else []
                        ),
...
  serviceMonitor: 
      endpoints: [
        ...
        { port: 'reloader' },
...

when I don't include any of the fields: rulesConfig, extraVolumeMounts, alertmanagerConfigFile or remoteWriteConfigFile, the 'reloader' port is still included on ServiceMonitor, but I don't go to anywhere because the reloadContainer is not included.