From 85f94dae87026eb92c9d5d859c64557ac32f71a1 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 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/prometheus/kustomization.yaml | 2 -- config/base/prometheus/monitor.yaml | 19 ------------------- 2 files changed, 21 deletions(-) delete mode 100644 config/base/prometheus/kustomization.yaml delete mode 100644 config/base/prometheus/monitor.yaml 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