From 0c3116e9e2b3c9d4aedefd6059ef92d79ef809e1 Mon Sep 17 00:00:00 2001 From: AshwinSriram11 Date: Fri, 20 Dec 2024 06:53:43 +0530 Subject: [PATCH] Reorganize documentation --- Documentation/{ => api-reference}/api.md | 0 Documentation/{user-guides => developer}/alerting.md | 0 .../{user-guides => developer}/getting-started.md | 0 .../{user-guides => developer}/scrapeconfig.md | 0 Documentation/{ => getting-started}/compatibility.md | 0 Documentation/{ => getting-started}/design.md | 8 ++++---- Documentation/{ => getting-started}/installation.md | 0 Documentation/{ => getting-started}/introduction.md | 0 Documentation/{ => platform}/high-availability.md | 0 Documentation/{ => platform}/operator.md | 0 Documentation/{ => platform}/platform-guide.md | 4 ++-- .../{user-guides => platform}/prometheus-agent.md | 0 Documentation/{ => platform}/rbac-crd.md | 0 Documentation/{ => platform}/rbac.md | 0 Documentation/{user-guides => platform}/storage.md | 0 .../{user-guides => platform}/strategic-merge-patch.md | 0 Documentation/{ => platform}/thanos.md | 0 Documentation/{ => platform}/troubleshooting.md | 0 Documentation/{user-guides => platform}/webhook.md | 0 Makefile | 10 +++++----- README.md | 2 +- 21 files changed, 12 insertions(+), 12 deletions(-) rename Documentation/{ => api-reference}/api.md (100%) rename Documentation/{user-guides => developer}/alerting.md (100%) rename Documentation/{user-guides => developer}/getting-started.md (100%) rename Documentation/{user-guides => developer}/scrapeconfig.md (100%) rename Documentation/{ => getting-started}/compatibility.md (100%) rename Documentation/{ => getting-started}/design.md (96%) rename Documentation/{ => getting-started}/installation.md (100%) rename Documentation/{ => getting-started}/introduction.md (100%) rename Documentation/{ => platform}/high-availability.md (100%) rename Documentation/{ => platform}/operator.md (100%) rename Documentation/{ => platform}/platform-guide.md (95%) rename Documentation/{user-guides => platform}/prometheus-agent.md (100%) rename Documentation/{ => platform}/rbac-crd.md (100%) rename Documentation/{ => platform}/rbac.md (100%) rename Documentation/{user-guides => platform}/storage.md (100%) rename Documentation/{user-guides => platform}/strategic-merge-patch.md (100%) rename Documentation/{ => platform}/thanos.md (100%) rename Documentation/{ => platform}/troubleshooting.md (100%) rename Documentation/{user-guides => platform}/webhook.md (100%) diff --git a/Documentation/api.md b/Documentation/api-reference/api.md similarity index 100% rename from Documentation/api.md rename to Documentation/api-reference/api.md diff --git a/Documentation/user-guides/alerting.md b/Documentation/developer/alerting.md similarity index 100% rename from Documentation/user-guides/alerting.md rename to Documentation/developer/alerting.md diff --git a/Documentation/user-guides/getting-started.md b/Documentation/developer/getting-started.md similarity index 100% rename from Documentation/user-guides/getting-started.md rename to Documentation/developer/getting-started.md diff --git a/Documentation/user-guides/scrapeconfig.md b/Documentation/developer/scrapeconfig.md similarity index 100% rename from Documentation/user-guides/scrapeconfig.md rename to Documentation/developer/scrapeconfig.md diff --git a/Documentation/compatibility.md b/Documentation/getting-started/compatibility.md similarity index 100% rename from Documentation/compatibility.md rename to Documentation/getting-started/compatibility.md diff --git a/Documentation/design.md b/Documentation/getting-started/design.md similarity index 96% rename from Documentation/design.md rename to Documentation/getting-started/design.md index a4a7f27aa..ee5ba5ed5 100644 --- a/Documentation/design.md +++ b/Documentation/getting-started/design.md @@ -29,7 +29,7 @@ For a better understanding of all these custom resources, let us classify them i ### Instance-Based Resources -![Instances based resources](img/instance-based-resources.png) +![Instances based resources](../img/instance-based-resources.png) Instance-based resources are used to manage the deployment and lifecycle of different components in the Prometheus ecosystem, as shown in the above figure. Let us look into the features of each of these custom resources: @@ -53,7 +53,7 @@ The `Prometheus Agent` CRD sets up a [Prometheus Agent](https://prometheus.io/bl Config-based resources focus on managing the monitoring of resources and scraping metrics within a Kubernetes cluster. They define how metrics are collected, processed, and managed, rather than managing the deployment of the monitoring components themselves. For a clear picture, let us look at the relation of config-based resources with instance based resources. -![Config based resources](img/config-based-resources.png) +![Config based resources](../img/config-based-resources.png) The `Prometheus` and `PrometheusAgent` CRDs use the `podMonitorSelector`, `serviceMonitorSelector`, `probeSelector`, and `scrapeConfigSelector` fields to determine which `ServiceMonitor`, `PodMonitor`, `Probe`, and `ScrapeConfig` configurations should be included in the `Prometheus` and `PrometheusAgent` instances for scraping. @@ -75,12 +75,12 @@ The `ScrapeConfig` CRD allows you to define how Prometheus should discover and s #### AlertmanagerConfig -![AlertmanagerConfig](img/alertmanager-config.png) +![AlertmanagerConfig](../img/alertmanager-config.png) The `AlertmanagerConfig` CRD allows us to configure `Alertmanager` instances in a Kubernetes cluster. It specifies subsections of the Alertmanager configuration, enabling the routing of alerts to custom receivers and the setting of inhibition rules. #### PrometheusRule -![Prometheus Rule](img/prometheus-rule.png) +![Prometheus Rule](../img/prometheus-rule.png) The `PrometheusRule` CRD allows the definition of alerting and recording rules to be consumed by Prometheus or Thanos Ruler instances. Alerts and recording rules are reconciled by the Operator and dynamically loaded without requiring a restart of Prometheus or Thanos Ruler. diff --git a/Documentation/installation.md b/Documentation/getting-started/installation.md similarity index 100% rename from Documentation/installation.md rename to Documentation/getting-started/installation.md diff --git a/Documentation/introduction.md b/Documentation/getting-started/introduction.md similarity index 100% rename from Documentation/introduction.md rename to Documentation/getting-started/introduction.md diff --git a/Documentation/high-availability.md b/Documentation/platform/high-availability.md similarity index 100% rename from Documentation/high-availability.md rename to Documentation/platform/high-availability.md diff --git a/Documentation/operator.md b/Documentation/platform/operator.md similarity index 100% rename from Documentation/operator.md rename to Documentation/platform/operator.md diff --git a/Documentation/platform-guide.md b/Documentation/platform/platform-guide.md similarity index 95% rename from Documentation/platform-guide.md rename to Documentation/platform/platform-guide.md index cc9013e6d..2fe8d1b9e 100644 --- a/Documentation/platform-guide.md +++ b/Documentation/platform/platform-guide.md @@ -11,7 +11,7 @@ draft: false description: Getting started page for Platform Guide --- -This guide assumes you have a basic understanding of the Prometheus Operator. If you are new to it, please start with the [Introduction]({{< ref "introduction.md" >}}) page before proceeding. This guide will walk you through deploying Prometheus and Alertmanager instances. +This guide assumes you have a basic understanding of the Prometheus Operator. If you are new to it, please start with the [Introduction]({{}}) page before proceeding. This guide will walk you through deploying Prometheus and Alertmanager instances. ## Deploying Prometheus @@ -150,7 +150,7 @@ spec: Once the Service is created, the Alertmanager web server is available under the node's IP address on port `30903`. -> Note: Exposing the Alertmanager web server this way may not be an applicable solution. Read more about the possible options in the [Ingress guide]({{< ref "exposing-prometheus-and-alertmanager.md" >}}). +> Note: Exposing the Alertmanager web server this way may not be an applicable solution. Read more about the possible options in the [Ingress guide](../user-guides/exposing-prometheus-and-alertmanager.md). ### Configuring Alertmanager in Prometheus diff --git a/Documentation/user-guides/prometheus-agent.md b/Documentation/platform/prometheus-agent.md similarity index 100% rename from Documentation/user-guides/prometheus-agent.md rename to Documentation/platform/prometheus-agent.md diff --git a/Documentation/rbac-crd.md b/Documentation/platform/rbac-crd.md similarity index 100% rename from Documentation/rbac-crd.md rename to Documentation/platform/rbac-crd.md diff --git a/Documentation/rbac.md b/Documentation/platform/rbac.md similarity index 100% rename from Documentation/rbac.md rename to Documentation/platform/rbac.md diff --git a/Documentation/user-guides/storage.md b/Documentation/platform/storage.md similarity index 100% rename from Documentation/user-guides/storage.md rename to Documentation/platform/storage.md diff --git a/Documentation/user-guides/strategic-merge-patch.md b/Documentation/platform/strategic-merge-patch.md similarity index 100% rename from Documentation/user-guides/strategic-merge-patch.md rename to Documentation/platform/strategic-merge-patch.md diff --git a/Documentation/thanos.md b/Documentation/platform/thanos.md similarity index 100% rename from Documentation/thanos.md rename to Documentation/platform/thanos.md diff --git a/Documentation/troubleshooting.md b/Documentation/platform/troubleshooting.md similarity index 100% rename from Documentation/troubleshooting.md rename to Documentation/platform/troubleshooting.md diff --git a/Documentation/user-guides/webhook.md b/Documentation/platform/webhook.md similarity index 100% rename from Documentation/user-guides/webhook.md rename to Documentation/platform/webhook.md diff --git a/Makefile b/Makefile index 669839d0c..1c383c6c9 100644 --- a/Makefile +++ b/Makefile @@ -281,16 +281,16 @@ example/admission-webhook: scripts/generate/vendor scripts/generate/admission-we example/alertmanager-crd-conversion: scripts/generate/vendor scripts/generate/conversion-webhook-patch-for-alermanagerconfig-crd.jsonnet $(shell find jsonnet -type f) scripts/generate/build-conversion-webhook-patch-for-alermanagerconfig-crd.sh -FULLY_GENERATED_DOCS = Documentation/api.md Documentation/compatibility.md Documentation/operator.md +FULLY_GENERATED_DOCS = Documentation/api-reference/api.md Documentation/getting-started/compatibility.md Documentation/platform/operator.md -Documentation/operator.md: operator +Documentation/platform/operator.md: operator $(MDOX_BINARY) fmt $@ -Documentation/compatibility.md: pkg/operator/defaults.go +Documentation/getting-started/compatibility.md: pkg/operator/defaults.go $(MDOX_BINARY) fmt $@ -Documentation/api.md: $(TYPES_V1_TARGET) $(TYPES_V1ALPHA1_TARGET) $(TYPES_V1BETA1_TARGET) - GODEBUG=$(GODEBUG) $(API_DOC_GEN_BINARY) -api-dir "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/" -config "$(PWD)/scripts/docs/config.json" -template-dir "$(PWD)/scripts/docs/templates" -out-file "$(PWD)/Documentation/api.md" +Documentation/api-reference/api.md: $(TYPES_V1_TARGET) $(TYPES_V1ALPHA1_TARGET) $(TYPES_V1BETA1_TARGET) + GODEBUG=$(GODEBUG) $(API_DOC_GEN_BINARY) -api-dir "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/" -config "$(PWD)/scripts/docs/config.json" -template-dir "$(PWD)/scripts/docs/templates" -out-file "$(PWD)/Documentation/api-reference/api.md" ############## # Formatting # diff --git a/README.md b/README.md index 7b6f13c33..bdddffb88 100644 --- a/README.md +++ b/README.md @@ -181,7 +181,7 @@ the maintainers of the project found in the [MAINTAINERS.md](MAINTAINERS.md) fil ## Troubleshooting -Check the [troubleshooting documentation](Documentation/troubleshooting.md) for +Check the [troubleshooting documentation](Documentation/platform/troubleshooting.md) for common issues and frequently asked questions (FAQ). ## Acknowledgements