Skip to content

[MONIT-4147] Allow deploying a local-only version and force providing a tenant and cluster name otherwise

To deploy a cluster-local only set of components, set:

metrics:
  fluentbit:
    enabled: false
 
logs:
  enabled: true
  fluentbit:
    enabled: false

logs.enabled is currently false by default but this patch takes into account that one day this may be flipped.

No need to specify any tenant username or password as this is not necessary. Deployed pods:

it-monit-metrics-collector-kubestate-889b4f95d-wswd5     1/1       Running     0            13d
it-monit-metrics-collector-nodeexporter-4cfsh            1/1       Running     0            13d
it-monit-metrics-collector-nodeexporter-prx2s            1/1       Running     0            13d
it-monit-metrics-operator-prometheus-7646fd7f8-bf2qc     1/1       Running     0            12d
prometheus-it-monit-metrics-collector-prometheus-0       2/2       Running     0            12d

so basically exporters, the operator and Prometheus itself.

The defaults (fluentbit for metrics enabled) are kept, hence deploying with only these values:

kubernetes:
  clusterName: my-cluster

fails:

Error: Failed to render chart: exit status 1: Error: execution error at (cern-it-monitoring-kubernetes/templates/fluentbit-metrics/configmap.yaml:22:13): Tenant name is required

as expected with similar results if the password is missing too.

So now the minimum set of working values set is:

kubernetes:
  clusterName: my-cluster
tenant:
  name: foo
  password: bar

Note that this patchset also makes kubernetes.clusterName mandatory when necessary, hence:

tenant:
  name: foo
  password: bar

fails now too:

Error: UPGRADE FAILED: execution error at (cern-it-monitoring-kubernetes/templates/prometheus/prometheus.yaml:15:25): kubernetes.clusterName is missing
Edited by Nacho Barrientos

Merge request reports

Loading