From 0fbe9cd8f3e8e0c908d8b362882e600101637bcf Mon Sep 17 00:00:00 2001 From: Nicolas Takashi Date: Tue, 10 Sep 2024 12:15:42 +0200 Subject: [PATCH] [DOCS] adding analyze operator cmd docs Signed-off-by: Nicolas Takashi --- Documentation/commands/analyze/index.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Documentation/commands/analyze/index.md b/Documentation/commands/analyze/index.md index fa27e3c..9d04942 100644 --- a/Documentation/commands/analyze/index.md +++ b/Documentation/commands/analyze/index.md @@ -41,3 +41,21 @@ The ServiceMonitor object must have a defined selector that selects at least one ### Port Matching Each endpoint within the ServiceMonitor object must have a defined port, and this port should match the port of the service it monitors. + +## Analyze Operator + +The analyze command can also target the Prometheus Operator deployment within a Kubernetes cluster. Users can specify the namespace and name of the Prometheus Operator to assess its compliance with the predefined rules. + +## Rules + +The analyze command evaluates objects against a set of rules to determine compliance. These rules are defined in the `analyzer` package and are specifically implemented in the `internal/analyzer/operator.go` file. + +### Operator Existence + +The Prometheus Operator must be deployed in the Kubernetes cluster, which can be confirmed by checking for the presence of the prometheus-operator deployment in the specified namespace and under the given name. + +### RBAC Rules + +The Prometheus Operator deployment requires proper RBAC (Role-Based Access Control) rules to function correctly. This means the service account associated with the Prometheus Operator must have permissions aligned with the Prometheus Operator CRDs (Custom Resource Definitions) present in the cluster. + +For instance, if the Prometheus Operator is managing only Prometheus instances, the service account should have the necessary permissions to create, update, and delete Prometheus resources, but it should not have permissions to manage other resources like Alertmanager.