From 491e1615c524c6880854a1e33d44f4a960260c59 Mon Sep 17 00:00:00 2001 From: Jorge Turrado Ferrero Date: Wed, 6 Oct 2021 11:02:13 +0200 Subject: [PATCH] Add a section about how to write scaler documentation (#545) Co-authored-by: Tom Kerkhove Signed-off-by: jorturfer --- CONTRIBUTING.md | 1 + README.md | 15 +++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 89f5a0fd8f4..887e30456f3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -16,6 +16,7 @@ We provide easy ways to introduce new content: - [Adding new blog post](https://github.com/kedacore/keda-docs#adding-scaler-documentation) - [Adding new scaler documentation](https://github.com/kedacore/keda-docs#adding-scaler-documentation) +- [Writing documentation for a scaler](https://github.com/kedacore/keda-docs#writing-documentation-for-a-scaler) - [Add new Frequently Asked Question (FAQ)](https://github.com/kedacore/keda-docs#add-new-frequently-asked-question-faq) - [Add new troubleshooting guidance](https://github.com/kedacore/keda-docs#add-new-troubleshooting-guidance) diff --git a/README.md b/README.md index 8d8bae07fa3..f2987b845f8 100644 --- a/README.md +++ b/README.md @@ -119,6 +119,21 @@ This creates a boilerplate Markdown file in `content/docs/scalers/my-new-scaler. * `maintainer` * `description` +## Writing documentation for a scaler + +In order to maintain the style consistency across different scalers, all the parameters which are listed have to be written using this convention: + +- name - Description. (Values: x, y, z, Default: y, Optional, Extra Info) + +If a parameter is required or doesn't have defined/default values, the missing info should be removed from the pattern. + +Here are a few examples: +> - `targetMetricValue` - Target value for your metric. +> - `metricFilter` - Aggregation method of the metric. (Values: `max`, `min`, `average`, `sum`, `variance`, Default: `average`, Optional) +> - `metricPeriod` - Granularity of the metric. (Default: `300`, Optional) +> - `subscriptionName` - Name of the Azure Service Bus queue to scale on. (Optional, Required when `topicName` is specified) + + ## Add new Frequently Asked Question (FAQ) To update the KEDA [FAQ page](https://keda.sh/docs/faq), update the TOML file at [`data/faq20.toml`]. Here's an example question/answer pair: