Skip to content
Snippets Groups Projects
Commit 3b4a5508 authored by Nacho Barrientos's avatar Nacho Barrientos
Browse files

[MONIT-4147] Make tenant credentials mandatory

With this patch the chart will fail to install if either tenant.name
or tenant.password are not set if they're necessary, example:

```
λ helm -n monitoring diff upgrade kubernetes-monitoring . -f values.yaml -f ibarrien.yaml
Error: Failed to render chart: exit status 1: Error: execution error at (cern-it-monitoring-kubernetes/templates/fluentbit-metrics/configmap.yaml:22:13): Tenand password is required
```

If no fluentbit forwarding is configured, i.e.:

```yaml
metrics:
  fluentbit:
    enabled: false

logs:
  fluentbit:
    enabled: false
```

then the chart installs fine as they're note required in that case.
parent 15949cd1
No related branches found
No related tags found
1 merge request!46[MONIT-4147] Allow deploying a local-only version and force providing a tenant and cluster name otherwise
......@@ -81,8 +81,8 @@ This file contains the markdown version of the default values that this chart ta
| metrics.alertmanager.nodeSelector | Hash | `{}` | node selector configuration for the alertmanager |
| otlp.endpoint | string | `"monit-otlp.cern.ch"` | otlp endpoint where the otlp receivers are listening |
| otlp.port | int | `4319` | otlp port where the otlp receivers are listening |
| tenant.name | string | `"nil"` | username used for authenitcating in the MONIT infrastructure |
| tenant.password | string | `"nil"` | password (plain) used for authenitcating in the MONIT infrastructure |
| tenant.name | string | - | username used for authenitcating in the MONIT infrastructure |
| tenant.password | string | - | password (plain) used for authenitcating in the MONIT infrastructure |
| crds.enabled | bool | `true` | whether to install Prometheus operator's CRDs |
----------------------------------------------
......@@ -10,12 +10,12 @@ otlp:
port: 4319
# Tenant configuration. Username and Password are provided via CERN Central IT
# Monitoring service.
tenant:
# Monitoring service. This bit is required if fluentbit is enabled (default)
# tenant:
# -- username used for authenitcating in the MONIT infrastructure
name: nil
# name: example
# -- password (plain) used for authenitcating in the MONIT infrastructure
password: nil
# password: example
# Kubernetes configuration.
kubernetes:
......@@ -220,8 +220,8 @@ metrics:
traces_uri: /v1/traces
tls: on
tls.verify: off
http_user: {{ .Values.tenant.name }}
http_passwd: {{ .Values.tenant.password }}
http_user: {{ required "Tenant name is required" (.Values.tenant).name }}
http_passwd: {{ required "Tenant password is required" (.Values.tenant).password }}
storage.total_limit_size: {{ .Values.metrics.fluentbit.diskMaxCache }}
header: User-Agent {{ .Chart.Name }}/{{ .Chart.Version }}
......@@ -414,8 +414,8 @@ logs:
traces_uri /v1/traces
tls on
tls.verify off
http_user {{ .Values.tenant.name }}
http_passwd {{ .Values.tenant.password }}
http_user {{ required "Tenant name is required" (.Values.tenant).name }}
http_passwd {{ required "Tenant password is required" (.Values.tenant).password }}
header tag monit
header log_type kubernetes
header User-Agent {{ .Chart.Name }}/{{ .Chart.Version }}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment