Skip to content

Commit c8009cd

Browse files
committed
feat: improve docs
1 parent 312df77 commit c8009cd

File tree

3 files changed

+112
-26
lines changed

3 files changed

+112
-26
lines changed

charts/eol-exporter/Chart.yaml

Lines changed: 55 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,65 @@
11
apiVersion: v2
2-
name: eol-exporter
2+
name: eol-prometheus-exporter
33
description: |
4-
End of life exporter.
4+
End of life prometheus exporter.
5+
56
A Kubernetes's helm chart for a exporter that get information about end of life/support of products in order to be scrapped by Prometheus
67
7-
You must supply a valid configmap with a list of products with its versions. Check https://github.com/saritasa-nest/saritasa-devops-tools-eol-exporter/blob/main/config.yaml.example
8-
for example values.
9-
Each product must have a field `current` with valid version as defined in: https://endoflife.date/api/{product}.json
8+
You must supply a valid configmap with a list of products with its versions:
9+
10+
```yaml
11+
# Get available products from:
12+
# https://endoflife.date/api/all.json
13+
# and find available cycles in:
14+
# https://endoflife.date/api/{product}.json
15+
eks:
16+
current: '1.30'
17+
comment: EKS
18+
django:
19+
current: '5.1'
20+
comment: backend
21+
```
22+
23+
Check https://github.com/saritasa-nest/saritasa-devops-tools-eol-exporter/blob/main/config.yaml.example
24+
for more example values.
25+
26+
Each product must have a field `current` with valid version as defined in: https://endoflife.date/api/{product}.json.
27+
1028
A `comment` field is optional, and it will be added as a label in the metrics.
1129
1230
A Prometheus extra scrape config must be configured in order to be able to watch the metrics in Prometheus.
13-
The service name will be defined as: $CHART_NAME.$NAMESPACE:$PORT
14-
By default this is: eol-exporter.prometheus:8080
15-
An example extraScrapeConfigs is available in: https://github.com/saritasa-nest/saritasa-devops-tools-eol-exporter/blob/main/README.md#prometheus-server-config
31+
32+
The service name will be defined as: `$CHART_NAME.$NAMESPACE:$PORT`.
33+
By default this is: `eol-exporter.prometheus:8080`:
34+
35+
```yaml
36+
extraScrapeConfigs: |
37+
- job_name: prometheus-eol-exporter
38+
metrics_path: /metrics
39+
scrape_interval: 5m
40+
scrape_timeout: 30s
41+
static_configs:
42+
- targets:
43+
- eol-exporter.prometheus:8080
44+
```
45+
46+
Check https://github.com/saritasa-nest/saritasa-devops-tools-eol-exporter/blob/main/README.md#prometheus-server-config for more information
1647
1748
The exporter provides two metrics:
18-
- endoflife_expiration_timestamp_seconds: Information about end of life (EOL) of products. Metric value is the UNIX timestamp of the eolDate label
19-
- endoflife_expired: Information about end of life (EOL) of products. Boolean value of 1 for expired products.
49+
- `endoflife_expiration_timestamp_seconds`: Information about end of life (EOL) of products. Metric value is the UNIX timestamp of the eolDate label
50+
- `endoflife_expired`: Information about end of life (EOL) of products. Boolean value of 1 for expired products.
51+
52+
Sample query to get if EKS EOL is less than 30 days:
53+
54+
```sh
55+
(endoflife_expiration_timestamp_seconds{name="eks"} - time()) > ((60*60*24) * 10) and (endoflife_expiration_timestamp_seconds{name="eks"} - time()) <= ((60*60*24) * 30)
56+
```
57+
58+
Sample query to get if EKS EOL has already happened:
59+
60+
```sh
61+
endoflife_expired{name="eks"} == 1
62+
```
2063
2164
# Application charts are a collection of templates that can be packaged into versioned archives
2265
# to be deployed.
@@ -25,11 +68,11 @@ type: application
2568
# The chart version. This version number should be incremented each time you make changes
2669
# to the chart and its templates, including the app version.
2770
version: 0.1.0-dev-11
28-
appVersion: prod-843dabc
71+
appVersion: 0.1.0
2972

3073
dependencies:
3174
# https://artifacthub.io/packages/helm/stakater/application?modal=values&compare-to=5.1.0
3275
- name: application
3376
version: 5.1.0
3477
repository: https://stakater.github.io/stakater-charts/
35-
alias: eol-exporter
78+
alias: exporter

charts/eol-exporter/README.md

Lines changed: 56 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,73 @@
11

2-
# eol-exporter
2+
# eol-prometheus-exporter
33

4-
![Version: 0.1.0-dev-11](https://img.shields.io/badge/Version-0.1.0--dev--11-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: prod-843dabc](https://img.shields.io/badge/AppVersion-prod--843dabc-informational?style=flat-square)
4+
![Version: 0.1.0-dev-11](https://img.shields.io/badge/Version-0.1.0--dev--11-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.1.0](https://img.shields.io/badge/AppVersion-0.1.0-informational?style=flat-square)
5+
6+
End of life prometheus exporter.
57

6-
End of life exporter.
78
A Kubernetes's helm chart for a exporter that get information about end of life/support of products in order to be scrapped by Prometheus
89

9-
You must supply a valid configmap with a list of products with its versions. Check https://github.com/saritasa-nest/saritasa-devops-tools-eol-exporter/blob/main/config.yaml.example
10-
for example values.
11-
Each product must have a field `current` with valid version as defined in: https://endoflife.date/api/{product}.json
10+
You must supply a valid configmap with a list of products with its versions:
11+
12+
```yaml
13+
# Get available products from:
14+
# https://endoflife.date/api/all.json
15+
# and find available cycles in:
16+
# https://endoflife.date/api/{product}.json
17+
eks:
18+
current: '1.30'
19+
comment: EKS
20+
django:
21+
current: '5.1'
22+
comment: backend
23+
```
24+
25+
Check https://github.com/saritasa-nest/saritasa-devops-tools-eol-exporter/blob/main/config.yaml.example
26+
for more example values.
27+
28+
Each product must have a field `current` with valid version as defined in: https://endoflife.date/api/{product}.json.
29+
1230
A `comment` field is optional, and it will be added as a label in the metrics.
1331

1432
A Prometheus extra scrape config must be configured in order to be able to watch the metrics in Prometheus.
15-
The service name will be defined as: $CHART_NAME.$NAMESPACE:$PORT
16-
By default this is: eol-exporter.prometheus:8080
17-
An example extraScrapeConfigs is available in: https://github.com/saritasa-nest/saritasa-devops-tools-eol-exporter/blob/main/README.md#prometheus-server-config
33+
34+
The service name will be defined as: `$CHART_NAME.$NAMESPACE:$PORT`.
35+
By default this is: `eol-exporter.prometheus:8080`:
36+
37+
```yaml
38+
extraScrapeConfigs: |
39+
- job_name: prometheus-eol-exporter
40+
metrics_path: /metrics
41+
scrape_interval: 5m
42+
scrape_timeout: 30s
43+
static_configs:
44+
- targets:
45+
- eol-exporter.prometheus:8080
46+
```
47+
48+
Check https://github.com/saritasa-nest/saritasa-devops-tools-eol-exporter/blob/main/README.md#prometheus-server-config for more information
1849

1950
The exporter provides two metrics:
20-
- endoflife_expiration_timestamp_seconds: Information about end of life (EOL) of products. Metric value is the UNIX timestamp of the eolDate label
21-
- endoflife_expired: Information about end of life (EOL) of products. Boolean value of 1 for expired products.
51+
- `endoflife_expiration_timestamp_seconds`: Information about end of life (EOL) of products. Metric value is the UNIX timestamp of the eolDate label
52+
- `endoflife_expired`: Information about end of life (EOL) of products. Boolean value of 1 for expired products.
53+
54+
Sample query to get if EKS EOL is less than 30 days:
55+
56+
```sh
57+
(endoflife_expiration_timestamp_seconds{name="eks"} - time()) > ((60*60*24) * 10) and (endoflife_expiration_timestamp_seconds{name="eks"} - time()) <= ((60*60*24) * 30)
58+
```
59+
60+
Sample query to get if EKS EOL has already happened:
61+
62+
```sh
63+
endoflife_expired{name="eks"} == 1
64+
```
2265

2366
## Requirements
2467

2568
| Repository | Name | Version |
2669
|------------|------|---------|
27-
| https://stakater.github.io/stakater-charts/ | eol-exporter(application) | 5.1.0 |
70+
| https://stakater.github.io/stakater-charts/ | exporter(application) | 5.1.0 |
2871

2972
## Values
3073

@@ -55,7 +98,7 @@ The exporter provides two metrics:
5598
| eol-exporter.deployment.image.digest | string | `""` | |
5699
| eol-exporter.deployment.image.pullPolicy | string | `"IfNotPresent"` | |
57100
| eol-exporter.deployment.image.repository | string | `"saritasallc/eol-exporter"` | |
58-
| eol-exporter.deployment.image.tag | string | `"prod-843dabc"` | |
101+
| eol-exporter.deployment.image.tag | string | `"0.1.0"` | |
59102
| eol-exporter.deployment.initContainers | list | `[]` | |
60103
| eol-exporter.deployment.livenessProbe.enabled | bool | `true` | |
61104
| eol-exporter.deployment.livenessProbe.exec | object | `{}` | |

charts/eol-exporter/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ eol-exporter:
1414
# Public image is available on:
1515
# https://hub.docker.com/r/saritasallc/eol-exporter/tags
1616
repository: saritasallc/eol-exporter
17-
tag: prod-843dabc
17+
tag: 0.1.0
1818
digest: '' # if set to a non empty value, digest takes precedence on the tag
1919
pullPolicy: IfNotPresent
2020
initContainers: []

0 commit comments

Comments
 (0)