From 23cc0694deb4a3b06a3ca022cb715dd7dcb78d39 Mon Sep 17 00:00:00 2001 From: Camila Macedo <7708031+camilamacedo86@users.noreply.github.com> Date: Fri, 13 Dec 2024 22:38:53 +0000 Subject: [PATCH] (fix) Removing Unused and Insecure Manifests for Prometheus since its integration is not supported We are not using these manifests or supporting this option. Therefore, they should be removed, as they are not configured to use certificates and have insecureSkipVerify: false, which promotes an insecure setup by default. If we want enable this option then we need configure it with: ```yaml apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: labels: control-plane: operator-controller-controller-manager name: controller-manager-metrics-monitor namespace: system spec: endpoints: - path: /metrics port: https scheme: https bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token tlsConfig: insecureSkipVerify: false ca: secret: name: olmv1-cert key: ca.crt cert: secret: name: olmv1-cert key: tls.cert keySecret: name: olmv1-cert key: tls.key selector: matchLabels: control-plane: operator-controller-controller-manager ``` --- config/base/kustomization.yaml | 3 +-- config/base/prometheus/kustomization.yaml | 2 -- config/base/prometheus/monitor.yaml | 19 ------------------- 3 files changed, 1 insertion(+), 23 deletions(-) delete mode 100644 config/base/prometheus/kustomization.yaml delete mode 100644 config/base/prometheus/monitor.yaml diff --git a/config/base/kustomization.yaml b/config/base/kustomization.yaml index c41b5a169..b475608ee 100644 --- a/config/base/kustomization.yaml +++ b/config/base/kustomization.yaml @@ -18,5 +18,4 @@ resources: - crd - rbac - manager -# [PROMETHEUS] To enable prometheus monitor, uncomment all sections with 'PROMETHEUS'. -#- ../prometheus + diff --git a/config/base/prometheus/kustomization.yaml b/config/base/prometheus/kustomization.yaml deleted file mode 100644 index ed137168a..000000000 --- a/config/base/prometheus/kustomization.yaml +++ /dev/null @@ -1,2 +0,0 @@ -resources: -- monitor.yaml diff --git a/config/base/prometheus/monitor.yaml b/config/base/prometheus/monitor.yaml deleted file mode 100644 index ccdc6341d..000000000 --- a/config/base/prometheus/monitor.yaml +++ /dev/null @@ -1,19 +0,0 @@ -# Prometheus Monitor Service (Metrics) -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - labels: - control-plane: operator-controller-controller-manager - name: controller-manager-metrics-monitor - namespace: system -spec: - endpoints: - - path: /metrics - port: https - scheme: https - bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token - tlsConfig: - insecureSkipVerify: true - selector: - matchLabels: - control-plane: operator-controller-controller-manager