From 44d584334307eb93f35fa947d220d537e10ad064 Mon Sep 17 00:00:00 2001 From: Aviv Litman Date: Sun, 26 Feb 2023 18:08:39 +0200 Subject: [PATCH] Update the readme to include monitoring Signed-off-by: Aviv Litman --- .../monitoring/memcached-operator/README.md | 21 ++++++++++++++++--- .../monitoring/memcached-operator/README.md | 21 ++++++++++++++++--- 2 files changed, 36 insertions(+), 6 deletions(-) diff --git a/testdata/go/v3/monitoring/memcached-operator/README.md b/testdata/go/v3/monitoring/memcached-operator/README.md index 3194aa0789a..573a19450a0 100644 --- a/testdata/go/v3/monitoring/memcached-operator/README.md +++ b/testdata/go/v3/monitoring/memcached-operator/README.md @@ -1,8 +1,8 @@ -# memcached-operator -// TODO(user): Add simple overview of use/purpose +# memcached-operator (with monitoring) +A Go-based Operator framework that has the goal to install, deploy, monitor and manage [Memcached](https://hub.docker.com/_/memcached) on the cluster. ## Description -// TODO(user): An in-depth paragraph about your project and overview of use +This project is based on the testdata operator and will deploy the operator with the recommended structure and tooling for metrics, alerts, runbooks and all that is needed for monitoring with Prometheus, in order to help developers start implementing monitoring and provide them with tooling, examples and best practices. ## Getting Started You’ll need a Kubernetes cluster to run against. You can use [KIND](https://sigs.k8s.io/kind) to get a local cluster for testing, or run against a remote cluster. @@ -41,6 +41,21 @@ UnDeploy the controller from the cluster: make undeploy ``` +## Monitoring +**NOTE:** This operator follows the [Operator Observability Best Practices](https://sdk.operatorframework.io/docs/best-practices/observability-best-practices/). + +### Metrics +#### Metrics Tests +Metrics should include tests that verify that they exist and that their value is correct. See "test/e2e". +#### Metrics Documentation +The metrics documentation (see "docs/monitoring/metrics.md") is auto-generated by the utility tool "monitoring/metricsdocs". + +### Alerts +#### Alerts Runbooks +Each alert can include a `runbook_url` annotation and an alert runbook that describes it. See "monitoring/alerts.go" and "docs/monitoring/runbooks". +#### Alerts Tests +Alerts should include E2E Testing and unit tests. See "test/e2e" and "monitoring/prom-rule-ci/prom-rules-tests.yaml". + ## Contributing // TODO(user): Add detailed information on how you would like others to contribute to this project diff --git a/testdata/go/v4-alpha/monitoring/memcached-operator/README.md b/testdata/go/v4-alpha/monitoring/memcached-operator/README.md index 3194aa0789a..f02a5f7a730 100644 --- a/testdata/go/v4-alpha/monitoring/memcached-operator/README.md +++ b/testdata/go/v4-alpha/monitoring/memcached-operator/README.md @@ -1,8 +1,8 @@ -# memcached-operator -// TODO(user): Add simple overview of use/purpose +# memcached-operator (with monitoring) +A Go-based Operator framework that has the goal to install, deploy, monitor and manage [Memcached](https://hub.docker.com/_/memcached) on the cluster. ## Description -// TODO(user): An in-depth paragraph about your project and overview of use +This project is based on the testdata operator and will deploy the operator with the recommended structure and tooling for metrics, alerts, runbooks and all that is needed for monitoring with Prometheus, in order to help developers start implementing monitoring and provide them with tooling, examples and best practices. ## Getting Started You’ll need a Kubernetes cluster to run against. You can use [KIND](https://sigs.k8s.io/kind) to get a local cluster for testing, or run against a remote cluster. @@ -41,6 +41,21 @@ UnDeploy the controller from the cluster: make undeploy ``` +## Monitoring +**NOTE:** This operator follows the [Operator Observability Best Practices](https://sdk.operatorframework.io/docs/best-practices/observability-best-practices/). + +### Metrics +#### Metrics Tests +Metrics should include tests that verify that they exist and that their value is correct. See "test/e2e". +#### Metrics Documentation +The metrics documentation (see "docs/monitoring/metrics.md") is auto-generated by the utility tool "monitoring/metricsdocs". + +### Alerts +#### Alerts Runbooks +Each alert can include a `runbook_url` annotation and an alert runbook that describes it. See "monitoring/alerts.go" and "docs/monitoring/runbooks". +#### Alerts Tests +Alerts should include E2E Testing and unit tests. See "test/e2e" and "monitoring/prom-rule-ci/prom-rules-tests.yaml". + ## Contributing // TODO(user): Add detailed information on how you would like others to contribute to this project