From 66dd3bfcb4e0540f6d6ffdd42a5236e0d9ceca42 Mon Sep 17 00:00:00 2001 From: Rakshit Gondwal Date: Wed, 29 Mar 2023 21:14:12 +0530 Subject: [PATCH 1/6] add metrics-operator architecture Signed-off-by: Rakshit Gondwal --- .../architecture/components/_index.md | 33 ----------------- .../components/lifecycle-operator/_index.md | 28 +++++++++++++++ .../components/metrics-operator/_index.md | 36 +++++++++++++++++++ .../components/scheduler/_index.md | 16 +++++++++ 4 files changed, 80 insertions(+), 33 deletions(-) create mode 100644 docs/content/en/docs/concepts/architecture/components/lifecycle-operator/_index.md create mode 100644 docs/content/en/docs/concepts/architecture/components/metrics-operator/_index.md create mode 100644 docs/content/en/docs/concepts/architecture/components/scheduler/_index.md diff --git a/docs/content/en/docs/concepts/architecture/components/_index.md b/docs/content/en/docs/concepts/architecture/components/_index.md index b8e961dfb5..dcb3f14462 100644 --- a/docs/content/en/docs/concepts/architecture/components/_index.md +++ b/docs/content/en/docs/concepts/architecture/components/_index.md @@ -28,36 +28,3 @@ style Scheduler fill:#d8e6f4,stroke:#fff,stroke-width:px,color:#006bb8 style Lifecycle-Operator fill:#d8e6f4,stroke:#fff,stroke-width:px,color:#006bb8 style Metrics-Operator fill:#d8e6f4,stroke:#fff,stroke-width:px,color:#006bb8 ``` - -**Keptn's Lifecycle Operator** is -a Kubernetes [operator](https://kubernetes.io/docs/concepts/extend-kubernetes/operator/) -that automates the deployment and management -of the Keptn Lifecycle Controller components in a Kubernetes cluster. -The Keptn Lifecycle Operator contains several controllers for **Keptn CRDs** -and a **Mutating Webhook**. - -Here's a brief overview: - -**Keptn CRDs:** Keptn Lifecycle Operator contains -several controllers that manage and reconcile different types of Keptn CRDs -such as the Project Controller, Service Controller, and Stage Controller. - -**Mutating Webhook:** automatically injects Keptn labels -and annotations into Kubernetes resources, -such as deployments and services. -These labels and annotations are used to enable Keptn's automation -and monitoring capabilities. - -**Keptn's Lifecycle Metrics Operator** -collects, processes, and analyzes metrics data from a variety of sources. -Once collected, this data, can be used to generate a variety of reports -and dashboards that provide insights into the health and performance of the application and infrastructure. - -**Keptn's Lifecycle Scheduler** replaces the -[Kubernetes scheduler](https://kubernetes.io/docs/concepts/scheduling-eviction/kube-scheduler/) -to allow users to schedule events and tasks to occur -at specific times during the application lifecycle. -The Lifecycle Scheduler can trigger events such as -deployment, testing, and remediation at specific times or intervals. -The Keptn Scheduler guarantees that Pods are initiated only after -the Pre-Deployment checks are completed. diff --git a/docs/content/en/docs/concepts/architecture/components/lifecycle-operator/_index.md b/docs/content/en/docs/concepts/architecture/components/lifecycle-operator/_index.md new file mode 100644 index 0000000000..b24e72c429 --- /dev/null +++ b/docs/content/en/docs/concepts/architecture/components/lifecycle-operator/_index.md @@ -0,0 +1,28 @@ +--- +title: Keptn's Lifecycle Operator +linktitle: Lifecycle Operator +description: Basic understanding of Lifecycle Operator +weight: 80 +cascade: +--- + +### Lifecycle Operator + +**Keptn's Lifecycle Operator** is +a Kubernetes [operator](https://kubernetes.io/docs/concepts/extend-kubernetes/operator/) +that automates the deployment and management +of the Keptn Lifecycle Controller components in a Kubernetes cluster. +The Keptn Lifecycle Operator contains several controllers for **Keptn CRDs** +and a **Mutating Webhook**. + +Here's a brief overview: + +**Keptn CRDs:** Keptn Lifecycle Operator contains +several controllers that manage and reconcile different types of Keptn CRDs +such as the Project Controller, Service Controller, and Stage Controller. + +**Mutating Webhook:** automatically injects Keptn labels +and annotations into Kubernetes resources, +such as deployments and services. +These labels and annotations are used to enable Keptn's automation +and monitoring capabilities. \ No newline at end of file diff --git a/docs/content/en/docs/concepts/architecture/components/metrics-operator/_index.md b/docs/content/en/docs/concepts/architecture/components/metrics-operator/_index.md new file mode 100644 index 0000000000..cefb82484c --- /dev/null +++ b/docs/content/en/docs/concepts/architecture/components/metrics-operator/_index.md @@ -0,0 +1,36 @@ +--- +title: Keptn's Metrics Operator +linktitle: Metrics Operator +description: Basic understanding of KLT Metrics Operator +weight: 80 +cascade: +--- + +### Metrics Operator + +**Metrics Operator** collects, processes, and analyzes metrics data from a variety of sources. Once collected, this data, can be used to generate a variety of reports and dashboards that provide insights into the health and performance of the application and infrastructure. + +The Metrics Operator consists of two main components: + +* Metrics Controller +* Metrics Adapter + +```mermaid +graph TD; + Metrics-Operator-->Metrics-Adapter; + Metrics-Operator-->Metrics-Controller +style Metrics-Operator fill:#006bb8,stroke:#fff,stroke-width:px,color:#fff +style Metrics-Adapter fill:#d8e6f4,stroke:#fff,stroke-width:px,color:#006bb8 +style Metrics-Controller fill:#d8e6f4,stroke:#fff,stroke-width:px,color:#006bb8 +``` + +**Metrics adapter** is used to expose custom metrics from an application to external monitoring and alerting tools. The adapter exposes custom metrics on a specific endpoint where external monitoring and alerting tools can scrape them. It is an important component of the metrics operator as it allows for the collection and exposure of custom metrics, which can be used to gain insight into the behavior and performance of applications running on a Kubenetes cluster. + +**Metrics controller** is used to fetch metrics from a SLI provider. The controller reconciles a `KeptnMetric` CR and updates it's status with the metric value provided by the selected SLI provider. The steps in which the Controller fetches metrics are given below: +- It first fetches the `KeptnMetric` object to reconcile. +- If the object is not found, it returns and lets Kubernetes handle deleting all associated resources. +- If the object is found, the code checks that if the metric has been updated within the configured interval which is defined in the `Spec.FetchIntervalSeconds`. If not, then it skips reconciling and requeues the request for later. +- If the metric should be reconciled, it fetches the provider defined in the `Spec.Provider.Name` field. +- If the provider is not found, it returns and requeues the request for later. +- If the provider is found, it loads the provider and evaluates the query defined in the `Spec.Query` field. +- If the evaluation is succesful, it stores the fetched value in the status of the `KeptnMetric` object. \ No newline at end of file diff --git a/docs/content/en/docs/concepts/architecture/components/scheduler/_index.md b/docs/content/en/docs/concepts/architecture/components/scheduler/_index.md new file mode 100644 index 0000000000..e0e273a6dc --- /dev/null +++ b/docs/content/en/docs/concepts/architecture/components/scheduler/_index.md @@ -0,0 +1,16 @@ +--- +title: KLT Scheduler +linktitle: Scheduler +description: Basic understanding of KLT Scheduler +weight: 80 +cascade: +--- + +**Keptn's Lifecycle Scheduler** replaces the +[Kubernetes scheduler](https://kubernetes.io/docs/concepts/scheduling-eviction/kube-scheduler/) +to allow users to schedule events and tasks to occur +at specific times during the application lifecycle. +The Lifecycle Scheduler can trigger events such as +deployment, testing, and remediation at specific times or intervals. +The Keptn Scheduler guarantees that Pods are initiated only after +the Pre-Deployment checks are completed. From 6f3e3a76cd03227f6db97a7a525293c34aa24aeb Mon Sep 17 00:00:00 2001 From: Rakshit Gondwal Date: Wed, 29 Mar 2023 21:27:43 +0530 Subject: [PATCH 2/6] add minor changes Signed-off-by: Rakshit Gondwal --- .../architecture/components/lifecycle-operator/_index.md | 5 ++--- .../architecture/components/metrics-operator/_index.md | 5 ++--- .../concepts/architecture/components/scheduler/_index.md | 4 ++-- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/docs/content/en/docs/concepts/architecture/components/lifecycle-operator/_index.md b/docs/content/en/docs/concepts/architecture/components/lifecycle-operator/_index.md index b24e72c429..4f0697fc73 100644 --- a/docs/content/en/docs/concepts/architecture/components/lifecycle-operator/_index.md +++ b/docs/content/en/docs/concepts/architecture/components/lifecycle-operator/_index.md @@ -1,12 +1,11 @@ --- -title: Keptn's Lifecycle Operator +title: Keptn Lifecycle Operator linktitle: Lifecycle Operator -description: Basic understanding of Lifecycle Operator +description: Basic understanding of Keptn's Lifecycle Operator weight: 80 cascade: --- -### Lifecycle Operator **Keptn's Lifecycle Operator** is a Kubernetes [operator](https://kubernetes.io/docs/concepts/extend-kubernetes/operator/) diff --git a/docs/content/en/docs/concepts/architecture/components/metrics-operator/_index.md b/docs/content/en/docs/concepts/architecture/components/metrics-operator/_index.md index cefb82484c..e8c9b1e24a 100644 --- a/docs/content/en/docs/concepts/architecture/components/metrics-operator/_index.md +++ b/docs/content/en/docs/concepts/architecture/components/metrics-operator/_index.md @@ -1,12 +1,11 @@ --- -title: Keptn's Metrics Operator +title: Keptn Metrics Operator linktitle: Metrics Operator -description: Basic understanding of KLT Metrics Operator +description: Basic understanding of Keptn's Metrics Operator weight: 80 cascade: --- -### Metrics Operator **Metrics Operator** collects, processes, and analyzes metrics data from a variety of sources. Once collected, this data, can be used to generate a variety of reports and dashboards that provide insights into the health and performance of the application and infrastructure. diff --git a/docs/content/en/docs/concepts/architecture/components/scheduler/_index.md b/docs/content/en/docs/concepts/architecture/components/scheduler/_index.md index e0e273a6dc..52a3b0a3a1 100644 --- a/docs/content/en/docs/concepts/architecture/components/scheduler/_index.md +++ b/docs/content/en/docs/concepts/architecture/components/scheduler/_index.md @@ -1,7 +1,7 @@ --- -title: KLT Scheduler +title: Keptn Lifecycle Scheduler linktitle: Scheduler -description: Basic understanding of KLT Scheduler +description: Basic understanding of Keptn's Lifecycle Scheduler weight: 80 cascade: --- From e0cf642379ca91b4bbaa7fa680b9334b6b8c049d Mon Sep 17 00:00:00 2001 From: Rakshit Gondwal Date: Thu, 13 Apr 2023 00:18:34 +0530 Subject: [PATCH 3/6] fix after review Signed-off-by: Rakshit Gondwal --- .../components/lifecycle-operator/_index.md | 2 +- .../components/metrics-operator/_index.md | 40 ++++++++++++++----- 2 files changed, 30 insertions(+), 12 deletions(-) diff --git a/docs/content/en/docs/concepts/architecture/components/lifecycle-operator/_index.md b/docs/content/en/docs/concepts/architecture/components/lifecycle-operator/_index.md index 4f0697fc73..e064671db5 100644 --- a/docs/content/en/docs/concepts/architecture/components/lifecycle-operator/_index.md +++ b/docs/content/en/docs/concepts/architecture/components/lifecycle-operator/_index.md @@ -24,4 +24,4 @@ such as the Project Controller, Service Controller, and Stage Controller. and annotations into Kubernetes resources, such as deployments and services. These labels and annotations are used to enable Keptn's automation -and monitoring capabilities. \ No newline at end of file +and monitoring capabilities. diff --git a/docs/content/en/docs/concepts/architecture/components/metrics-operator/_index.md b/docs/content/en/docs/concepts/architecture/components/metrics-operator/_index.md index e8c9b1e24a..e18d8a1a1b 100644 --- a/docs/content/en/docs/concepts/architecture/components/metrics-operator/_index.md +++ b/docs/content/en/docs/concepts/architecture/components/metrics-operator/_index.md @@ -7,9 +7,18 @@ cascade: --- -**Metrics Operator** collects, processes, and analyzes metrics data from a variety of sources. Once collected, this data, can be used to generate a variety of reports and dashboards that provide insights into the health and performance of the application and infrastructure. +The Keptn Metrics Operator collects, processes, and analyzes metrics data from a variety of sources. +Once collected, this data, can be used to generate a variety of reports and dashboards +that provide insights into the health and performance of the application and infrastructure. -The Metrics Operator consists of two main components: +While Kubernetes does have two metrics servers, they have limitations. The custom and external APIs only +allow you to use a single observability platform. The Keptn Metrics Operator solves this problem by +providing a single entry point for all your metrics data, regardless of its source. +Furthermore, due to the integration with the Kubernetes custom metrics API, these metrics are also +compatible with the Kubernetes HorizontalPodAutoscaler (HPA) which enables the horizontal scaling of workloads +based on metrics collected from multiple observability platforms such as Prometheus, Dynatrace or Datadog. + +The Metrics Operator consists of the following components: * Metrics Controller * Metrics Adapter @@ -23,13 +32,22 @@ style Metrics-Adapter fill:#d8e6f4,stroke:#fff,stroke-width:px,color:#006bb8 style Metrics-Controller fill:#d8e6f4,stroke:#fff,stroke-width:px,color:#006bb8 ``` -**Metrics adapter** is used to expose custom metrics from an application to external monitoring and alerting tools. The adapter exposes custom metrics on a specific endpoint where external monitoring and alerting tools can scrape them. It is an important component of the metrics operator as it allows for the collection and exposure of custom metrics, which can be used to gain insight into the behavior and performance of applications running on a Kubenetes cluster. +**Metrics adapter** is used to expose custom metrics from an application to external monitoring and alerting tools. +The adapter exposes custom metrics on a specific endpoint where external monitoring and alerting tools can scrape them. +It is an important component of the metrics operator as it allows for the collection and exposure of custom metrics, +which can be used to gain insight into the behavior and performance of applications running on a Kubenetes cluster. + +**Metrics controller** is used to fetch metrics from a SLI provider. The controller reconciles a +[`KeptnMetric`](../../../../yaml-crd-ref/metric) CR and updates it's status with the metric value +provided by the selected SLI provider. +The steps in which the Controller fetches metrics are given below: -**Metrics controller** is used to fetch metrics from a SLI provider. The controller reconciles a `KeptnMetric` CR and updates it's status with the metric value provided by the selected SLI provider. The steps in which the Controller fetches metrics are given below: -- It first fetches the `KeptnMetric` object to reconcile. -- If the object is not found, it returns and lets Kubernetes handle deleting all associated resources. -- If the object is found, the code checks that if the metric has been updated within the configured interval which is defined in the `Spec.FetchIntervalSeconds`. If not, then it skips reconciling and requeues the request for later. -- If the metric should be reconciled, it fetches the provider defined in the `Spec.Provider.Name` field. -- If the provider is not found, it returns and requeues the request for later. -- If the provider is found, it loads the provider and evaluates the query defined in the `Spec.Query` field. -- If the evaluation is succesful, it stores the fetched value in the status of the `KeptnMetric` object. \ No newline at end of file +* It first fetches the `KeptnMetric` object to reconcile. +* If the object is not found, it returns and lets Kubernetes handle deleting all associated resources. +* If the object is found, the code checks that if the metric has been updated within the configured +interval which is defined in the `Spec.FetchIntervalSeconds`. +If not, then it skips reconciling and requeues the request for later. +* If the metric should be reconciled, it fetches the provider defined in the `Spec.Provider.Name` field. +* If the provider is not found, it returns and requeues the request for later. +* If the provider is found, it loads the provider and evaluates the query defined in the `Spec.Query` field. +* If the evaluation is succesful, it stores the fetched value in the status of the `KeptnMetric` object. From 750bf3037764eee752ecbf158aaf2b3e94966fe5 Mon Sep 17 00:00:00 2001 From: Rakshit Gondwal Date: Thu, 13 Apr 2023 22:11:17 +0530 Subject: [PATCH 4/6] fix after review Signed-off-by: Rakshit Gondwal --- .../architecture/components/metrics-operator/_index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/content/en/docs/concepts/architecture/components/metrics-operator/_index.md b/docs/content/en/docs/concepts/architecture/components/metrics-operator/_index.md index e18d8a1a1b..a27bb12a7a 100644 --- a/docs/content/en/docs/concepts/architecture/components/metrics-operator/_index.md +++ b/docs/content/en/docs/concepts/architecture/components/metrics-operator/_index.md @@ -38,9 +38,9 @@ It is an important component of the metrics operator as it allows for the collec which can be used to gain insight into the behavior and performance of applications running on a Kubenetes cluster. **Metrics controller** is used to fetch metrics from a SLI provider. The controller reconciles a -[`KeptnMetric`](../../../../yaml-crd-ref/metric) CR and updates it's status with the metric value +[`KeptnMetric`](../../../../yaml-crd-ref/metric) CR and updates its status with the metric value provided by the selected SLI provider. -The steps in which the Controller fetches metrics are given below: +The steps in which the controller fetches metrics are given below: * It first fetches the `KeptnMetric` object to reconcile. * If the object is not found, it returns and lets Kubernetes handle deleting all associated resources. From 20586ed988972162ff0d32e9849779b41beec7cf Mon Sep 17 00:00:00 2001 From: Rakshit Gondwal Date: Mon, 17 Apr 2023 12:07:48 +0530 Subject: [PATCH 5/6] fix: markdownlint errors Signed-off-by: Rakshit Gondwal --- .../components/metrics-operator/_index.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/docs/content/en/docs/concepts/architecture/components/metrics-operator/_index.md b/docs/content/en/docs/concepts/architecture/components/metrics-operator/_index.md index a27bb12a7a..ecd2a7d043 100644 --- a/docs/content/en/docs/concepts/architecture/components/metrics-operator/_index.md +++ b/docs/content/en/docs/concepts/architecture/components/metrics-operator/_index.md @@ -11,9 +11,10 @@ The Keptn Metrics Operator collects, processes, and analyzes metrics data from a Once collected, this data, can be used to generate a variety of reports and dashboards that provide insights into the health and performance of the application and infrastructure. -While Kubernetes does have two metrics servers, they have limitations. The custom and external APIs only -allow you to use a single observability platform. The Keptn Metrics Operator solves this problem by -providing a single entry point for all your metrics data, regardless of its source. +While Kubernetes does have two metrics servers, they have limitations. +The custom and external APIs only allow you to use a single observability platform. +The Keptn Metrics Operator solves this problem by providing a single entry point for +all your metrics data, regardless of its source. Furthermore, due to the integration with the Kubernetes custom metrics API, these metrics are also compatible with the Kubernetes HorizontalPodAutoscaler (HPA) which enables the horizontal scaling of workloads based on metrics collected from multiple observability platforms such as Prometheus, Dynatrace or Datadog. @@ -37,9 +38,9 @@ The adapter exposes custom metrics on a specific endpoint where external monitor It is an important component of the metrics operator as it allows for the collection and exposure of custom metrics, which can be used to gain insight into the behavior and performance of applications running on a Kubenetes cluster. -**Metrics controller** is used to fetch metrics from a SLI provider. The controller reconciles a -[`KeptnMetric`](../../../../yaml-crd-ref/metric) CR and updates its status with the metric value -provided by the selected SLI provider. +**Metrics controller** is used to fetch metrics from a SLI provider. +The controller reconciles a [`KeptnMetric`](../../../../yaml-crd-ref/metric) CR and +updates its status with the metric value provided by the selected SLI provider. The steps in which the controller fetches metrics are given below: * It first fetches the `KeptnMetric` object to reconcile. From 1ac6058c070048674486c1e58f7f5f74cbc4d911 Mon Sep 17 00:00:00 2001 From: Rakshit Gondwal Date: Mon, 17 Apr 2023 16:02:27 +0530 Subject: [PATCH 6/6] fix: markdown-link-check error Signed-off-by: Rakshit Gondwal --- .../concepts/architecture/components/metrics-operator/_index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/content/en/docs/concepts/architecture/components/metrics-operator/_index.md b/docs/content/en/docs/concepts/architecture/components/metrics-operator/_index.md index ecd2a7d043..48752c79f0 100644 --- a/docs/content/en/docs/concepts/architecture/components/metrics-operator/_index.md +++ b/docs/content/en/docs/concepts/architecture/components/metrics-operator/_index.md @@ -39,7 +39,7 @@ It is an important component of the metrics operator as it allows for the collec which can be used to gain insight into the behavior and performance of applications running on a Kubenetes cluster. **Metrics controller** is used to fetch metrics from a SLI provider. -The controller reconciles a [`KeptnMetric`](../../../../yaml-crd-ref/metric) CR and +The controller reconciles a [`KeptnMetric`](../../../../yaml-crd-ref/metric.md) CR and updates its status with the metric value provided by the selected SLI provider. The steps in which the controller fetches metrics are given below: