Have longhorn ServiceMonitor be deployed only when monitoring (CRD) unit is enabled
What does this MR do and why?
In !2420 (diffs) the Longhorn chart received values:
metrics:
serviceMonitor:
enabled: true
but it can happen that monitoring-crd
(its crd-servicemonitors.yaml) unit is:
- not deployed at all if
monitoring
unit is not enabled, like we advertise for non-CI libvirt-metal deployments
units:
monitoring:
enabled_conditions:
- '{{ ternary true false (.Values.env_type | eq "ci") | include "preserve-type" }}'
- does not deploy the needed CRD before
longhorn
HelmRelease is deployed
This change tries to fix those conditions.
Related reference(s)
Closes #1343 (closed)
Test coverage
Edited by Bogdan-Adrian Burciu