Skip to content
Snippets Groups Projects

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

Merged Nacho Barrientos requested to merge monit4147 into master

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

Pipeline #10944575 passed

Pipeline passed for 51cf27a3 on monit4147

Approved by

Merged by Nacho BarrientosNacho Barrientos 1 month ago (Mar 4, 2025 1:23pm UTC)

Merge details

  • Changes merged into master with 51cf27a3.
  • Deleted the source branch.

Pipeline #10944934 passed

Pipeline passed for 51cf27a3 on master

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Diana Gaponcic
  • Nacho Barrientos resolved all threads

    resolved all threads

  • This is ready in my eyes. @bgarrido please confirm with the Kubernetes Service administrators that this is exactly what was agreed to implement in the last meeting so we can proceed with the review on our side.

  • Nacho Barrientos marked this merge request as ready

    marked this merge request as ready

  • Nacho Barrientos added 8 commits

    added 8 commits

    • a1bcf5ff...15949cd1 - 4 commits from branch master
    • 3b4a5508 - [MONIT-4147] Make tenant credentials mandatory
    • aa3a8da1 - [MONIT-4147] Correct variable reference
    • 11c444bd - [MONIT-4147] Force kubernetes.clusterName when necessary
    • d41fd63b - [MONIT-4147] Add some units tests

    Compare with previous version

  • I've just added some unit tests in the meantime.

  • added 1 commit

    • 2aa24955 - [MONIT-4147] Add some unit tests

    Compare with previous version

  • added 1 commit

    • 05c8a10a - [MONIT-4147] Add some unit tests

    Compare with previous version

  • added 1 commit

    • 4e55f509 - [MONIT-4147] Add some unit tests

    Compare with previous version

  • added 1 commit

    • 159109f1 - [MONIT-4147] Add some unit tests

    Compare with previous version

  • requested review from @bgarrido

  • Borja Garrido Bear approved this merge request

    approved this merge request

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading