From dbae7f640fee79ea7b152f37c336849073651bbc Mon Sep 17 00:00:00 2001
From: Nacho Barrientos <nacho.barrientos@cern.ch>
Date: Wed, 26 Feb 2025 09:25:22 +0100
Subject: [PATCH] [MONIT-4148] Install CRDs as a dependency of this chart

---
 Chart.yaml     | 4 ++++
 docs/values.md | 1 +
 values.yaml    | 4 ++++
 3 files changed, 9 insertions(+)

diff --git a/Chart.yaml b/Chart.yaml
index 562067d..a557304 100644
--- a/Chart.yaml
+++ b/Chart.yaml
@@ -5,3 +5,7 @@ type: application
 kubeVersion: ">=1.27.0-0"
 description: Helm Chart provided by IT Monitoring Service to install and configure required components to gather and send monitoring data from kubernetes clusters to central service.
 home: https://cern.ch/monitoring
+dependencies:
+- name: crds
+  version: "0.0.0"
+  condition: crds.enabled
diff --git a/docs/values.md b/docs/values.md
index f995d7a..4d3d066 100644
--- a/docs/values.md
+++ b/docs/values.md
@@ -83,5 +83,6 @@ This file contains the markdown version of the default values that this chart ta
 | 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 |
+| crds.enabled | bool | `true` | whether to install Prometheus operator's CRDs |
 
 ----------------------------------------------
diff --git a/values.yaml b/values.yaml
index b2fad47..a755779 100644
--- a/values.yaml
+++ b/values.yaml
@@ -1,3 +1,7 @@
+# CRDs
+crds:
+  enabled: true
+
 # OTLP default configuration.
 otlp:
   # -- otlp endpoint where the otlp receivers are listening
-- 
GitLab