Skip to content

Commit a9df59b

Browse files
authored
rework docs and ruler volumes (#317)
* rework docs and ruler volume Signed-off-by: nschad <[email protected]>
1 parent 850784d commit a9df59b

16 files changed

+182
-49
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
* [CHANGE] undo querier store optimization #304
77
* config.querier.query_ingesters_within: 13h -> 0s (default)
88
* config.querier.query_store_after: 12h -> 0s (default)
9+
* [CHANGE] Change sidecar default values to match values in documentation #317
10+
* [CHANGE] Remove ruler.persistentVolume.subPath since it was never persistent to begin with #317
911
* [ENHANCEMENT] Fix the indentation of memcached guide #309
1012
* [ENHANCEMENT] Added api endpoints for Grafana 8 unified alerting #291
1113
* [ENHANCEMENT] Add guide on how to configure alertmanager/ruler with configmap #313

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,6 @@ Kubernetes: `^1.19.0-0`
634634
| ruler.&ZeroWidthSpace;livenessProbe.&ZeroWidthSpace;httpGet.&ZeroWidthSpace;path | string | `"/ready"` | |
635635
| ruler.&ZeroWidthSpace;livenessProbe.&ZeroWidthSpace;httpGet.&ZeroWidthSpace;port | string | `"http-metrics"` | |
636636
| ruler.&ZeroWidthSpace;nodeSelector | object | `{}` | |
637-
| ruler.&ZeroWidthSpace;persistentVolume.&ZeroWidthSpace;subPath | string | `nil` | |
638637
| ruler.&ZeroWidthSpace;podAnnotations | object | `{"prometheus.io/port":"8080","prometheus.io/scrape":"true"}` | Pod Annotations |
639638
| ruler.&ZeroWidthSpace;podDisruptionBudget.&ZeroWidthSpace;maxUnavailable | int | `1` | |
640639
| ruler.&ZeroWidthSpace;podLabels | object | `{}` | Pod Labels |
@@ -656,7 +655,7 @@ Kubernetes: `^1.19.0-0`
656655
| ruler.&ZeroWidthSpace;sidecar.&ZeroWidthSpace;defaultFolderName | string | `""` | The default folder name, it will create a subfolder under the `folder` and put rules in there instead |
657656
| ruler.&ZeroWidthSpace;sidecar.&ZeroWidthSpace;enableUniqueFilenames | bool | `false` | A value of true will produce unique filenames to avoid issues when duplicate data keys exist between ConfigMaps and/or Secrets within the same or multiple Namespaces. |
658657
| ruler.&ZeroWidthSpace;sidecar.&ZeroWidthSpace;enabled | bool | `false` | Enable sidecar that collect the configmaps with specified label and stores the included files them into the respective folders |
659-
| ruler.&ZeroWidthSpace;sidecar.&ZeroWidthSpace;folder | string | `"/tmp/rules"` | Folder where the files should be placed. |
658+
| ruler.&ZeroWidthSpace;sidecar.&ZeroWidthSpace;folder | string | `"/data/rules"` | Folder where the files should be placed. |
660659
| ruler.&ZeroWidthSpace;sidecar.&ZeroWidthSpace;folderAnnotation | string | `"k8s-sidecar-target-directory"` | The annotation the sidecar will look for in ConfigMaps and/or Secrets to override the destination folder for files. If the value is a relative path, it will be relative to FOLDER |
661660
| ruler.&ZeroWidthSpace;sidecar.&ZeroWidthSpace;image.&ZeroWidthSpace;repository | string | `"omegavveapon/kopf-k8s-sidecar"` | |
662661
| ruler.&ZeroWidthSpace;sidecar.&ZeroWidthSpace;image.&ZeroWidthSpace;sha | string | `""` | |

docs/_config.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@ description: >-
44
Cortex is a horizontally scalable, highly available, multi-tenant, long term Prometheus.
55
The cortex-helm-chart helps the operator with deploying cortex on a Kubernetes cluster.
66
twitter_username: CortexMetrics
7-
github_username: cortexproject
7+
github_username: cortexproject
88

99
# Build settings
1010
remote_theme: pmarsceill/just-the-docs
1111
# color_scheme: "dark"
12+
13+
footer_content: "Copyright &copy; 2022 cortexproject. Distributed by an <a href=\"https://github.com/cortexproject/cortex-helm-chart/blob/master/LICENSE\">Apache License 2.0.</a>"

docs/development.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
layout: page
3+
title: Development
4+
nav_order: 3
5+
has_children: true
6+
permalink: /docs/development
7+
---
8+
# Development
9+
{: .no_toc }
10+
11+
Tutorials on how to develop the chart locally
12+
{: .fs-6 .fw-300 }
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
layout: page
3+
title: Working with the cortex-helm-chart docs
4+
parent: Development
5+
has_children: false
6+
has_toc: false
7+
---
8+
# Working with the cortex-helm-chart docs
9+
{: .no_toc }
10+
11+
## Table of contents
12+
{: .no_toc .text-delta }
13+
14+
1. TOC
15+
{:toc}
16+
17+
---
18+
# Setup
19+
20+
The cortex-helm-chart docs uses [jekyll](https://jekyllrb.com/) with the [just-the-docs](https://github.com/pmarsceill/just-the-docs) theme. Unfortunately due to security concerns GitHub doesn't let us preview from pull requests or different branches. However GitHub created [this](https://docs.github.com/en/pages/setting-up-a-github-pages-site-with-jekyll/testing-your-github-pages-site-locally-with-jekyll) guide on how to test your changes locally.
21+
22+
# Preview
23+
24+
After installing ruby and bundle. Simply change into the `/docs` folder of the cortex-helm-chart and run:
25+
26+
```
27+
bundle exec jekyll serve --incremental --livereload
28+
```
29+
30+
For further options you can consult `bundle exec jekyll serve --help`

docs/guides.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
---
22
layout: page
33
title: Guides
4-
nav_order: 3
4+
nav_order: 2
55
has_children: true
6+
has_toc: true
67
permalink: /docs/guides
7-
---
8+
---
9+
# Guides
10+
{: .no_toc }
11+
12+
Guides & Best-Practices on how to configure the cortex-helm-chart.
13+
{: .fs-6 .fw-300 }
Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,28 @@
11
---
22
layout: page
3-
title: Configure with configmap
3+
title: Configuring Cortex with configmap
44
parent: Guides
5-
has_children: true
5+
has_children: false
66
has_toc: false
77
---
8-
# Configuring using configmap
8+
# Configuring Cortex with configmap
9+
{: .no_toc }
910

10-
By default, cortex configuration is managed using a *Secret*. To use a *ConfigMap* instead, set **useConfigMap**:
11+
## Table of contents
12+
{: .no_toc .text-delta }
13+
14+
1. TOC
15+
{:toc}
16+
17+
---
18+
# Configuring Cortex with configmap
19+
20+
By default, cortex configuration is managed using a `Secret`. To use a `ConfigMap` instead, set **useConfigMap**:
1121

1222
{% raw %}
1323
```yaml
1424
useConfigMap: true
1525
```
1626
{% endraw %}
1727
18-
Note: if **useConfigMap** is enabled, sensitive values should be stored in separate secrets, then referenced in the config [using environment variables](https://cortexmetrics.io/docs/configuration/configuration-file/#use-environment-variables-in-the-configuration). Use *extraVolumes*, *extraVolumeMounts*, *extraEnvs*, and *extraArgs* to add environment variables from secrets.
28+
Note: if **useConfigMap** is enabled, sensitive values should be stored in separate secrets, then referenced in the config [using environment variables](https://cortexmetrics.io/docs/configuration/configuration-file/#use-environment-variables-in-the-configuration). Use `extraVolumes`, `extraVolumeMounts`, `extraEnvs`, and `extraArgs` to add environment variables from secrets.

docs/guides/memberlist.markdown renamed to docs/guides/configure_memberlist.markdown

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,19 @@
11
---
22
layout: page
3-
title: Memberlist
3+
title: Configure memberlist
44
parent: Guides
5-
has_children: true
5+
has_children: false
66
has_toc: false
7+
---
8+
# Configure memberlist
9+
{: .no_toc }
10+
11+
## Table of contents
12+
{: .no_toc .text-delta }
13+
14+
1. TOC
15+
{:toc}
16+
717
---
818
# Setup
919

docs/guides/configure_memcached.markdown

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,18 @@
22
layout: page
33
title: Configure memcached
44
parent: Guides
5-
has_children: true
5+
has_children: false
66
has_toc: false
7+
---
8+
# Configuring memcached as the caching store
9+
{: .no_toc }
10+
11+
## Table of contents
12+
{: .no_toc .text-delta }
13+
14+
1. TOC
15+
{:toc}
16+
717
---
818
# Configuring memcached as the caching store
919

docs/guides/configure_ruler_and_alertmanager_with_configmap.markdown

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
22
layout: page
3-
title: Configure Ruler and Alertmanager with Configmap
3+
title: Configure Ruler and Alertmanager with configmap
44
parent: Guides
55
has_children: false
66
has_toc: false
77
---
8-
# Configure Ruler and Alertmanager with Configmap
8+
# Configure Ruler and Alertmanager with configmap
99
{: .no_toc }
1010

1111
## Table of contents
@@ -35,8 +35,9 @@ To provide the Ruler with the *rules* to alert on, we must create a ConfigMap wi
3535
3636
**IMPORTANT** things to note:
3737
38-
- This ruleset is ONLY for tenantfoo (We will explicitly map it to tenantfoo later)
39-
- The section under `tenantfoo.yaml` is validated and interpreted exactly as a [Prometheus rules configuration](https://prometheus.io/docs/prometheus/latest/configuration/recording_rules/) would be. How you configure this is completely up to you.
38+
- This ruleset is ONLY for tenantfoo (We will explicitly map it to tenantfoo later).
39+
- The section under `tenantfoo.yaml` is validated and interpreted exactly as a [Prometheus alerting rules configuration](https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/) would be. How you configure this is completely up to you.
40+
- [Prometheus recording rules](https://prometheus.io/docs/prometheus/latest/configuration/recording_rules/) are also configured here in the same way as alerting rules.
4041

4142
```yaml
4243
kind: ConfigMap
@@ -66,7 +67,7 @@ To provide the Alertmanager with the information needed to *route* notifications
6667
**IMPORTANT** things to note:
6768

6869
- These routing rules are ONLY for tenantfoo. The Alertmanager takes the key under `data` (excluding `.yaml`) and uses it as the tenant name for that specific config.
69-
- The section under `tenantfoo.yaml` is validated and interpreted exactly as a [Prometheus alerting rules configuration](https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/) would be. How you configure this is completely up to you.
70+
- The section under `tenantfoo.yaml` is validated and interpreted exactly as a [Alertmanager configuration](hhttps://prometheus.io/docs/alerting/latest/configuration/#configuration-file) would be. How you configure this is completely up to you.
7071

7172
```yaml
7273
kind: ConfigMap
@@ -112,7 +113,7 @@ config:
112113
ruler_storage:
113114
backend: "local"
114115
local:
115-
# where your mounted configmap data will be persistently stored
116+
# where your mounted configmap data will be temporary stored
116117
directory: /data/rules
117118
118119
alertmanager:

0 commit comments

Comments
 (0)