Compare commits

...

572 Commits

Author SHA1 Message Date
renovate[bot]
2f5661a529
chore(deps): lock file maintenance (#574)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-01 13:19:08 +02:00
renovate[bot]
f79e7a1248 chore(deps): update devdeps non-major 2024-05-27 04:07:03 +02:00
renovate[bot]
2fd71a96c7 chore(docker): update python:3.12-alpine docker digest to 5365725 2024-05-23 05:48:10 +02:00
renovate[bot]
62c6d6fdb7
chore(deps): lock file maintenance (#569)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-17 09:37:10 +02:00
renovate[bot]
ac3ff2d9df
chore(deps): update quay.io/thegeeklab/hugo docker tag to v0.125.7 (#570)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-14 15:06:38 +02:00
renovate[bot]
7cdc20a555 chore(deps): update dependency ruff to v0.4.4 2024-05-13 03:28:40 +02:00
renovate[bot]
8e71ce23e5
chore(deps): lock file maintenance (#567)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-07 12:14:52 +02:00
renovate[bot]
0577f10fad chore(deps): update dependency ruff to v0.4.3 2024-05-06 05:12:35 +02:00
renovate[bot]
d023f7e9e9
fix(deps): update dependency jsonschema to v4.22.0 (#565)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-02 10:10:10 +02:00
renovate[bot]
762547a0da
chore(deps): update devdeps non-major (#564)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Robert Kaussow <mail@thegeeklab.de>
2024-04-29 10:47:35 +02:00
renovate[bot]
8d9d59351e
chore(deps): lock file maintenance (#562)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-29 10:27:48 +02:00
renovate[bot]
8239461432 chore(deps): update dependency ruff to v0.4.1 2024-04-22 05:09:40 +00:00
renovate[bot]
ff3f401786 chore(deps): update dependency ruff to v0.3.7 2024-04-15 03:40:04 +00:00
renovate[bot]
04ce915e07
chore(deps): lock file maintenance (#551)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-12 09:17:38 +02:00
renovate[bot]
791c2482c0 chore(docker): update python:3.12-alpine docker digest to ef09762 2024-04-11 05:09:23 +00:00
renovate[bot]
2c7c767830 chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.45.0 2024-04-08 06:34:30 +00:00
renovate[bot]
b7ec5ba60e chore(deps): update dependency ruff to v0.3.5 2024-04-08 03:23:21 +00:00
renovate[bot]
658b9b2502 chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.44.3 2024-04-01 03:18:57 +00:00
renovate[bot]
9bcc45932f
chore(deps): update quay.io/thegeeklab/wp-docker-buildx docker tag to v4 (#556)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-27 08:55:31 +01:00
renovate[bot]
d504297a08 chore(docker): update python:3.12-alpine docker digest to c7eb5c9 2024-03-26 08:03:20 +00:00
renovate[bot]
e541271ffd
chore(deps): update dependency pytest-cov to v5 (#553)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-25 08:34:16 +01:00
renovate[bot]
9d26517a6b chore(deps): update devdeps non-major 2024-03-25 03:06:53 +00:00
renovate[bot]
ff21ee3db6
chore(deps): update quay.io/thegeeklab/hugo docker tag to v0.124.1 (#552)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-21 08:48:17 +01:00
renovate[bot]
e76f37f143 chore(deps): update dependency ruff to v0.3.3 2024-03-18 04:06:51 +00:00
renovate[bot]
cc158dddf6 chore(docker): update python:3.12-alpine docker digest to 25a82f6 2024-03-17 03:01:47 +00:00
0590089098
ci: fix deprecated ruff command 2024-03-12 20:52:57 +01:00
renovate[bot]
d5cdd92242
chore(deps): lock file maintenance (#548)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-11 09:39:57 +01:00
renovate[bot]
e082d6c7cb chore(deps): update devdeps non-major 2024-03-11 07:17:03 +00:00
renovate[bot]
7966c1c11e chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.44.2 2024-03-11 03:16:51 +00:00
renovate[bot]
a2f513156a
chore(deps): update dependency ruff to v0.3.1 (#543)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Robert Kaussow <mail@thegeeklab.de>
2024-03-07 11:50:43 +01:00
renovate[bot]
a2485d83eb
fix(deps): update dependency environs to v11 (#545)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-07 11:01:13 +01:00
renovate[bot]
4b3249b9a3
chore(deps): lock file maintenance (#544)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-07 11:01:05 +01:00
renovate[bot]
3f7d44a7d2
chore(deps): lock file maintenance (#541)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-26 10:43:30 +01:00
renovate[bot]
db8b62c323 chore(deps): update dependency pytest to v8.0.2 2024-02-26 04:12:25 +00:00
renovate[bot]
bc05b2ad38 chore(deps): update devdeps non-major 2024-02-19 04:40:06 +00:00
renovate[bot]
c324ab330f
fix(deps): update dependency prometheus-client to v0.20.0 (#539)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-15 12:29:41 +01:00
fa06bcbdf1
[skip ci] revert renovate automerge config 2024-02-15 12:23:11 +01:00
renovate[bot]
7b72b07157
chore(deps): update quay.io/thegeeklab/hugo docker tag to v0.122.0 (#538)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-11 16:53:26 +01:00
ad9ffeab64
enable renovate on automerge branches 2024-02-09 23:08:34 +01:00
renovate[bot]
14788622c7 chore(docker): update python:3.12-alpine docker digest to 1a05012 2024-02-09 06:12:15 +00:00
renovate[bot]
aed5373c06
fix(deps): update dependency ruamel.yaml to v0.18.6 (#536)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-07 09:48:25 +01:00
7e7bd413a8
chore: bump ruff to v0.2.1 (#535) 2024-02-06 09:34:49 +01:00
renovate[bot]
028d733d87
chore(deps): update dependency pytest to v8 (#533)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-31 09:05:21 +01:00
renovate[bot]
e5c599472b chore(docker): update python:3.12-alpine docker digest to 14cfc61 2024-01-29 07:29:53 +00:00
1c3e4fc7e7
fix: split tag string at semicolon instead of comma (#532) 2024-01-24 12:50:39 +01:00
renovate[bot]
aa3a82ae08
chore(deps): update quay.io/thegeeklab/wp-docker-buildx docker tag to v3 (#531)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-22 11:37:44 +01:00
renovate[bot]
395623b08b chore(deps): update dependency ruff to v0.1.14 2024-01-22 03:33:26 +00:00
renovate[bot]
76ec43e1f8
fix(deps): update dependency jsonschema to v4.21.1 (#529)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-20 15:12:57 +01:00
renovate[bot]
d470109ddc chore(docker): update python:3.12-alpine docker digest to 801b54e 2024-01-19 22:30:16 +00:00
renovate[bot]
cae9a4d815 chore(docker): update python:3.12-alpine docker digest to 4a156f7 2024-01-19 06:55:54 +00:00
renovate[bot]
9b1a450b48
fix(deps): update dependency jsonschema to v4.21.0 (#526)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-18 10:22:01 +01:00
renovate[bot]
5cb73241f9 chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.44.1 2024-01-16 02:08:03 +00:00
renovate[bot]
f39aea6c82
fix(deps): update dependency anyconfig to v0.14.0 (#523)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-15 21:55:43 +01:00
renovate[bot]
793ec14b80
chore(deps): update dependency ruff to v0.1.13 (#524)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Robert Kaussow <mail@thegeeklab.de>
2024-01-15 20:39:42 +01:00
renovate[bot]
55378ceea6
fix(deps): update dependency environs to v10.3.0 (#522)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-12 08:30:11 +01:00
renovate[bot]
f3f9dac6fe
fix(deps): update dependency environs to v10.2.0 (#521)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-10 08:38:42 +01:00
renovate[bot]
f2b770d1f8
fix(deps): update dependency environs to v10.1.0 (#520)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-09 15:03:27 +01:00
renovate[bot]
63ee9caf5d chore(deps): update dependency ruff to v0.1.11 2024-01-08 04:30:37 +00:00
renovate[bot]
ebf54473bd
chore(deps): update quay.io/thegeeklab/hugo docker tag to v0.121.2 (#518)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-07 20:41:44 +01:00
renovate[bot]
8d7a30a0b1
chore(deps): lock file maintenance (#511)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-01 18:21:10 +01:00
renovate[bot]
1e3d5a0b18 chore(deps): update dependency pytest to v7.4.4 2024-01-01 11:15:32 +00:00
renovate[bot]
e356f64bfd
fix(deps): update dependency environs to v10 (#512)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-27 11:10:46 +01:00
renovate[bot]
5c0c893915 chore(deps): update dependency ruff to v0.1.9 2023-12-25 03:11:13 +00:00
88eac83007
disable renovate for python test matrix in ci 2023-12-24 00:03:59 +01:00
3de899b6cd
use list style synatx and cleanup (#514) 2023-12-23 23:26:57 +01:00
renovate[bot]
b603af1380 chore(deps): update dependency ruff to v0.1.8 2023-12-18 04:48:01 +00:00
8c2b3ad968
cleanup unused env vars in ci 2023-12-17 14:08:03 +01:00
renovate[bot]
a76a6f40e3 chore(deps): update dependency ruff to v0.1.7 2023-12-11 03:32:56 +00:00
renovate[bot]
1dc51232cc chore(docker): update python:3.12-alpine docker digest to c793b92 2023-12-09 09:06:53 +00:00
b6fd9ccf83
ci: exclude dockerhub from linkcheck due to rate limiting 2023-12-07 09:08:30 +01:00
renovate[bot]
3d85f78054
chore(deps): update quay.io/thegeeklab/wp-docker-buildx docker tag to v2 (#508)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-07 08:39:48 +01:00
renovate[bot]
12e70d508d chore(docker): update python:3.12-alpine docker digest to 09f18c1 2023-12-04 21:15:51 +00:00
renovate[bot]
e244d4ddaf
chore(deps): lock file maintenance (#506)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-04 21:19:29 +01:00
518f8d428b
fix settings for required status checks 2023-12-04 21:01:54 +01:00
renovate[bot]
4811621be5
fix(deps): update dependency prometheus-client to v0.19.0 (#505)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-21 08:44:25 +01:00
renovate[bot]
9d1ab01643
chore(deps): lock file maintenance (#500)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-20 09:02:04 +01:00
renovate[bot]
ba3456b53a
fix(deps): update dependency jsonschema to v4.20.0 (#503)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-20 09:01:21 +01:00
renovate[bot]
ce708b94cb chore(deps): update dependency ruff to v0.1.6 2023-11-20 03:38:17 +00:00
renovate[bot]
2088efbe23 chore(deps): update dependency ruff to v0.1.5 2023-11-13 04:38:37 +00:00
f13de60e06
chore: drop yapf and favor of the ruff formatter (#501) 2023-11-10 14:50:58 +01:00
renovate[bot]
fd85dc598b chore(deps): update dependency ruff to v0.1.4 2023-11-06 03:03:08 +00:00
0756afda02
ci: cleanup matrix build name (#498) 2023-11-04 16:24:31 +01:00
renovate[bot]
2a3468b604
fix(deps): update dependency ruamel.yaml to v0.18.5 (#497)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-04 16:03:19 +01:00
renovate[bot]
2baaf1e07b
chore(deps): lock file maintenance (#490)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-31 20:56:36 +01:00
renovate[bot]
334caabe1f
fix(deps): update dependency ruamel.yaml to v0.18.3 (#491)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-31 20:56:28 +01:00
renovate[bot]
a1643b3a9f
fix(deps): update dependency jsonschema to v4.19.2 (#495)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-31 20:43:07 +01:00
renovate[bot]
bb23593f5c
fix(deps): update dependency prometheus-client to v0.18.0 (#496)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-31 20:07:47 +01:00
renovate[bot]
42e0a5f726 chore(deps): update devdeps non-major 2023-10-30 04:45:54 +00:00
renovate[bot]
b0cc925b55 chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.44.0 2023-10-29 12:17:46 +00:00
renovate[bot]
5bc82508c8 chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.43.0 2023-10-27 15:50:49 +00:00
renovate[bot]
c84035a405 chore(deps): update devdeps non-major 2023-10-23 03:22:42 +00:00
renovate[bot]
da28d6dd9c chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.42.0 2023-10-21 18:07:45 +00:00
renovate[bot]
1694771542
fix(deps): update dependency ruamel.yaml to v0.17.40 (#487)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-21 15:33:48 +02:00
renovate[bot]
de9aac38ca chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.41.3 2023-10-20 13:06:55 +00:00
renovate[bot]
72d0e49028
fix(deps): update dependency ruamel.yaml to v0.17.39 (#484)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-20 08:59:43 +02:00
renovate[bot]
a5755e03af
chore(docker): update python:3.12-alpine docker digest to a5d1738 (#483)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-19 22:43:23 +02:00
renovate[bot]
79c3e8683b
chore(deps): lock file maintenance (#485)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-19 22:32:15 +02:00
628244f9ad
ci: fix changelog generation 2023-10-18 13:59:28 +02:00
8f6c394a21
chore: replace linkcheck by lychee (#482)
* chore: replace linkcheck by lychee

* fix step order in docs workflow
2023-10-16 21:34:42 +02:00
e98439b9ff
chore: replace git-chglog by git-sv (#481) 2023-10-16 15:42:36 +02:00
renovate[bot]
1d9a82d774
chore(deps): lock file maintenance (#478)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-16 14:28:38 +02:00
40bfa21f72
feat: add support for python 3.12 (#480)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-16 14:15:57 +02:00
cb5fa8409e
fix: remove deprecated distutils (#479) 2023-10-16 12:11:22 +02:00
renovate[bot]
ab9d0de2f5 chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.41.2 2023-10-11 01:16:35 +00:00
renovate[bot]
f957869179
fix(deps): update dependency ruamel.yaml to v0.17.35 (#474)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-09 14:40:13 +02:00
renovate[bot]
ef86a0000e
chore(deps): lock file maintenance (#476)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-09 14:39:56 +02:00
renovate[bot]
958c89f2f9 chore(deps): update dependency ruff to v0.0.292 2023-10-09 04:32:39 +00:00
renovate[bot]
8e690232e3 chore(docker): update python:3.11-alpine docker digest to 3e73c0b 2023-10-03 16:58:39 +00:00
bdd940131d
ci: run git unshallow conditionally (#470) 2023-10-02 14:13:46 +02:00
renovate[bot]
bc7b5ebf47
chore(deps): lock file maintenance (#469)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-02 11:46:11 +02:00
renovate[bot]
a370bd26fd
fix(deps): update dependency ruamel.yaml to v0.17.33 (#467)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-02 11:14:21 +02:00
renovate[bot]
4bdfcc3256 chore(docker): update python:3.11-alpine docker digest to cd311c6 2023-09-29 19:40:16 +00:00
renovate[bot]
ae62da0ec2
chore(deps): lock file maintenance (#466)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-27 13:47:41 +02:00
renovate[bot]
3b4707e06c
fix(deps): update dependency jsonschema to v4.19.1 (#464)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-27 13:47:32 +02:00
4c35cc706c
ci: use secret for s3 endpoint 2023-09-26 21:40:33 +02:00
e5f3947e7c
docs: drop codecov badge 2023-09-25 09:27:03 +02:00
renovate[bot]
7096aefb74 chore(deps): update devdeps non-major 2023-09-25 04:28:23 +00:00
renovate[bot]
3dc7405378
chore(deps): lock file maintenance (#456)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-19 09:01:13 +02:00
35bfa8bc6a
feat: add option to authenticate with api token instead of password (#460)
Co-authored-by: Bruno MATEU <pro+github@brunomat.eu>
Co-authored-by: Bruno MATEU <mateubruno@gmail.com>
2023-09-19 09:00:30 +02:00
renovate[bot]
a6d128d605 chore(deps): update dependency ruff to v0.0.290 2023-09-18 03:55:26 +00:00
renovate[bot]
d7bc938ecb chore(deps): update dependency pytest to v7.4.2 2023-09-11 04:59:21 +00:00
3eaf162858
ci: use full clone for test workflow to fix version detection (#461) 2023-09-05 12:02:09 +02:00
renovate[bot]
5e7a371725 chore(deps): update devdeps non-major 2023-09-04 04:30:29 +00:00
renovate[bot]
dcfdcb6272 chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.41.1 2023-09-04 00:39:44 +00:00
renovate[bot]
74a5a67112 chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.41.0 2023-09-01 01:47:27 +00:00
renovate[bot]
62d41df763 chore(deps): update dependency ruff to v0.0.286 2023-08-28 04:28:58 +00:00
renovate[bot]
b88a9e0c55 chore(docker): update python:3.11-alpine docker digest to 5d769f9 2023-08-26 10:12:33 +00:00
99f426263b
fix: use poetry-dynamic-versioning backend wrapper 2023-08-25 00:28:41 +02:00
8be6b5b824
add back pytest to ci 2023-08-24 23:51:54 +02:00
c7faac94e4
cleanup missed drone ci refs 2023-08-24 22:43:29 +02:00
renovate[bot]
c8c1ba033d
chore(deps): lock file maintenance (#451)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-24 22:28:44 +02:00
renovate[bot]
37440e080c
chore(deps): update dependency ruff to v0.0.285 (#452)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Robert Kaussow <mail@thegeeklab.de>
2023-08-24 22:27:14 +02:00
202d19d8df
ci: migrate to woodpecker (#453) 2023-08-24 22:14:30 +02:00
renovate[bot]
7090981489 chore(deps): update dependency ruff to v0.0.284 2023-08-14 04:06:17 +00:00
renovate[bot]
c55705d438 chore(docker): update python:3.11-alpine docker digest to 603975e 2023-08-09 16:54:37 +00:00
renovate[bot]
6608cc6a8a
fix(deps): update dependency jsonschema to v4.19.0 (#447)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-09 07:34:37 +02:00
renovate[bot]
d3c07449c1
chore(deps): lock file maintenance (#446)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-09 07:33:39 +02:00
renovate[bot]
37f09b0ded chore(docker): update python:3.11-alpine docker digest to bd16cc5 2023-08-08 10:14:34 +00:00
renovate[bot]
ad39a58124 chore(deps): update dependency ruff to v0.0.282 2023-08-07 03:24:34 +00:00
renovate[bot]
f802637149
fix(deps): update dependency jsonschema to v4.18.6 (#444)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-05 15:50:12 +02:00
renovate[bot]
91b3b5143b
fix(deps): update dependency jsonschema to v4.18.5 (#443)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-02 22:00:22 +02:00
renovate[bot]
40ae246fc8
chore(deps): lock file maintenance (#440)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-02 10:48:16 +02:00
renovate[bot]
5e7e58cbd2 chore(deps): update dependency ruff to v0.0.280 2023-07-24 04:23:10 +00:00
renovate[bot]
a38285a2c5
fix(deps): update dependency jsonschema to v4.18.4 (#433)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-23 13:06:17 +02:00
c6b1734ad1
chore: drop support for python 3.7 (#441)
BREAKING CHANGE: The support for Python 3.7 was removed.
2023-07-23 12:42:41 +02:00
renovate[bot]
8b99e80fce chore(deps): update dependency ruff to v0.0.278 2023-07-17 03:34:47 +00:00
renovate[bot]
4f01e9fdb5 chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.40.1 2023-07-12 10:20:53 +00:00
renovate[bot]
e8c72c63fc chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.40.0 2023-07-11 22:09:25 +00:00
renovate[bot]
f2a87114c6
chore(deps): lock file maintenance (#426)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-11 21:28:25 +02:00
renovate[bot]
f29ac553ae
fix(deps): update dependency prometheus-client to v0.17.1 (#435)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-11 21:28:17 +02:00
2d415caca6
ci: bump hugo to v0.115.2 (#436) 2023-07-11 21:28:06 +02:00
renovate[bot]
0700c91f00 chore(deps): update dependency ruff to v0.0.277 2023-07-10 04:52:45 +00:00
renovate[bot]
9eb888fac8 chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.39.7 2023-07-03 14:14:53 +00:00
renovate[bot]
31c0e1b166 chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.39.6 2023-06-28 21:23:39 +00:00
renovate[bot]
63da0a31c4
chore(deps): update devdeps non-major (#430)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Robert Kaussow <mail@thegeeklab.de>
2023-06-28 09:54:46 +02:00
renovate[bot]
bb1370f57c chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.39.5 2023-06-23 12:01:44 +00:00
372911d63c
ci: bump hugo to v0.114.0 (#429) 2023-06-23 11:13:57 +02:00
a8b4ae4827
docs: replace socialmedia image (#427) 2023-06-20 14:30:41 +02:00
renovate[bot]
b3717c2b79 chore(deps): update devdeps non-major 2023-06-19 04:44:12 +00:00
renovate[bot]
3c86756779
chore(deps): lock file maintenance (#418)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-17 15:23:14 +02:00
renovate[bot]
3e346c21ad
fix(deps): update dependency ruamel.yaml to v0.17.32 (#417)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-17 15:23:06 +02:00
renovate[bot]
94597d9a84 chore(docker): update python:3.11-alpine docker digest to 25df32b 2023-06-15 16:11:41 +00:00
renovate[bot]
d70ff324a7 chore(deps): update devdeps non-major 2023-06-12 04:14:14 +00:00
renovate[bot]
044ed59b05 chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.39.4 2023-06-09 09:21:45 +00:00
renovate[bot]
a8af0597bd chore(docker): update python:3.11-alpine docker digest to 995c7fc 2023-06-08 05:20:04 +00:00
renovate[bot]
ae0e8fa87f chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.39.3 2023-06-05 14:57:20 +00:00
renovate[bot]
3838826442 chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.39.2 2023-05-29 12:20:11 +00:00
renovate[bot]
46ae2c79e0
fix(deps): update dependency prometheus-client to v0.17.0 (#412)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-29 12:27:18 +02:00
renovate[bot]
8915a480c1
fix(deps): update dependency ruamel.yaml to v0.17.28 (#413)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-29 12:08:55 +02:00
renovate[bot]
b00845735f
chore(deps): lock file maintenance (#415)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-29 11:40:35 +02:00
renovate[bot]
5e9a3b2426
fix(deps): update dependency requests to v2.31.0 [security] (#411)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-29 11:38:21 +02:00
renovate[bot]
6e118aa4f9
chore(deps): update devdeps non-major (#408) 2023-05-28 23:07:37 +02:00
renovate[bot]
553220aed0
chore(deps): lock file maintenance (#409)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-28 15:30:50 +02:00
111f856cea
chore: remove poetry experimental.new-installer flag (#414) 2023-05-28 15:19:10 +02:00
etfeet
8dad3ae9dd
feat: add node hostname info to discovery info logging (#388)
Co-authored-by: Robert Kaussow <xoxys@rknet.org>
2023-05-14 19:55:03 +02:00
renovate[bot]
edf8082b31
chore(deps): lock file maintenance (#382)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-14 18:54:06 +02:00
renovate[bot]
b0079e33f5
fix(deps): update dependency requests to v2.30.0 (#404)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-14 18:53:48 +02:00
renovate[bot]
546c10020c
fix(deps): update dependency ruamel.yaml to v0.17.26 (#399)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-13 11:11:48 +02:00
renovate[bot]
46ff967f22 chore(docker): update python:3.11-alpine docker digest to 4e8e9a5 2023-05-12 22:18:07 +00:00
renovate[bot]
c11a7b4bb4 chore(docker): update python:3.11-alpine docker digest to 2f2dadb 2023-05-12 10:50:26 +00:00
renovate[bot]
ed58d04879 chore(deps): update dependency ruff to v0.0.265 2023-05-08 06:04:05 +00:00
renovate[bot]
742307e27e chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.39.1 2023-05-04 13:03:34 +00:00
renovate[bot]
83e67d5b6f chore(docker): update python:3.11-alpine docker digest to 7210235 2023-05-03 22:26:46 +00:00
renovate[bot]
ea48be1db2 chore(docker): update python:3.11-alpine docker digest to 06a3f7b 2023-05-03 14:47:18 +00:00
f0959a0dc0
fix bare url in contribution file (#401) 2023-05-03 09:35:01 +02:00
renovate[bot]
5d2d924197 chore(deps): update dependency ruff to v0.0.263 2023-05-01 05:52:28 +00:00
renovate[bot]
3926d55b62
fix(deps): update dependency requests to v2.29.0 (#397)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-27 08:46:52 +02:00
renovate[bot]
6a3b3f5df8 chore(deps): update devdeps non-major 2023-04-24 05:05:29 +00:00
renovate[bot]
f4e7d0dfd1 chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.39.0 2023-04-20 03:50:10 +00:00
renovate[bot]
f2f0abdf47 chore(deps): update dependency pytest to v7.3.1 2023-04-17 14:38:12 +00:00
006360cc2c
ci: switch to new codecov uploader (#393) 2023-04-17 16:09:48 +02:00
renovate[bot]
e58de90d69 chore(deps): update devdeps non-major 2023-04-10 05:43:08 +00:00
renovate[bot]
37751a173a chore(docker): update python:3.11-alpine docker digest to 507818d 2023-04-08 00:53:05 +00:00
renovate[bot]
d46ff8b1c1 chore(docker): update python:3.11-alpine docker digest to 5405826 2023-04-06 07:59:15 +00:00
renovate[bot]
01f3fceae8 chore(docker): update python:3.11-alpine docker digest to 4b4078a 2023-03-30 07:00:22 +00:00
renovate[bot]
d2f804af98 chore(docker): update python:3.11-alpine docker digest to e8cd6ca 2023-03-30 04:48:39 +00:00
renovate[bot]
4ecfc8e06c chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.38.1 2023-03-27 21:38:39 +00:00
renovate[bot]
0fe543624f chore(docker): update python:3.11-alpine docker digest to 8af856d 2023-03-27 04:01:25 +00:00
renovate[bot]
7610ab8814 chore(deps): update dependency ruff to v0.0.259 2023-03-27 02:35:18 +00:00
renovate[bot]
562498a420 chore(docker): update python:3.11-alpine docker digest to 506eed4 2023-03-23 19:52:13 +00:00
renovate[bot]
44129fa1d3
fix(deps): update dependency python-json-logger to v2.0.7 (#377) 2023-03-20 11:17:17 +01:00
renovate[bot]
04dc8b7cc6
chore(deps): lock file maintenance (#368) 2023-03-20 10:36:38 +01:00
renovate[bot]
a7cfd6d520
chore(deps): update dependency ruff to v0.0.257 (#378) 2023-03-20 10:34:12 +01:00
renovate[bot]
97166b27de chore(docker): update python:3.11-alpine docker digest to 741e650 2023-03-14 13:32:48 +00:00
49c02d50e1
chore: exclude ruff linter rule UP038 (#375) 2023-03-07 14:21:51 +01:00
renovate[bot]
f4a94a7bd5 chore(deps): update devdependencies (non-major) 2023-03-06 06:00:40 +00:00
renovate[bot]
8522c960cd chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.38.0 2023-03-04 23:57:12 +00:00
renovate[bot]
f9be89e9c2 chore(deps): update dependency ruff to v0.0.252 2023-02-27 06:04:41 +00:00
renovate[bot]
39f22a3b11 chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.37.5 2023-02-27 02:51:35 +00:00
renovate[bot]
eff27d075b chore(docker): update python:3.11-alpine docker digest to 1a5c146 2023-02-25 15:31:47 +00:00
renovate[bot]
4c15718b7e
chore(deps): update dependency ruff to v0.0.247 (#367) 2023-02-20 10:49:59 +01:00
renovate[bot]
d1edfddfae chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.37.4 2023-02-17 13:52:59 +00:00
renovate[bot]
3b2aba6636 chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.37.3 2023-02-16 14:27:00 +00:00
a3fa0ef215
refctor: migrate flake8 to ruff python linter (#363) 2023-02-12 15:11:15 +01:00
renovate[bot]
d896f7d22d chore(docker): update python:3.11-alpine docker digest to 8463061 2023-02-11 16:11:43 +00:00
f76d25e3d0
ci: bump container build plugin to drone-docker-buildx:23 (#361) 2023-02-09 19:41:57 +01:00
renovate[bot]
258e186311 chore(docker): update python:3.11-alpine docker digest to deb0f63 2023-02-09 09:07:41 +00:00
fc530c9f61
fix drone-matrix template (#359) 2023-02-08 21:59:49 +01:00
renovate[bot]
d64945a83f
chore(deps): lock file maintenance (#352) 2023-02-08 10:03:25 +01:00
renovate[bot]
c48f71c99f chore(docker): update python:3.11-alpine docker digest to d8b0703 2023-02-04 12:29:38 +00:00
renovate[bot]
58440d6d59
fix(deps): update dependency prometheus-client to v0.16.0 (#356) 2023-02-02 09:08:27 +01:00
renovate[bot]
caf3e3826d chore(deps): update dependency flake8-docstrings to v1.7.0 2023-01-30 05:43:16 +00:00
renovate[bot]
d106aafb4f chore(docker): update python:3.11-alpine docker digest to ca1298a 2023-01-24 10:57:21 +00:00
renovate[bot]
60f67a82fb chore(deps): update dependency pydocstyle to v6.3.0 2023-01-23 05:12:49 +00:00
renovate[bot]
17486e82ee chore(docker): update python:3.11-alpine docker digest to 625383c 2023-01-18 16:35:50 +00:00
renovate[bot]
f0134ead55
fix(deps): update dependency requests to v2.28.2 (#349) 2023-01-16 09:33:39 +01:00
cb0bdb1166
refactor: use buildx for multiarch container builds (#350) 2023-01-16 09:10:43 +01:00
renovate[bot]
bf9ed4a050 chore(deps): update devdependencies (non-major) 2023-01-16 06:40:43 +00:00
renovate[bot]
4f217f0ef7 chore(docker): update docker digests 2023-01-10 11:20:52 +00:00
renovate[bot]
3fcae28ac9
chore(deps): lock file maintenance (#345) 2023-01-09 21:17:46 +01:00
renovate[bot]
17c4173748 chore(docker): update docker digests 2023-01-08 17:53:01 +00:00
250e4f0bf3
chore: remove support for arm32 (#347)
BREAKING CHANGE: We dropped the arm32 platform support and builds.
2023-01-08 16:12:34 +01:00
renovate[bot]
c4a28ac4b1
chore(deps): update dependency flake8-isort to v6 (#343) 2023-01-03 14:15:25 +01:00
renovate[bot]
effe4f1c13 chore(deps): update devdependencies (non-major) 2022-12-26 04:27:42 +00:00
renovate[bot]
01add1d430 chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.37.1 2022-12-21 20:43:59 +00:00
renovate[bot]
29c87bfa11
chore(deps): lock file maintenance (#340) 2022-12-20 20:41:53 +01:00
renovate[bot]
25c5585f4b
fix(deps): update dependency proxmoxer to v2.0.1 (#341) 2022-12-20 20:40:10 +01:00
renovate[bot]
c107ee51ec chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.37.0 2022-12-12 01:10:37 +00:00
renovate[bot]
b9b984a2cb
chore(deps): lock file maintenance (#324) 2022-12-09 22:55:54 +01:00
renovate[bot]
7628cf9806
chore(docker): update docker digests (#338) 2022-12-09 22:55:42 +01:00
renovate[bot]
148c085271
fix(deps): update dependency proxmoxer to v2 (#335) 2022-12-04 19:05:57 +01:00
renovate[bot]
75ef2258b1
fix(deps): update dependency jsonschema to v4.17.3 (#336) 2022-12-04 18:21:02 +01:00
renovate[bot]
297eb78784 chore(docker): update docker digests 2022-11-30 06:41:06 +00:00
renovate[bot]
18a4a19379 chore(deps): update dependency flake8-logging-format to v0.9.0 2022-11-28 05:08:46 +00:00
763dd31053
ci: use python311 base image on ci (#333) 2022-11-24 21:35:49 +01:00
renovate[bot]
b8a97de4f9
fix(deps): update dependency jsonschema to v4.17.1 (#331) 2022-11-24 10:46:15 +01:00
renovate[bot]
503fe1452e chore(deps): update dependency flake8-isort to v5.0.3 2022-11-21 05:22:20 +00:00
renovate[bot]
834a6c13b2 chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.36.1 2022-11-16 23:49:31 +00:00
renovate[bot]
65229ed8ca chore(docker): update docker digests 2022-11-16 17:35:29 +00:00
renovate[bot]
f28be49225 chore(docker): update docker digests 2022-11-12 14:28:19 +00:00
renovate[bot]
ca3dd6b390 chore(docker): update docker digests 2022-11-11 17:06:06 +00:00
renovate[bot]
1e9b2956e3 chore(docker): update docker digests 2022-11-11 06:51:40 +00:00
renovate[bot]
38874076d5 chore(deps): update dependency flake8-builtins to v2.0.1 2022-11-07 05:01:57 +00:00
3432149a5d
chore: bump hugo to v0.105.0 (#322) 2022-11-05 09:20:03 +01:00
c682b9aa4b
ci: refactor broken link check (#321) 2022-11-04 12:58:14 +01:00
renovate[bot]
9b607f7f84 chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.36.0 2022-11-03 17:35:48 +00:00
1f964c5f5c
ci: add test step for python 11 (#319) 2022-11-02 13:01:49 +01:00
renovate[bot]
081e7784ed
chore(deps): lock file maintenance (#317) 2022-11-02 09:11:15 +01:00
renovate[bot]
52869fbb8a
fix(deps): update dependency jsonschema to v4.17.0 (#318) 2022-11-02 09:04:28 +01:00
renovate[bot]
c77b2a2d44 chore(deps): update dependency pytest to v7.2.0 2022-10-31 06:26:25 +00:00
renovate[bot]
6fccb14e3e chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.35.8 2022-10-26 02:03:04 +00:00
renovate[bot]
14431ee5e3
chore(deps): lock file maintenance (#307) 2022-10-25 21:30:38 +02:00
renovate[bot]
3996939f05
fix(deps): update dependency colorama to v0.4.6 (#310) 2022-10-25 21:30:28 +02:00
renovate[bot]
b29279ce1f
chore(deps): update arm64v8/python docker tag to v3.11 (#311) 2022-10-25 21:30:21 +02:00
renovate[bot]
45d83b2146
chore(deps): update python docker tag to v3.11 (#312) 2022-10-25 21:30:14 +02:00
renovate[bot]
47c59641bc
chore(deps): update arm32v7/python docker tag to v3.11 (#314) 2022-10-25 21:30:01 +02:00
renovate[bot]
4c1534b0bb chore(docker): update docker digests 2022-10-25 15:54:06 +00:00
renovate[bot]
fdc8cb0be7 chore(docker): update docker digests 2022-10-25 10:09:06 +00:00
renovate[bot]
70d1fb0d8a chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.35.7 2022-10-17 13:38:08 +00:00
renovate[bot]
cbfbca23e7 chore(docker): update docker digests 2022-10-14 17:55:45 +00:00
renovate[bot]
4c0baad5ee chore(docker): update docker digests 2022-10-14 06:05:31 +00:00
renovate[bot]
94504888ce
chore(deps): lock file maintenance (#293) 2022-10-13 21:19:35 +02:00
renovate[bot]
232e4f1b06
fix(deps): update dependency prometheus-client to v0.15.0 (#304) 2022-10-13 21:18:35 +02:00
renovate[bot]
d53ac62a71 chore(deps): update dependency pytest-mock to v3.10.0 2022-10-10 02:22:25 +00:00
renovate[bot]
70ec7b1da3
chore(deps): update dependency flake8-builtins to v2 (#300) 2022-10-09 16:31:01 +02:00
renovate[bot]
cb1c1660e9
chore(deps): update dependency flake8-pep3101 to v2 (#301) 2022-10-09 13:41:49 +02:00
renovate[bot]
d9678a010d
chore(deps): update dependency flake8-isort to v5 (#302) 2022-10-09 11:35:10 +02:00
renovate[bot]
ca3627b68b chore(docker): update python:3.10-alpine docker digest to 486782e 2022-10-08 04:46:34 +00:00
renovate[bot]
1d3ac33304 chore(docker): update docker digests 2022-10-07 13:53:03 +00:00
renovate[bot]
99ee939b47 chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.35.6 2022-10-04 14:58:49 +00:00
renovate[bot]
e6e902cb40 chore(deps): update devdependencies (non-major) 2022-10-03 05:17:31 +00:00
renovate[bot]
eadd789ade
chore(deps): update dependency pytest-cov to v4 (#295) 2022-09-29 08:54:17 +02:00
renovate[bot]
af2fdffba5 chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.35.5 2022-09-28 11:03:07 +00:00
renovate[bot]
2496371d0c chore(deps): update dependency flake8-eradicate to v1.4.0 2022-09-26 05:02:21 +00:00
renovate[bot]
5b62891dd0 chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.35.4 2022-09-24 00:03:26 +00:00
renovate[bot]
f8762cb9a1
chore(deps): lock file maintenance (#289) 2022-09-19 09:07:38 +02:00
renovate[bot]
bccf18f0e9
fix(deps): update dependency jsonschema to v4.16.0 (#288) 2022-09-19 09:07:19 +02:00
renovate[bot]
99ddc9200a chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.35.3 2022-09-12 15:22:21 +00:00
renovate[bot]
5b06e32564 chore(docker): update docker digests 2022-09-08 14:54:28 +00:00
renovate[bot]
cbebad1832 chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.35.2 2022-09-05 23:09:03 +00:00
renovate[bot]
8217c87920
chore(deps): lock file maintenance (#281) 2022-09-05 20:39:48 +02:00
renovate[bot]
5ee927d2b0
fix(deps): update dependency jsonschema to v4.15.0 (#283) 2022-09-05 20:39:18 +02:00
renovate[bot]
80470c1977 chore(deps): update dependency pytest to v7.1.3 2022-09-05 06:45:42 +00:00
renovate[bot]
d7d3a21179 chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.35.1 2022-09-02 13:23:20 +00:00
renovate[bot]
0184389208 chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.35.0 2022-08-30 15:28:35 +00:00
renovate[bot]
ed582c780e chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.34.2 2022-08-23 02:33:51 +00:00
renovate[bot]
219a346c76
fix(deps): update dependency jsonschema to v4.14.0 (#278)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-22 09:59:55 +02:00
renovate[bot]
49544a06aa
chore(deps): lock file maintenance (#256)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-22 09:59:27 +02:00
renovate[bot]
b49853cb60
chore(deps): update dependency flake8 to v5 (#262)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-22 08:40:09 +02:00
renovate[bot]
c4aa50c45a
chore(deps): update devdependencies (non-major) (#275) 2022-08-22 00:08:36 +02:00
renovate[bot]
3eeaaf1193
fix(deps): update dependency jsonschema to v4.13.0 (#277)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-19 22:26:47 +02:00
renovate[bot]
9b8893df8c
fix(deps): update dependency jsonschema to v4.12.1 (#276)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-18 21:58:19 +02:00
renovate[bot]
a0bb62d71e chore(docker): update docker digests 2022-08-11 05:58:28 +00:00
renovate[bot]
0fec18559f chore(docker): update docker digests to 3fe6aa2 2022-08-10 10:35:53 +00:00
renovate[bot]
2bbb120749 chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.34.1 2022-08-08 22:31:58 +00:00
renovate[bot]
8bfe06f00e
chore(deps): update dependency flake8-isort to v4.2.0 (#271)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-08 11:35:48 +02:00
renovate[bot]
9c2104f0be chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.34.0 2022-08-05 00:29:10 +00:00
renovate[bot]
7322b1ecec chore(docker): update python digest to 4543fd9 2022-08-04 00:26:33 +00:00
renovate[bot]
508cabcc0a
fix(deps): update dependency jsonschema to v4.9.1 (#268) 2022-08-03 20:17:56 +02:00
renovate[bot]
7eab4ebfd6 chore(docker): update docker digests to 4fd92f2 2022-08-03 17:17:09 +00:00
renovate[bot]
846e88d38a chore(docker): update python digest to ffc9076 2022-08-03 04:50:42 +00:00
renovate[bot]
89da41598e chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.33.2 2022-08-02 03:52:31 +00:00
renovate[bot]
39daa0601d
fix(deps): update dependency jsonschema to v4.9.0 (#263) 2022-08-01 21:16:06 +02:00
renovate[bot]
d9704970b2 chore(deps): update dependency flake8-isort to v4.1.2.post0 2022-08-01 03:24:13 +00:00
renovate[bot]
93cfb71e48
fix(deps): update dependency jsonschema to v4.8.0 (#261) 2022-07-30 21:43:01 +02:00
renovate[bot]
a1a62483ca chore(docker): update docker digests to dcc75b5 2022-07-27 17:22:45 +00:00
renovate[bot]
025bd09325 chore(docker): update docker digests to fe93ef5 2022-07-27 05:42:35 +00:00
1d78ca1788
ci: switch to thegeeklab/drone-s3-sync plugin 2022-07-26 14:47:53 +02:00
a22820054a
[skip ci] adjust repo config 2022-07-21 09:51:02 +02:00
renovate[bot]
e63f13b1cd chore(docker): update docker digests to 8042f9a 2022-07-19 14:28:09 +00:00
renovate[bot]
c2311b77dc chore(docker): update python digest to 7a6d6e5 2022-07-19 03:10:06 +00:00
renovate[bot]
64d612e786 chore(deps): update dependency pep8-naming to v0.13.1 2022-07-18 03:06:07 +00:00
renovate[bot]
98118be39f chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.33.1 2022-07-17 22:37:18 +00:00
4d06272ed2
ci: switch alpine-tools image 2022-07-17 20:54:36 +02:00
renovate[bot]
70960b2961 chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.33.0 2022-07-15 19:47:38 +00:00
d017be9aad
docs: fix spelling in readme 2022-07-15 08:50:11 +02:00
renovate[bot]
f1c06aad3d
fix(deps): update dependency python-json-logger to v2.0.4 (#252) 2022-07-13 10:31:39 +02:00
renovate[bot]
5ced54d93a
fix(deps): update dependency jsonschema to v4.7.2 (#249) 2022-07-13 09:00:41 +02:00
renovate[bot]
2025e64f36
chore(deps): lock file maintenance (#244) 2022-07-11 13:29:15 +02:00
renovate[bot]
37ee2873ae
fix(deps): update dependency python-json-logger to v2.0.3 (#250) 2022-07-11 10:49:11 +02:00
renovate[bot]
654284fdcb
fix(deps): update dependency nested-lookup to v0.2.25 (#248) 2022-07-11 08:48:27 +02:00
renovate[bot]
87ec61d0a9 chore(deps): update dependency pytest-mock to v3.8.2 2022-07-11 03:27:38 +00:00
renovate[bot]
09c4d230fb
fix(deps): update dependency requests to v2.28.1 (#247) 2022-06-29 21:04:55 +02:00
renovate[bot]
7e0a2b03a7
fix(deps): update dependency jsonschema to v4.6.1 (#246) 2022-06-29 08:57:15 +02:00
renovate[bot]
28d2bf6d34 chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.32.4 2022-06-27 16:54:59 +00:00
renovate[bot]
c0ddccbcf7 chore(deps): update dependency pytest-mock to v3.8.1 2022-06-27 03:43:54 +00:00
renovate[bot]
4feca15c16 chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.32.3 2022-06-21 02:21:21 +00:00
renovate[bot]
12501d95dc
chore(deps): lock file maintenance (#236) 2022-06-20 10:25:10 +02:00
renovate[bot]
a45366dd54
fix(deps): update dependency requests to v2.28.0 (#238) 2022-06-20 08:53:47 +02:00
renovate[bot]
007a8878bb
fix(deps): update dependency colorama to v0.4.5 (#241) 2022-06-19 23:35:40 +02:00
Renovate Bot
ce99d98855 chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.32.2 2022-06-12 18:51:30 +00:00
Renovate Bot
37ba719588 chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.32.1 2022-06-11 01:22:55 +00:00
Renovate Bot
b084d1621f chore(docker): update docker digests to 22fb80b 2022-06-08 04:25:43 +00:00
Renovate Bot
7cdf353caa chore(deps): update dependency pep8-naming to v0.13.0 2022-06-06 16:15:24 +00:00
Renovate Bot
e73315cf47 chore(docker): update docker digests to 7467540 2022-06-03 04:25:16 +00:00
renovate[bot]
bc27c4a73d
chore(deps): lock file maintenance (#227) 2022-06-02 15:43:00 +02:00
renovate[bot]
096d6fa788
fix(deps): update dependency jsonschema to v4.6.0 (#232) 2022-06-02 15:00:46 +02:00
Renovate Bot
5e3dbac6e5 chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.32.0 2022-06-02 04:01:43 +00:00
Renovate Bot
19fa738f45 chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.31.0 2022-05-30 23:43:42 +00:00
Renovate Bot
ffa9c51ffe chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.30.2 2022-05-26 19:02:19 +00:00
Renovate Bot
d98ec15037 chore(docker): update docker digests to 4051162 2022-05-26 04:42:22 +00:00
Renovate Bot
78c72de865 chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.30.1 2022-05-24 13:03:33 +00:00
Renovate Bot
6cb8a11349 chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.30.0 2022-05-23 11:43:07 +00:00
Renovate Bot
57b8c407a2 chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.29.6 2022-05-21 19:40:38 +00:00
a28f918888
ci: switch to linkchecker (#224) 2022-05-21 13:21:04 +02:00
renovate[bot]
d027290d2a chore(deps): lock file maintenance (#220) 2022-05-20 15:51:05 +02:00
renovate[bot]
c219dd8a65
fix(deps): update dependency proxmoxer to v1.3.1 (#222) 2022-05-20 15:50:51 +02:00
Renovate Bot
6ab5de6e62 chore(docker): update docker digests to b1c7b16 2022-05-18 13:17:46 +00:00
Renovate Bot
999317dfcb chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.29.5 2022-05-12 18:53:55 +00:00
Renovate Bot
06ab7f3ca1 chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.29.4 2022-05-06 23:24:06 +00:00
renovate[bot]
788d79cc5e
chore(deps): lock file maintenance (#211) 2022-05-06 16:44:49 +02:00
renovate[bot]
9261f41d52
fix(deps): update dependency jsonschema to v4.5.1 (#218) 2022-05-06 16:43:53 +02:00
Renovate Bot
2b6ca23944 chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.29.3 2022-05-03 00:20:07 +00:00
5047a183aa
update to hugo:0.97.3 in ci 2022-05-02 22:07:15 +02:00
5fddbbecb1
docs: fix hugo hint shortcode 2022-05-02 21:51:53 +02:00
Renovate Bot
df0d110a10 chore(deps): update devdependencies (non-major) 2022-05-02 04:47:51 +00:00
Renovate Bot
4c1c115881 chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.29.2 2022-04-30 16:09:10 +00:00
Renovate Bot
258ec13a55 chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.29.1 2022-04-28 13:25:07 +00:00
Renovate Bot
4cbb1ca056 chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.29.0 2022-04-23 19:14:32 +00:00
Renovate Bot
97844ea57b chore(docker): update docker digests to 032fd45 2022-04-20 21:37:41 +00:00
Renovate Bot
cb19fb1dc5 chore(docker): update docker digests to 49d6cf8 2022-04-14 22:20:04 +00:00
Renovate Bot
d571239fa3 chore(docker): update docker digests to 31f39ec 2022-04-14 13:09:10 +00:00
Renovate Bot
dd5f8efa92 chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.28.0 2022-04-11 16:14:26 +00:00
renovate[bot]
b3a8ed77d1
chore(deps): lock file maintenance (#207) 2022-04-11 09:22:14 +02:00
renovate[bot]
30f5837aed
fix(deps): update dependency prometheus-client to v0.14.1 (#206) 2022-04-11 09:22:03 +02:00
Renovate Bot
db137498e6 chore(docker): update docker digests to 3703b9d 2022-04-07 20:54:28 +00:00
Jan Tomsa
fb1f93b19c
fix: fix error for interfaces without ip addresses (#200) 2022-04-06 10:10:29 +02:00
renovate[bot]
9968fdc9c4
fix(deps): update dependency prometheus-client to v0.14.0 (#204) 2022-04-06 09:22:00 +02:00
Renovate Bot
67919e156c chore(docker): update python digest to b9c3acf 2022-04-05 23:05:47 +00:00
Renovate Bot
609ffeb1bf chore(docker): update docker digests to e619558 2022-04-05 18:46:10 +00:00
Renovate Bot
91a4e0a8ca chore(docker): update docker digests to 0822e90 2022-04-05 14:44:12 +00:00
Mathias Petermann
9179fa29b0
refactor: add ProxmoxClient to handle pve api interactions (#196) 2022-04-04 22:43:00 +02:00
dfb18c1dd8
chore: adjust yapf dict formatting to avoid line breaks 2022-04-04 21:39:06 +02:00
renovate[bot]
c7df9aa9df
fix(deps): update dependency anyconfig to v0.13.0 (#197) 2022-04-04 09:05:23 +02:00
renovate[bot]
d9ffae2bfe
chore(deps): lock file maintenance (#198) 2022-04-04 09:05:13 +02:00
Renovate Bot
41e2e37524 chore(docker): update docker digests to b927a8a 2022-03-31 01:43:39 +00:00
99e20663a7
chore: use parametrized tests for input and output tests (#194) 2022-03-30 21:34:35 +02:00
d5d00e849b
docs: add missing env vars to docs and adjust formatting (#193) 2022-03-30 21:28:17 +02:00
Mathias Petermann
9c89d4e922
feat: add options include_tags and include_vmid (#189) 2022-03-30 20:48:39 +02:00
Renovate Bot
588643e5dd chore(docker): update docker digests to 289e6ba 2022-03-29 23:49:39 +00:00
Renovate Bot
dd8f816344 chore(docker): update python digest to bbf8cad 2022-03-29 12:57:00 +00:00
ba2da53540
fix: convert file mode string to ocal (#186) 2022-03-28 23:10:38 +02:00
renovate[bot]
da048ebb2c
chore(deps): lock file maintenance (#187) 2022-03-28 20:12:17 +02:00
renovate[bot]
5a02daea40
chore(deps): lock file maintenance (#178) 2022-03-27 13:37:02 +02:00
3ccb789bdd
feat: add option to set output file mode (#184) 2022-03-27 13:36:26 +02:00
Renovate Bot
65afd4a6e5 chore(docker): update docker digests to dfdc8ff 2022-03-25 10:39:34 +00:00
Renovate Bot
d92d715ee4 chore(docker): update docker digests to 87eded0 2022-03-24 12:19:54 +00:00
Renovate Bot
b108ff9157 chore(docker): update docker digests to 7393522 2022-03-24 05:09:34 +00:00
Renovate Bot
338c6ff85f chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.27.5 2022-03-21 13:11:08 +00:00
Renovate Bot
29fc15b2c5 chore(deps): update devdependencies (non-major) 2022-03-21 04:23:02 +00:00
Renovate Bot
f15b8fee1d chore(docker): update docker digests to 9a1e361 2022-03-18 16:24:15 +00:00
renovate[bot]
bcb31a8815
chore(deps): lock file maintenance (#173) 2022-03-14 21:09:45 +01:00
renovate[bot]
fa45dcdd2c
fix(deps): update dependency proxmoxer to v1.3.0 (#175) 2022-03-14 21:09:34 +01:00
Renovate Bot
31682f76fd chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.27.4 2022-03-14 12:16:01 +00:00
Renovate Bot
ec4335c517 chore(deps): update dependency pytest to v7.1.0 2022-03-14 02:53:14 +00:00
e4fef71442
docs: add documentation for prometheus-operator usage (#171) 2022-03-11 13:37:19 +01:00
4dc5bb1bd8
docs: refactor usage section and add label description (#170) 2022-03-11 12:39:25 +01:00
Mathias Petermann
a2f7422591
feat: add new label __meta_pve_tags to expose proxmox tags (#168) 2022-03-11 10:41:22 +01:00
renovate[bot]
b820f4646a
chore(deps): lock file maintenance (#164) 2022-03-08 23:56:49 +01:00
264976c2e4
fix: ensure that label values are strings (#166) 2022-03-08 23:56:38 +01:00
Renovate Bot
ba10c5467c chore(docker): update docker digests to bdf7490 2022-03-08 13:01:11 +00:00
Renovate Bot
004942048d chore(deps): update dependency bandit to v1.7.4 2022-03-07 04:14:05 +00:00
5963668dfa
fix: replace deprecated ruamel.yaml.safe_load (#161) 2022-03-06 23:18:55 +01:00
c6b63909d0
chore: add unit tests for PrometheusSD class (#162) 2022-03-06 13:48:40 +01:00
2ab1ad34e0
ci: update hugo to v0.93.2 2022-03-05 16:57:06 +01:00
0ceb550fae
chore: reset singletons in pytest to avoid data leaks between tests (#160) 2022-03-03 11:16:02 +01:00
Mathias Petermann
b5d362417d
feat: add filter option exclude_tags (#159) 2022-03-03 09:08:27 +01:00
7f2dc5a612
fix spellchecking 2022-03-02 16:36:32 +01:00
895a1f07ce
docs: add coverage badge 2022-03-02 13:40:54 +01:00
Renovate Bot
91db402d3b chore(deps): update dependency bandit to v1.7.3 2022-02-28 03:22:40 +00:00
renovate[bot]
3035902b39
chore(deps): lock file maintenance (#145)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-02-27 17:56:34 +01:00
c7c92dc0fb
chore: add unit tests for ip address gathering (#157) 2022-02-27 17:56:08 +01:00
573384e6dc
fix: stop ip address gathering after first found (#156) 2022-02-27 16:04:01 +01:00
Renovate Bot
fae8aaafbb chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.27.3 2022-02-27 12:14:49 +00:00
f22d5e41e4
fix exclude_vmid test 2022-02-27 12:33:16 +01:00
Mathias Petermann
d15a01fd6a
fix: add proper discovery of IPv6 and IPv4 addresses (#155)
BREAKING CHANGE: The label `__meta_pve_ip` was removed in favor of `__meta_pve_ipv4` and `__meta_pve_ipv6`.
2022-02-27 12:31:46 +01:00
Mathias Petermann
4f4e1950ab
fix: ensure vmid exclude compares the same datatypes (#152) 2022-02-26 18:05:18 +01:00
ab7b7d285a
chore: add basic pytest setup (#153) 2022-02-26 16:45:02 +01:00
Renovate Bot
41b9bcd481 chore(docker): update docker digests to 9871be3 2022-02-26 12:59:09 +00:00
Renovate Bot
e16d6d795f chore(docker): update docker digests to 1a3046e 2022-02-24 08:26:55 +00:00
Renovate Bot
b113d60886 chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.27.2 2022-02-21 13:17:56 +00:00
Renovate Bot
7d60d0dd64 chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.27.1 2022-02-18 22:26:59 +00:00
renovate[bot]
0502a49478
chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.27.0 (#143) 2022-02-18 12:09:56 +01:00
Renovate Bot
d488cc308d chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.26.3 2022-02-15 00:34:21 +00:00
renovate[bot]
31a67b81b9
chore(deps): lock file maintenance (#137) 2022-02-14 21:33:42 +01:00
renovate[bot]
dd25d6df9c
fix(deps): update dependency ruamel.yaml to v0.17.21 (#139) 2022-02-14 21:33:19 +01:00
Renovate Bot
4a5cef6c8e chore(docker): update docker digests to c1a3d00 2022-02-14 11:34:10 +00:00
Renovate Bot
40d44a7350 chore(deps): update dependency pytest to v7.0.1 2022-02-14 04:01:04 +00:00
Renovate Bot
d2884e9620 chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.26.1 2022-02-07 17:24:36 +00:00
renovate[bot]
ebea26612f
chore(deps): update dependency pytest to v7 (#135) 2022-02-07 13:47:42 +01:00
1ce18224c8
fix: add toml to dev dependencies as yapf requirement (#136) 2022-02-05 15:01:50 +01:00
Renovate Bot
6d1b8c9d2a chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.25.2 2022-02-03 14:03:59 +00:00
renovate[bot]
cdc6492171
chore(deps): lock file maintenance (#132) 2022-02-01 09:19:30 +01:00
renovate[bot]
b6d5e56837
fix(deps): update dependency environs to v9.5.0 (#131) 2022-02-01 09:17:31 +01:00
Renovate Bot
32ed20f3fa chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.25.1 2022-01-31 18:30:33 +00:00
renovate[bot]
5c558038f9
chore(deps): lock file maintenance (#126) 2022-01-29 13:32:05 +01:00
renovate[bot]
35613daaa1
fix(deps): update dependency prometheus-client to v0.13.1 (#127) 2022-01-29 13:31:30 +01:00
Renovate Bot
90194f71c3 chore(deps): update dependency pytest-mock to v3.7.0 2022-01-28 13:42:05 +00:00
Renovate Bot
0b34986622 chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.25.0 2022-01-27 23:01:14 +00:00
Renovate Bot
5be4a91ff6 chore(deps): update dependency bandit to v1.7.2 2022-01-26 04:56:00 +00:00
Renovate Bot
8d5291804b chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.24.1 2022-01-23 23:13:14 +00:00
renovate[bot]
90217ad4e9
chore(deps): lock file maintenance (#124) 2022-01-21 21:27:32 +01:00
renovate[bot]
9967a0d3d2
fix(deps): update dependency jsonschema to v4.4.0 (#122) 2022-01-21 21:27:17 +01:00
Renovate Bot
d1f70026c5 chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.23.0 2022-01-13 00:42:39 +00:00
renovate[bot]
b23ceb98e0
chore(deps): lock file maintenance (#121) 2022-01-10 09:10:03 +01:00
renovate[bot]
1fb4465f74
fix(deps): update dependency ruamel.yaml to v0.17.20 (#109) 2022-01-10 09:08:58 +01:00
dd789b087f
chore: add build deps to Dockerfile (#120) 2022-01-09 22:08:30 +01:00
Renovate Bot
8919c8fcfd chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.22.2 2022-01-08 23:04:27 +00:00
Renovate Bot
52e4d1a21a chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.22.1 2022-01-08 18:53:16 +00:00
Renovate Bot
48ca496a6a chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.22.0 2022-01-08 15:50:00 +00:00
renovate[bot]
19b3755c77
fix(deps): update dependency environs to v9.4.0 (#114) 2022-01-08 12:55:01 +01:00
renovate[bot]
8c891d0ab2
fix(deps): update dependency requests to v2.27.1 (#113) 2022-01-07 16:20:06 +01:00
Renovate Bot
d3faab0d1e chore(docker): update docker digests 2022-01-07 14:24:28 +00:00
renovate[bot]
052d740ada
chore(deps): lock file maintenance (#112) 2022-01-07 13:54:25 +01:00
renovate[bot]
a16bc28549
fix(deps): update dependency jsonschema to v4.3.3 (#111) 2022-01-07 13:54:11 +01:00
Renovate Bot
3de5aecdeb chore(deps): update dependency yapf to v0.32.0 2021-12-26 09:59:52 +00:00
renovate[bot]
d50bf1cc5b
chore(deps): lock file maintenance (#107) 2021-12-22 15:01:17 +01:00
renovate[bot]
8ce9cf67e8
fix(deps): update dependency jsonschema to v4.3.2 (#108) 2021-12-21 16:57:30 +01:00
d2ae35b2ec
chore: fix clean target in makefile 2021-12-21 10:48:15 +01:00
a0afb76766
sign drone config 2021-12-21 10:24:56 +01:00
2ac36d634a
chore: end of the year maintenance 2021-12-21 10:15:43 +01:00
renovate[bot]
5a220c79b6
fix(deps): update dependency jsonschema to v4.3.1 (#106) 2021-12-17 09:13:06 +01:00
renovate[bot]
7a3d72b785
chore(deps): lock file maintenance (#102) 2021-12-16 12:49:54 +01:00
renovate[bot]
825d842229
fix(deps): update dependency jsonschema to v4.3.0 (#105)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-12-16 12:48:54 +01:00
Renovate Bot
3169360cb8 chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.21.2 2021-12-12 18:48:55 +00:00
5a4ebecac6
chore: adjust changelog template to link to prs instead of issues (#103) 2021-12-12 14:34:15 +01:00
Renovate Bot
f2a35fa796 chore(docker): update docker digests 2021-11-28 14:12:45 +00:00
renovate[bot]
8ee8d9c81c
chore(deps): lock file maintenance (#99)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-11-28 14:07:00 +01:00
Renovate Bot
9e9027f757 chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.21.1 2021-11-24 11:39:49 +00:00
Renovate Bot
8c0b7b38da chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.21.0 2021-11-16 11:31:19 +00:00
renovate[bot]
44861d98f4
chore(deps): lock file maintenance (#96) 2021-11-15 09:39:35 +01:00
renovate[bot]
021eb8f73d
fix(deps): update dependency environs to v9.3.5 (#97) 2021-11-15 09:38:57 +01:00
Renovate Bot
ad13e5c056 chore(deps): update dependency bandit to v1.7.1 2021-11-12 15:11:43 +00:00
renovate[bot]
ef46202be1
fix(deps): update dependency nested-lookup to v0.2.23 (#94) 2021-11-10 08:43:15 +01:00
renovate[bot]
587a1d4ce9
chore(deps): lock file maintenance (#92)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-11-09 20:14:37 +01:00
renovate[bot]
dd5a54a9eb
fix(deps): update dependency jsonschema to v4.2.1 (#90) 2021-11-09 20:14:22 +01:00
Renovate Bot
388cbed651 chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.20.1 2021-11-08 14:06:08 +00:00
Renovate Bot
551dad01a6 chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.20.0 2021-11-07 23:22:35 +00:00
Renovate Bot
7e716de917 chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.19.4 2021-11-03 11:52:27 +00:00
renovate[bot]
311fe2f665
chore(deps): lock file maintenance (#88) 2021-11-03 08:59:36 +01:00
renovate[bot]
c48026b41c
fix(deps): update dependency ruamel.yaml to v0.17.17 (#87) 2021-11-03 08:50:15 +01:00
Renovate Bot
1ad4a9d167 chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.19.3 2021-10-31 00:21:41 +00:00
renovate[bot]
6e04902dd6
fix(deps): update dependency prometheus-client to v0.12.0 (#85)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-30 22:17:30 +02:00
renovate[bot]
16475b367a
chore(deps): lock file maintenance (#84) 2021-10-30 21:48:32 +02:00
renovate[bot]
2d429cd6cb
fix(deps): update dependency jsonschema to v4.1.2 (#82) 2021-10-20 21:45:41 +02:00
renovate[bot]
5b02001494
chore(deps): update dependency flake8 to v4 (#79) 2021-10-20 17:02:50 +02:00
Renovate Bot
998b112cef chore(deps): update devdependencies (non-major) 2021-10-20 09:20:57 +00:00
Renovate Bot
284a79593e chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.19.2 2021-10-15 12:23:23 +00:00
Renovate Bot
46b06f01bd chore(deps): update dependency flake8-isort to v4.1.1 2021-10-14 13:47:36 +00:00
renovate[bot]
63cff26aed
chore(deps): lock file maintenance (#78)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-11 09:34:05 +02:00
renovate[bot]
3a4068e6a9
fix(deps): update dependency jsonschema to v4.1.0 (#77) 2021-10-10 22:07:30 +02:00
renovate[bot]
2ba2b596f5
fix(deps): update dependency proxmoxer to v1.2.0 (#76)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-09 12:42:35 +02:00
d99f4889a1
feat: add python3.10 support (#75) 2021-10-07 09:53:19 +02:00
Renovate Bot
d29db7023e chore(docker): update python:3.10-alpine docker digest to c13a6cf 2021-10-07 07:27:54 +00:00
renovate[bot]
fe84f3aea1
chore(deps): update arm64v8/python docker tag to v3.10 (#71)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-06 20:46:14 +02:00
renovate[bot]
97604b2b3d
chore(deps): update arm32v7/python docker tag to v3.10 (#73)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-06 20:45:29 +02:00
renovate[bot]
52daf51460
chore(deps): update python docker tag to v3.10 (#72)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-06 20:45:23 +02:00
renovate[bot]
b87380cf82
chore(deps): update dependency pytest-cov to v3 (#70)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-04 19:25:06 +02:00
renovate[bot]
63684a062a
fix(deps): update dependency environs to v9.3.4 (#69)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-04 16:52:21 +02:00
renovate[bot]
142b87cab0
fix(deps): update dependency jsonschema to v4 (#66)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-03 17:10:49 +02:00
e57c3650c1
BREAKING CHANGE: drop Python 3.6 support (#68) 2021-10-03 16:10:41 +02:00
Renovate Bot
8bd062ac66 chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.19.1 2021-10-01 12:09:45 +00:00
Renovate Bot
da81af2e8c chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.19.0 2021-09-28 22:19:09 +00:00
renovate[bot]
7f7002086c
chore(deps): lock file maintenance (#64) 2021-09-27 09:02:54 +02:00
1caff0154e
improve changelog template 2021-09-22 11:50:45 +02:00
87bbe2f736
improve drone-matrix template 2021-09-22 09:31:14 +02:00
renovate[bot]
c63042c5f1
chore(deps): lock file maintenance (#58)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-09-20 09:54:25 +02:00
renovate[bot]
ad8e6fa87f
fix(deps): update dependency anyconfig to v0.12.0 (#62)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-09-20 09:53:08 +02:00
Renovate Bot
4eb8740e65 chore(docker): update docker digests 2021-09-19 21:35:27 +00:00
ad187d0de9
ci: switch to drone-matrix plugin (#63) 2021-09-19 22:10:00 +02:00
ba9f13be28
regenerate drone config 2021-09-13 10:53:48 +02:00
Renovate Bot
6dbb3b8ce7 chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.18.3 2021-09-08 23:02:32 +00:00
Renovate Bot
2a87b7bf03 chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.18.2 2021-09-06 11:48:03 +00:00
Renovate Bot
531f41900a chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.18.1 2021-09-02 16:36:09 +00:00
Renovate Bot
5546d0e42a chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.18.0 2021-09-01 11:53:16 +00:00
Renovate Bot
544c6c67d5 chore(docker): update docker digests 2021-09-01 03:20:41 +00:00
renovate[bot]
31b50320ed
fix(deps): update dependency ruamel.yaml to v0.17.16 (#50)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-08-31 14:52:42 +02:00
renovate[bot]
b5789ffb95
chore(deps): lock file maintenance (#53)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-08-31 14:30:21 +02:00
renovate[bot]
9684a41cd1
fix(deps): update dependency anyconfig to v0.11.1 (#52)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-08-31 14:29:05 +02:00
Renovate Bot
751c25875a chore(deps): update dependency pytest to v6.2.5 2021-08-30 20:32:08 +00:00
Renovate Bot
1897cce6d0 chore(docker): update docker digests 2021-08-28 05:11:32 +00:00
Renovate Bot
f386a9639f chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.17.3 2021-08-24 17:51:28 +00:00
Renovate Bot
f9040b5b03 chore(docker): update python:3.9-alpine docker digest to 55fbe1e 2021-08-24 12:27:26 +00:00
Renovate Bot
c170966d7d chore(docker): update docker digests 2021-08-24 10:56:38 +00:00
Renovate Bot
cc7dcaacb3 chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.17.2 2021-08-23 19:50:45 +00:00
renovate[bot]
bfe10d9b4a
chore(deps): lock file maintenance (#43)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-08-23 20:58:27 +02:00
renovate[bot]
8ad96a2e30
fix(deps): update dependency ruamel.yaml to v0.17.13 (#44)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-08-23 20:58:17 +02:00
Renovate Bot
734aece98f chore(deps): update dependency flake8-quotes to v3.3.0 2021-08-23 09:28:20 +00:00
Renovate Bot
161f9678f9 chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.17.1 2021-08-15 14:31:38 +00:00
Renovate Bot
0256af8459 chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.17.0 2021-08-12 20:48:36 +00:00
renovate[bot]
a8d74b86e3
chore(deps): lock file maintenance (#36)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-08-09 11:33:32 +02:00
renovate[bot]
a55ce49e66
fix(deps): update dependency environs to v9.3.3 (#40)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-08-09 11:32:33 +02:00
Renovate Bot
e685c72d97 chore(deps): update dependency pep8-naming to v0.12.1 2021-08-08 07:46:00 +00:00
Renovate Bot
89b2899ae1 chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.16.6 2021-08-05 22:05:12 +00:00
Renovate Bot
331b2e5275 chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.16.5 2021-08-02 14:35:27 +00:00
Renovate Bot
150f174f0a chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.16.4 2021-08-01 00:31:29 +00:00
Renovate Bot
3feb64ab8d chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.16.3 2021-07-29 10:42:08 +00:00
renovate[bot]
c4babe02ea
chore(deps): lock file maintenance (#32)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-07-29 10:10:30 +02:00
renovate[bot]
b7c7eca619
fix(deps): update dependency python-json-logger to v2.0.2 (#33)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-07-29 10:09:54 +02:00
renovate[bot]
4f8cefcda0
chore(deps): lock file maintenance (#27)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-07-25 16:01:31 +02:00
c6b1d3b9fa
fix: set service argparse default to None to respect anyconfig map (#31) 2021-07-25 16:01:23 +02:00
Renovate Bot
9301d7088f chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.16.2 2021-07-22 12:10:56 +00:00
Renovate Bot
f822082da2 chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.16.1 2021-07-20 11:48:40 +00:00
Renovate Bot
8cdd574f53 chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.16.0 2021-07-20 09:23:50 +00:00
renovate[bot]
e7500abb7f
chore(deps): lock file maintenance (#22)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-07-14 23:55:55 +02:00
renovate[bot]
a581689352
fix(deps): update dependency requests to v2.26.0 (#26)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-07-14 23:55:41 +02:00
Renovate Bot
933ec2a10f chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.15.0 2021-07-10 13:50:17 +00:00
Renovate Bot
f7f9c6b62b chore(deps): update dependency pep8-naming to v0.12.0 2021-07-07 12:12:51 +00:00
Renovate Bot
cf63378208 chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.14.1 2021-07-05 08:38:52 +00:00
Renovate Bot
3fe5401573 chore(deps): update dependency thegeeklab/hugo-geekdoc to v0.14.0 2021-07-01 10:06:22 +00:00
renovate[bot]
ed7c8ff17c
fix(deps): update dependency ruamel.yaml to v0.17.10 (#17)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-06-30 22:02:05 +02:00
Renovate Bot
794edcdc7c chore(deps): update docker digests 2021-06-30 07:51:48 +00:00
1fa960ce3d
chore: replace libressl-dev by openssl-dev (#20) 2021-06-30 09:01:23 +02:00
renovate[bot]
256573d08b
chore(deps): lock file maintenance (#18)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-06-28 08:45:54 +02:00
Renovate Bot
bd3d2c5dcb chore(deps): update dependency flake8-eradicate to v1.1.0 2021-06-22 11:48:50 +00:00
renovate[bot]
43fc74178d
chore(deps): lock file maintenance (#15)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-06-21 09:22:53 +02:00
Renovate Bot
ce9508a5e5 chore(deps): update arm32v7/python:3.9-alpine docker digest 2021-06-16 21:19:36 +00:00
Renovate Bot
2877f0b88f chore(deps): update arm64v8/python:3.9-alpine docker digest 2021-06-16 12:32:29 +00:00
b03a7be2c8
feat: add service discovery metrics (#12) 2021-06-15 22:48:11 +02:00
9d90c3b787
docs: initial docs deployment (#10) 2021-06-14 09:45:19 +02:00
renovate[bot]
0653b0e552
chore(deps): lock file maintenance (#11)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-06-14 09:13:58 +02:00
5892717729
fix: convert list items to strings before exclude check is performed (#9) 2021-06-13 17:34:30 +02:00
67 changed files with 3089 additions and 2293 deletions

View File

@ -1,27 +0,0 @@
# Changelog
{{ range .Versions -}}
## {{ if .Tag.Previous }}[{{ .Tag.Name }}]({{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }}){{ else }}{{ .Tag.Name }}{{ end }} ({{ datetime "2006-01-02" .Tag.Date }})
{{ range .CommitGroups -}}
### {{ .Title }}
{{ $subjects := list }}
{{ range .Commits -}}
{{ if not (has .Subject $subjects) -}}
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
{{ $subjects = append $subjects .Subject -}}
{{ end }}
{{- end }}
{{- end -}}
{{- if .NoteGroups -}}
{{ range .NoteGroups -}}
### {{ .Title }}
{{ range .Notes }}
{{ .Body }}
{{ end }}
{{ end -}}
{{ end -}}
{{ end -}}

View File

@ -1,25 +0,0 @@
style: github
template: CHANGELOG.tpl.md
info:
title: CHANGELOG
repository_url: https://github.com/thegeeklab/prometheus-pve-sd
options:
commit_groups:
title_maps:
feat: Features
fix: Bug Fixes
perf: Performance Improvements
refactor: Code Refactoring
chore: Others
test: Testing
ci: CI Pipeline
docs: Documentation
header:
pattern: "^(\\w*)(?:\\(([\\w\\$\\.\\-\\*\\s]*)\\))?\\:\\s(.*)$"
pattern_maps:
- Type
- Scope
- Subject
notes:
keywords:
- BREAKING CHANGE

View File

@ -5,3 +5,20 @@ xoxys
Proxmox
VE
TBD
PVE
SELinux
CLI
JSON
toc
Codecov
IPv4
IPv6
Alertmanager
VM
VMID
Telegraf
QEMU
cloud-init
Prometheus
Kubernetes
namespace

View File

@ -1,493 +0,0 @@
local PythonVersion(pyversion='3.6') = {
name: 'python' + std.strReplace(pyversion, '.', '') + '-pytest',
image: 'python:' + pyversion,
environment: {
PY_COLORS: 1,
},
commands: [
'pip install poetry poetry-dynamic-versioning -qq',
'poetry config experimental.new-installer false',
'poetry install',
'poetry version',
'poetry run prometheus-pve-sd --help',
],
depends_on: [
'fetch',
],
};
local PipelineLint = {
kind: 'pipeline',
name: 'lint',
platform: {
os: 'linux',
arch: 'amd64',
},
steps: [
{
name: 'yapf',
image: 'python:3.9',
environment: {
PY_COLORS: 1,
},
commands: [
'git fetch -tq',
'pip install poetry poetry-dynamic-versioning -qq',
'poetry config experimental.new-installer false',
'poetry install',
'poetry run yapf -dr ./prometheuspvesd',
],
},
{
name: 'flake8',
image: 'python:3.9',
environment: {
PY_COLORS: 1,
},
commands: [
'git fetch -tq',
'pip install poetry poetry-dynamic-versioning -qq',
'poetry config experimental.new-installer false',
'poetry install',
'poetry run flake8 ./prometheuspvesd',
],
},
],
trigger: {
ref: ['refs/heads/main', 'refs/tags/**', 'refs/pull/**'],
},
};
local PipelineTest = {
kind: 'pipeline',
name: 'test',
platform: {
os: 'linux',
arch: 'amd64',
},
steps: [
{
name: 'fetch',
image: 'python:3.9',
commands: [
'git fetch -tq',
],
},
PythonVersion(pyversion='3.6'),
PythonVersion(pyversion='3.7'),
PythonVersion(pyversion='3.8'),
PythonVersion(pyversion='3.9'),
],
depends_on: [
'lint',
],
trigger: {
ref: ['refs/heads/main', 'refs/tags/**', 'refs/pull/**'],
},
};
local PipelineSecurity = {
kind: 'pipeline',
name: 'security',
platform: {
os: 'linux',
arch: 'amd64',
},
steps: [
{
name: 'bandit',
image: 'python:3.9',
environment: {
PY_COLORS: 1,
},
commands: [
'git fetch -tq',
'pip install poetry poetry-dynamic-versioning -qq',
'poetry config experimental.new-installer false',
'poetry install',
'poetry run bandit -r ./prometheuspvesd -x ./prometheuspvesd/test',
],
},
],
depends_on: [
'test',
],
trigger: {
ref: ['refs/heads/main', 'refs/tags/**', 'refs/pull/**'],
},
};
local PipelineBuildPackage = {
kind: 'pipeline',
name: 'build-package',
platform: {
os: 'linux',
arch: 'amd64',
},
steps: [
{
name: 'build',
image: 'python:3.9',
commands: [
'git fetch -tq',
'pip install poetry poetry-dynamic-versioning -qq',
'poetry build',
],
},
{
name: 'checksum',
image: 'alpine',
commands: [
'cd dist/ && sha256sum * > ../sha256sum.txt',
],
},
{
name: 'changelog-generate',
image: 'thegeeklab/git-chglog',
commands: [
'git fetch -tq',
'git-chglog --no-color --no-emoji -o CHANGELOG.md ${DRONE_TAG:---next-tag unreleased unreleased}',
],
},
{
name: 'changelog-format',
image: 'thegeeklab/alpine-tools',
commands: [
'prettier CHANGELOG.md',
'prettier -w CHANGELOG.md',
],
},
{
name: 'publish-github',
image: 'plugins/github-release',
settings: {
overwrite: true,
api_key: { from_secret: 'github_token' },
files: ['dist/*', 'sha256sum.txt'],
title: '${DRONE_TAG}',
note: 'CHANGELOG.md',
},
when: {
ref: ['refs/tags/**'],
},
},
{
name: 'publish-pypi',
image: 'python:3.9',
commands: [
'git fetch -tq',
'pip install poetry poetry-dynamic-versioning -qq',
'poetry publish -n',
],
environment: {
POETRY_HTTP_BASIC_PYPI_USERNAME: { from_secret: 'pypi_username' },
POETRY_HTTP_BASIC_PYPI_PASSWORD: { from_secret: 'pypi_password' },
},
when: {
ref: ['refs/tags/**'],
},
},
],
depends_on: [
'security',
],
trigger: {
ref: ['refs/heads/main', 'refs/tags/**', 'refs/pull/**'],
},
};
local PipelineBuildContainer(arch='amd64') = {
local build = if arch == 'arm' then [{
name: 'build',
image: 'python:3.9-alpine',
commands: [
'apk add -Uq --no-cache build-base libressl-dev libffi-dev musl-dev python3-dev git cargo',
'git fetch -tq',
'pip install poetry poetry-dynamic-versioning -qq',
'poetry build',
],
environment: {
CARGO_NET_GIT_FETCH_WITH_CLI: true,
},
}] else [{
name: 'build',
image: 'python:3.9',
commands: [
'git fetch -tq',
'pip install poetry poetry-dynamic-versioning -qq',
'poetry build',
],
}],
kind: 'pipeline',
name: 'build-container-' + arch,
platform: {
os: 'linux',
arch: arch,
},
steps: build + [
{
name: 'dryrun',
image: 'thegeeklab/drone-docker:19',
settings: {
dry_run: true,
dockerfile: 'docker/Dockerfile.' + arch,
repo: 'thegeeklab/${DRONE_REPO_NAME}',
username: { from_secret: 'docker_username' },
password: { from_secret: 'docker_password' },
},
depends_on: ['build'],
when: {
ref: ['refs/pull/**'],
},
},
{
name: 'publish-dockerhub',
image: 'thegeeklab/drone-docker:19',
settings: {
auto_tag: true,
auto_tag_suffix: arch,
dockerfile: 'docker/Dockerfile.' + arch,
repo: 'thegeeklab/${DRONE_REPO_NAME}',
username: { from_secret: 'docker_username' },
password: { from_secret: 'docker_password' },
},
when: {
ref: ['refs/heads/main', 'refs/tags/**'],
},
depends_on: ['dryrun'],
},
{
name: 'publish-quay',
image: 'thegeeklab/drone-docker:19',
settings: {
auto_tag: true,
auto_tag_suffix: arch,
dockerfile: 'docker/Dockerfile.' + arch,
registry: 'quay.io',
repo: 'quay.io/thegeeklab/${DRONE_REPO_NAME}',
username: { from_secret: 'quay_username' },
password: { from_secret: 'quay_password' },
},
when: {
ref: ['refs/heads/main', 'refs/tags/**'],
},
depends_on: ['dryrun'],
},
],
depends_on: [
'security',
],
trigger: {
ref: ['refs/heads/main', 'refs/tags/**', 'refs/pull/**'],
},
};
local PipelineDocs = {
kind: 'pipeline',
name: 'docs',
platform: {
os: 'linux',
arch: 'amd64',
},
concurrency: {
limit: 1,
},
steps: [
{
name: 'assets',
image: 'thegeeklab/alpine-tools',
commands: [
'make doc',
],
},
{
name: 'markdownlint',
image: 'thegeeklab/markdownlint-cli',
commands: [
"markdownlint 'docs/content/**/*.md' 'README.md' 'CONTRIBUTING.md'",
],
},
{
name: 'spellcheck',
image: 'node:lts-alpine',
commands: [
'npm install -g spellchecker-cli',
"spellchecker --files 'docs/content/**/*.md' 'README.md' -d .dictionary -p spell indefinite-article syntax-urls --no-suggestions",
],
environment: {
FORCE_COLOR: true,
NPM_CONFIG_LOGLEVEL: 'error',
},
},
// {
// name: 'testbuild',
// image: 'thegeeklab/hugo:0.83.1',
// commands: [
// 'hugo -s docs/ -b http://localhost/',
// ],
// },
// {
// name: 'link-validation',
// image: 'thegeeklab/link-validator',
// commands: [
// 'link-validator -ro',
// ],
// environment: {
// LINK_VALIDATOR_BASE_DIR: 'docs/public',
// },
// },
// {
// name: 'build',
// image: 'thegeeklab/hugo:0.83.1',
// commands: [
// 'hugo -s docs/',
// ],
// },
// {
// name: 'beautify',
// image: 'node:lts-alpine',
// commands: [
// 'npm install -g js-beautify',
// "html-beautify -r -f 'docs/public/**/*.html'",
// ],
// environment: {
// FORCE_COLOR: true,
// NPM_CONFIG_LOGLEVEL: 'error',
// },
// },
// {
// name: 'publish',
// image: 'plugins/s3-sync',
// settings: {
// access_key: { from_secret: 's3_access_key' },
// bucket: 'geekdocs',
// delete: true,
// endpoint: 'https://sp.rknet.org',
// path_style: true,
// secret_key: { from_secret: 's3_secret_access_key' },
// source: 'docs/public/',
// strip_prefix: 'docs/public/',
// target: '/${DRONE_REPO_NAME}',
// },
// when: {
// ref: ['refs/heads/main', 'refs/tags/**'],
// },
// },
],
depends_on: [
'build-package',
'build-container-amd64',
'build-container-arm64',
'build-container-arm',
],
trigger: {
ref: ['refs/heads/main', 'refs/tags/**', 'refs/pull/**'],
},
};
local PipelineNotifications = {
kind: 'pipeline',
name: 'notifications',
platform: {
os: 'linux',
arch: 'amd64',
},
steps: [
{
image: 'plugins/manifest',
name: 'manifest-dockerhub',
settings: {
ignore_missing: true,
auto_tag: true,
username: { from_secret: 'docker_username' },
password: { from_secret: 'docker_password' },
spec: 'docker/manifest.tmpl',
},
when: {
status: ['success'],
},
},
{
image: 'plugins/manifest',
name: 'manifest-quay',
settings: {
ignore_missing: true,
auto_tag: true,
username: { from_secret: 'quay_username' },
password: { from_secret: 'quay_password' },
spec: 'docker/manifest-quay.tmpl',
},
when: {
status: ['success'],
},
},
{
name: 'pushrm-dockerhub',
pull: 'always',
image: 'chko/docker-pushrm:1',
environment: {
DOCKER_PASS: {
from_secret: 'docker_password',
},
DOCKER_USER: {
from_secret: 'docker_username',
},
PUSHRM_FILE: 'README.md',
PUSHRM_SHORT: 'Prometheus Service Discovery for Proxmox VE',
PUSHRM_TARGET: 'thegeeklab/${DRONE_REPO_NAME}',
},
when: {
status: ['success'],
},
},
{
name: 'pushrm-quay',
pull: 'always',
image: 'chko/docker-pushrm:1',
environment: {
APIKEY__QUAY_IO: {
from_secret: 'quay_token',
},
PUSHRM_FILE: 'README.md',
PUSHRM_TARGET: 'quay.io/thegeeklab/${DRONE_REPO_NAME}',
},
when: {
status: ['success'],
},
},
{
name: 'matrix',
image: 'plugins/matrix',
settings: {
homeserver: { from_secret: 'matrix_homeserver' },
roomid: { from_secret: 'matrix_roomid' },
template: 'Status: **{{ build.status }}**<br/> Build: [{{ repo.Owner }}/{{ repo.Name }}]({{ build.link }}) ({{ build.branch }}) by {{ build.author }}<br/> Message: {{ build.message }}',
username: { from_secret: 'matrix_username' },
password: { from_secret: 'matrix_password' },
},
when: {
status: ['success', 'failure'],
},
},
],
depends_on: [
'docs',
],
trigger: {
ref: ['refs/heads/main', 'refs/tags/**'],
status: ['success', 'failure'],
},
};
[
PipelineLint,
PipelineTest,
PipelineSecurity,
PipelineBuildPackage,
PipelineBuildContainer(arch='amd64'),
PipelineBuildContainer(arch='arm64'),
PipelineBuildContainer(arch='arm'),
PipelineDocs,
PipelineNotifications,
]

View File

@ -1,590 +0,0 @@
---
kind: pipeline
name: lint
platform:
os: linux
arch: amd64
steps:
- name: yapf
image: python:3.9
commands:
- git fetch -tq
- pip install poetry poetry-dynamic-versioning -qq
- poetry config experimental.new-installer false
- poetry install
- poetry run yapf -dr ./prometheuspvesd
environment:
PY_COLORS: 1
- name: flake8
image: python:3.9
commands:
- git fetch -tq
- pip install poetry poetry-dynamic-versioning -qq
- poetry config experimental.new-installer false
- poetry install
- poetry run flake8 ./prometheuspvesd
environment:
PY_COLORS: 1
trigger:
ref:
- refs/heads/main
- refs/tags/**
- refs/pull/**
---
kind: pipeline
name: test
platform:
os: linux
arch: amd64
steps:
- name: fetch
image: python:3.9
commands:
- git fetch -tq
- name: python36-pytest
image: python:3.6
commands:
- pip install poetry poetry-dynamic-versioning -qq
- poetry config experimental.new-installer false
- poetry install
- poetry version
- poetry run prometheus-pve-sd --help
environment:
PY_COLORS: 1
depends_on:
- fetch
- name: python37-pytest
image: python:3.7
commands:
- pip install poetry poetry-dynamic-versioning -qq
- poetry config experimental.new-installer false
- poetry install
- poetry version
- poetry run prometheus-pve-sd --help
environment:
PY_COLORS: 1
depends_on:
- fetch
- name: python38-pytest
image: python:3.8
commands:
- pip install poetry poetry-dynamic-versioning -qq
- poetry config experimental.new-installer false
- poetry install
- poetry version
- poetry run prometheus-pve-sd --help
environment:
PY_COLORS: 1
depends_on:
- fetch
- name: python39-pytest
image: python:3.9
commands:
- pip install poetry poetry-dynamic-versioning -qq
- poetry config experimental.new-installer false
- poetry install
- poetry version
- poetry run prometheus-pve-sd --help
environment:
PY_COLORS: 1
depends_on:
- fetch
trigger:
ref:
- refs/heads/main
- refs/tags/**
- refs/pull/**
depends_on:
- lint
---
kind: pipeline
name: security
platform:
os: linux
arch: amd64
steps:
- name: bandit
image: python:3.9
commands:
- git fetch -tq
- pip install poetry poetry-dynamic-versioning -qq
- poetry config experimental.new-installer false
- poetry install
- poetry run bandit -r ./prometheuspvesd -x ./prometheuspvesd/test
environment:
PY_COLORS: 1
trigger:
ref:
- refs/heads/main
- refs/tags/**
- refs/pull/**
depends_on:
- test
---
kind: pipeline
name: build-package
platform:
os: linux
arch: amd64
steps:
- name: build
image: python:3.9
commands:
- git fetch -tq
- pip install poetry poetry-dynamic-versioning -qq
- poetry build
- name: checksum
image: alpine
commands:
- cd dist/ && sha256sum * > ../sha256sum.txt
- name: changelog-generate
image: thegeeklab/git-chglog
commands:
- git fetch -tq
- git-chglog --no-color --no-emoji -o CHANGELOG.md ${DRONE_TAG:---next-tag unreleased unreleased}
- name: changelog-format
image: thegeeklab/alpine-tools
commands:
- prettier CHANGELOG.md
- prettier -w CHANGELOG.md
- name: publish-github
image: plugins/github-release
settings:
api_key:
from_secret: github_token
files:
- dist/*
- sha256sum.txt
note: CHANGELOG.md
overwrite: true
title: ${DRONE_TAG}
when:
ref:
- refs/tags/**
- name: publish-pypi
image: python:3.9
commands:
- git fetch -tq
- pip install poetry poetry-dynamic-versioning -qq
- poetry publish -n
environment:
POETRY_HTTP_BASIC_PYPI_PASSWORD:
from_secret: pypi_password
POETRY_HTTP_BASIC_PYPI_USERNAME:
from_secret: pypi_username
when:
ref:
- refs/tags/**
trigger:
ref:
- refs/heads/main
- refs/tags/**
- refs/pull/**
depends_on:
- security
---
kind: pipeline
name: build-container-amd64
platform:
os: linux
arch: amd64
steps:
- name: build
image: python:3.9
commands:
- git fetch -tq
- pip install poetry poetry-dynamic-versioning -qq
- poetry build
- name: dryrun
image: thegeeklab/drone-docker:19
settings:
dockerfile: docker/Dockerfile.amd64
dry_run: true
password:
from_secret: docker_password
repo: thegeeklab/${DRONE_REPO_NAME}
username:
from_secret: docker_username
when:
ref:
- refs/pull/**
depends_on:
- build
- name: publish-dockerhub
image: thegeeklab/drone-docker:19
settings:
auto_tag: true
auto_tag_suffix: amd64
dockerfile: docker/Dockerfile.amd64
password:
from_secret: docker_password
repo: thegeeklab/${DRONE_REPO_NAME}
username:
from_secret: docker_username
when:
ref:
- refs/heads/main
- refs/tags/**
depends_on:
- dryrun
- name: publish-quay
image: thegeeklab/drone-docker:19
settings:
auto_tag: true
auto_tag_suffix: amd64
dockerfile: docker/Dockerfile.amd64
password:
from_secret: quay_password
registry: quay.io
repo: quay.io/thegeeklab/${DRONE_REPO_NAME}
username:
from_secret: quay_username
when:
ref:
- refs/heads/main
- refs/tags/**
depends_on:
- dryrun
trigger:
ref:
- refs/heads/main
- refs/tags/**
- refs/pull/**
depends_on:
- security
---
kind: pipeline
name: build-container-arm64
platform:
os: linux
arch: arm64
steps:
- name: build
image: python:3.9
commands:
- git fetch -tq
- pip install poetry poetry-dynamic-versioning -qq
- poetry build
- name: dryrun
image: thegeeklab/drone-docker:19
settings:
dockerfile: docker/Dockerfile.arm64
dry_run: true
password:
from_secret: docker_password
repo: thegeeklab/${DRONE_REPO_NAME}
username:
from_secret: docker_username
when:
ref:
- refs/pull/**
depends_on:
- build
- name: publish-dockerhub
image: thegeeklab/drone-docker:19
settings:
auto_tag: true
auto_tag_suffix: arm64
dockerfile: docker/Dockerfile.arm64
password:
from_secret: docker_password
repo: thegeeklab/${DRONE_REPO_NAME}
username:
from_secret: docker_username
when:
ref:
- refs/heads/main
- refs/tags/**
depends_on:
- dryrun
- name: publish-quay
image: thegeeklab/drone-docker:19
settings:
auto_tag: true
auto_tag_suffix: arm64
dockerfile: docker/Dockerfile.arm64
password:
from_secret: quay_password
registry: quay.io
repo: quay.io/thegeeklab/${DRONE_REPO_NAME}
username:
from_secret: quay_username
when:
ref:
- refs/heads/main
- refs/tags/**
depends_on:
- dryrun
trigger:
ref:
- refs/heads/main
- refs/tags/**
- refs/pull/**
depends_on:
- security
---
kind: pipeline
name: build-container-arm
platform:
os: linux
arch: arm
steps:
- name: build
image: python:3.9-alpine
commands:
- apk add -Uq --no-cache build-base libressl-dev libffi-dev musl-dev python3-dev git cargo
- git fetch -tq
- pip install poetry poetry-dynamic-versioning -qq
- poetry build
environment:
CARGO_NET_GIT_FETCH_WITH_CLI: true
- name: dryrun
image: thegeeklab/drone-docker:19
settings:
dockerfile: docker/Dockerfile.arm
dry_run: true
password:
from_secret: docker_password
repo: thegeeklab/${DRONE_REPO_NAME}
username:
from_secret: docker_username
when:
ref:
- refs/pull/**
depends_on:
- build
- name: publish-dockerhub
image: thegeeklab/drone-docker:19
settings:
auto_tag: true
auto_tag_suffix: arm
dockerfile: docker/Dockerfile.arm
password:
from_secret: docker_password
repo: thegeeklab/${DRONE_REPO_NAME}
username:
from_secret: docker_username
when:
ref:
- refs/heads/main
- refs/tags/**
depends_on:
- dryrun
- name: publish-quay
image: thegeeklab/drone-docker:19
settings:
auto_tag: true
auto_tag_suffix: arm
dockerfile: docker/Dockerfile.arm
password:
from_secret: quay_password
registry: quay.io
repo: quay.io/thegeeklab/${DRONE_REPO_NAME}
username:
from_secret: quay_username
when:
ref:
- refs/heads/main
- refs/tags/**
depends_on:
- dryrun
trigger:
ref:
- refs/heads/main
- refs/tags/**
- refs/pull/**
depends_on:
- security
---
kind: pipeline
name: docs
platform:
os: linux
arch: amd64
concurrency:
limit: 1
steps:
- name: assets
image: thegeeklab/alpine-tools
commands:
- make doc
- name: markdownlint
image: thegeeklab/markdownlint-cli
commands:
- markdownlint 'docs/content/**/*.md' 'README.md' 'CONTRIBUTING.md'
- name: spellcheck
image: node:lts-alpine
commands:
- npm install -g spellchecker-cli
- spellchecker --files 'docs/content/**/*.md' 'README.md' -d .dictionary -p spell indefinite-article syntax-urls --no-suggestions
environment:
FORCE_COLOR: true
NPM_CONFIG_LOGLEVEL: error
trigger:
ref:
- refs/heads/main
- refs/tags/**
- refs/pull/**
depends_on:
- build-package
- build-container-amd64
- build-container-arm64
- build-container-arm
---
kind: pipeline
name: notifications
platform:
os: linux
arch: amd64
steps:
- name: manifest-dockerhub
image: plugins/manifest
settings:
auto_tag: true
ignore_missing: true
password:
from_secret: docker_password
spec: docker/manifest.tmpl
username:
from_secret: docker_username
when:
status:
- success
- name: manifest-quay
image: plugins/manifest
settings:
auto_tag: true
ignore_missing: true
password:
from_secret: quay_password
spec: docker/manifest-quay.tmpl
username:
from_secret: quay_username
when:
status:
- success
- name: pushrm-dockerhub
pull: always
image: chko/docker-pushrm:1
environment:
DOCKER_PASS:
from_secret: docker_password
DOCKER_USER:
from_secret: docker_username
PUSHRM_FILE: README.md
PUSHRM_SHORT: Prometheus Service Discovery for Proxmox VE
PUSHRM_TARGET: thegeeklab/${DRONE_REPO_NAME}
when:
status:
- success
- name: pushrm-quay
pull: always
image: chko/docker-pushrm:1
environment:
APIKEY__QUAY_IO:
from_secret: quay_token
PUSHRM_FILE: README.md
PUSHRM_TARGET: quay.io/thegeeklab/${DRONE_REPO_NAME}
when:
status:
- success
- name: matrix
image: plugins/matrix
settings:
homeserver:
from_secret: matrix_homeserver
password:
from_secret: matrix_password
roomid:
from_secret: matrix_roomid
template: "Status: **{{ build.status }}**<br/> Build: [{{ repo.Owner }}/{{ repo.Name }}]({{ build.link }}) ({{ build.branch }}) by {{ build.author }}<br/> Message: {{ build.message }}"
username:
from_secret: matrix_username
when:
status:
- success
- failure
trigger:
ref:
- refs/heads/main
- refs/tags/**
status:
- success
- failure
depends_on:
- docs
---
kind: signature
hmac: b6ecc59cd94c224bbd990f1d6be90ec6c28e8faf121b37c56f47fa9befb77ad8
...

10
.github/settings.yml vendored
View File

@ -1,6 +1,7 @@
repository:
name: prometheus-pve-sd
description: Prometheus Service Discovery for Proxmox VE
homepage: https://prometheus-pve-sd.geekdocs.de
topics: prometheus, proxmox, metrics, sd, python
private: false
@ -51,6 +52,11 @@ branches:
required_status_checks:
strict: false
contexts:
- continuous-integration/drone/pr
enforce_admins: null
- ci/woodpecker/pr/lint
- ci/woodpecker/pr/test
- ci/woodpecker/pr/build-package
- ci/woodpecker/pr/build-container
- ci/woodpecker/pr/docs
enforce_admins: false
required_linear_history: true
restrictions: null

2
.gitignore vendored
View File

@ -106,6 +106,8 @@ pip-wheel-metadata
docs/themes/
docs/public/
resources/_gen/
.hugo_build.lock
# Misc
CHANGELOG.md
.ruff_cache

47
.gitsv/config.yml Normal file
View File

@ -0,0 +1,47 @@
---
version: "1.1"
versioning:
update-major: []
update-minor: [feat]
update-patch: [fix, perf, refactor, chore, test, ci, docs]
tag:
pattern: "v%d.%d.%d"
release-notes:
sections:
- name: Features
commit-types: [feat]
section-type: commits
- name: Bug Fixes
commit-types: [fix]
section-type: commits
- name: Performance Improvements
commit-types: [perf]
section-type: commits
- name: Code Refactoring
commit-types: [refactor]
section-type: commits
- name: Others
commit-types: [chore]
section-type: commits
- name: Testing
commit-types: [test]
section-type: commits
- name: CI Pipeline
commit-types: [ci]
section-type: commits
- name: Documentation
commit-types: [docs]
section-type: commits
- name: Breaking Changes
section-type: breaking-changes
commit-message:
footer:
issue:
key: issue
add-value-prefix: "#"
issue:
regex: "#?[0-9]+"

1
.lycheeignore Normal file
View File

@ -0,0 +1 @@
https://hub.docker.com/r/thegeeklab/*

View File

@ -1,2 +1,2 @@
.drone.yml
*.tpl.md
LICENSE

View File

@ -0,0 +1,73 @@
---
when:
- event: [pull_request, tag]
- event: [push, manual]
branch:
- ${CI_REPO_DEFAULT_BRANCH}
steps:
- name: build
image: docker.io/library/python:3.12
commands:
- pip install poetry poetry-dynamic-versioning -qq
- poetry build
- name: dryrun
image: quay.io/thegeeklab/wp-docker-buildx:4
settings:
containerfile: Containerfile.multiarch
dry_run: true
platforms:
- linux/amd64
- linux/arm64
provenance: false
repo: ${CI_REPO}
when:
- event: [pull_request]
- name: publish-dockerhub
image: quay.io/thegeeklab/wp-docker-buildx:4
group: container
settings:
auto_tag: true
containerfile: Containerfile.multiarch
password:
from_secret: docker_password
platforms:
- linux/amd64
- linux/arm64
provenance: false
repo: ${CI_REPO}
username:
from_secret: docker_username
when:
- event: [tag]
- event: [push, manual]
branch:
- ${CI_REPO_DEFAULT_BRANCH}
- name: publish-quay
image: quay.io/thegeeklab/wp-docker-buildx:4
group: container
settings:
auto_tag: true
containerfile: Containerfile.multiarch
password:
from_secret: quay_password
platforms:
- linux/amd64
- linux/arm64
provenance: false
registry: quay.io
repo: quay.io/${CI_REPO}
username:
from_secret: quay_username
when:
- event: [tag]
- event: [push, manual]
branch:
- ${CI_REPO_DEFAULT_BRANCH}
depends_on:
- lint
- test

View File

@ -0,0 +1,56 @@
---
when:
- event: [pull_request, tag]
- event: [push, manual]
branch:
- ${CI_REPO_DEFAULT_BRANCH}
steps:
- name: build
image: docker.io/library/python:3.12
commands:
- pip install poetry poetry-dynamic-versioning -qq
- poetry build
- name: checksum
image: quay.io/thegeeklab/alpine-tools
commands:
- cd dist/ && sha256sum * > ../sha256sum.txt
- name: changelog
image: quay.io/thegeeklab/git-sv
commands:
- git sv current-version
- git sv release-notes -t ${CI_COMMIT_TAG:-next} -o CHANGELOG.md
- cat CHANGELOG.md
- name: publish-github
image: docker.io/plugins/github-release
settings:
api_key:
from_secret: github_token
files:
- dist/*
- sha256sum.txt
note: CHANGELOG.md
overwrite: true
title: ${CI_COMMIT_TAG}
when:
- event: [tag]
- name: publish-pypi
image: docker.io/library/python:3.12
secrets:
- source: pypi_password
target: POETRY_HTTP_BASIC_PYPI_PASSWORD
- source: pypi_username
target: POETRY_HTTP_BASIC_PYPI_USERNAME
commands:
- pip install poetry poetry-dynamic-versioning -qq
- poetry publish -n
when:
- event: [tag]
depends_on:
- lint
- test

100
.woodpecker/docs.yml Normal file
View File

@ -0,0 +1,100 @@
---
when:
- event: [pull_request, tag]
- event: [push, manual]
branch:
- ${CI_REPO_DEFAULT_BRANCH}
steps:
- name: assets
image: quay.io/thegeeklab/alpine-tools
commands:
- make doc
- name: markdownlint
image: quay.io/thegeeklab/markdownlint-cli
group: test
commands:
- markdownlint 'README.md' 'CONTRIBUTING.md'
- name: spellcheck
image: quay.io/thegeeklab/alpine-tools
group: test
commands:
- spellchecker --files 'docs/**/*.md' 'README.md' 'CONTRIBUTING.md' -d .dictionary -p spell indefinite-article syntax-urls
environment:
FORCE_COLOR: "true"
- name: link-validation
image: docker.io/lycheeverse/lychee
group: test
commands:
- lychee --no-progress --format detailed docs/content README.md
- name: build
image: quay.io/thegeeklab/hugo:0.125.7
commands:
- hugo --panicOnWarning -s docs/
- name: beautify
image: quay.io/thegeeklab/alpine-tools
commands:
- html-beautify -r -f 'docs/public/**/*.html'
environment:
FORCE_COLOR: "true"
- name: publish
image: quay.io/thegeeklab/wp-s3-action
settings:
access_key:
from_secret: s3_access_key
bucket: geekdocs
delete: true
endpoint:
from_secret: s3_endpoint
path_style: true
secret_key:
from_secret: s3_secret_access_key
source: docs/public/
strip_prefix: docs/public/
target: /${CI_REPO_NAME}
when:
- event: [push, manual]
branch:
- ${CI_REPO_DEFAULT_BRANCH}
status: [success, failure]
- name: pushrm-dockerhub
image: docker.io/chko/docker-pushrm:1
secrets:
- source: docker_password
target: DOCKER_PASS
- source: docker_username
target: DOCKER_USER
environment:
PUSHRM_FILE: README.md
PUSHRM_SHORT: Prometheus Service Discovery for Proxmox VE
PUSHRM_TARGET: ${CI_REPO}
when:
- event: [push, manual]
branch:
- ${CI_REPO_DEFAULT_BRANCH}
status: [success]
- name: pushrm-quay
image: docker.io/chko/docker-pushrm:1
secrets:
- source: quay_token
target: APIKEY__QUAY_IO
environment:
PUSHRM_FILE: README.md
PUSHRM_TARGET: quay.io/${CI_REPO}
when:
- event: [push, manual]
branch:
- ${CI_REPO_DEFAULT_BRANCH}
status: [success]
depends_on:
- build-package
- build-container

25
.woodpecker/lint.yml Normal file
View File

@ -0,0 +1,25 @@
---
when:
- event: [pull_request, tag]
- event: [push, manual]
branch:
- ${CI_REPO_DEFAULT_BRANCH}
steps:
- name: check-format
image: docker.io/library/python:3.12
commands:
- pip install poetry poetry-dynamic-versioning -qq
- poetry install
- poetry run ruff format --check --diff ./${CI_REPO_NAME//-/}
environment:
PY_COLORS: "1"
- name: check-coding
image: docker.io/library/python:3.12
commands:
- pip install poetry poetry-dynamic-versioning -qq
- poetry install
- poetry run ruff check ./${CI_REPO_NAME//-/}
environment:
PY_COLORS: "1"

26
.woodpecker/notify.yml Normal file
View File

@ -0,0 +1,26 @@
---
when:
- event: [tag]
- event: [push, manual]
branch:
- ${CI_REPO_DEFAULT_BRANCH}
runs_on: [success, failure]
steps:
- name: matrix
image: quay.io/thegeeklab/wp-matrix
settings:
homeserver:
from_secret: matrix_homeserver
password:
from_secret: matrix_password
roomid:
from_secret: matrix_roomid
username:
from_secret: matrix_username
when:
- status: [success, failure]
depends_on:
- docs

39
.woodpecker/test.yml Normal file
View File

@ -0,0 +1,39 @@
---
when:
- event: [pull_request, tag]
- event: [push, manual]
branch:
- ${CI_REPO_DEFAULT_BRANCH}
variables:
- &pytest_base
group: pytest
commands:
- pip install poetry poetry-dynamic-versioning -qq
- poetry install
- poetry run pytest --cov-append
- poetry version
- poetry run ${CI_REPO_NAME} --help
environment:
PY_COLORS: "1"
steps:
- name: python-312
image: docker.io/library/python:3.12
<<: *pytest_base
- name: python-311
image: docker.io/library/python:3.11
<<: *pytest_base
- name: python-310
image: docker.io/library/python:3.10
<<: *pytest_base
- name: python-39
image: docker.io/library/python:3.9
<<: *pytest_base
- name: python-38
image: docker.io/library/python:3.8
<<: *pytest_base

View File

@ -3,7 +3,7 @@
## Security
If you think you have found a **security issue**, please do not mention it in this repository.
Instead, send an email to security@thegeeklab.de with as many details as possible so it can be handled confidential.
Instead, send an email to `security@thegeeklab.de` with as many details as possible so it can be handled confidential.
## Bug Reports and Feature Requests

View File

@ -1,4 +1,4 @@
FROM amd64/python:3.9-alpine@sha256:d2dfb8f0a8b3ab3e2899bba05e53c2b16bc1b8c1fca83637266edb8d1a57dc86
FROM python:3.12-alpine@sha256:5365725a6cd59b72a927628fdda9965103e3dc671676c89ef3ed8b8b0e22e812
LABEL maintainer="Robert Kaussow <mail@thegeeklab.de>"
LABEL org.opencontainers.image.authors="Robert Kaussow <mail@thegeeklab.de>"
@ -8,10 +8,11 @@ LABEL org.opencontainers.image.source="https://github.com/thegeeklab/prometheus-
LABEL org.opencontainers.image.documentation="https://github.com/thegeeklab/prometheus-pve-sd/"
ENV PY_COLORS=1
ENV TZ=UTC
ADD dist/prometheus_pve_sd-*.whl /
RUN apk update && \
RUN apk --update add --virtual .build-deps build-base libffi-dev openssl-dev && \
pip install --upgrade --no-cache-dir pip && \
pip install --no-cache-dir $(find / -name "prometheus_pve_sd-*.whl") && \
rm -f prometheus_pve_sd-*.whl && \

View File

@ -1,6 +1,6 @@
MIT License
Copyright (c) 2021 Robert Kaussow <mail@thegeeklab.de>
Copyright (c) 2022 Robert Kaussow <mail@thegeeklab.de>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
# renovate: datasource=github-releases depName=thegeeklab/hugo-geekdoc
THEME_VERSION := v0.13.5
THEME_VERSION := v0.45.0
THEME := hugo-geekdoc
BASEDIR := docs
THEMEDIR := $(BASEDIR)/themes
@ -17,4 +17,4 @@ doc-assets:
.PHONY: clean
clean:
rm -rf $(THEMEDIR) && \
rm -rf $(THEMEDIR)

View File

@ -2,7 +2,7 @@
Prometheus Service Discovery for Proxmox VE
[![Build Status](https://img.shields.io/drone/build/thegeeklab/prometheus-pve-sd?logo=drone&server=https%3A%2F%2Fdrone.thegeeklab.de)](https://drone.thegeeklab.de/thegeeklab/prometheus-pve-sd)
[![Build Status](https://ci.thegeeklab.de/api/badges/thegeeklab/prometheus-pve-sd/status.svg)](https://ci.thegeeklab.de/repos/thegeeklab/prometheus-pve-sd)
[![Docker Hub](https://img.shields.io/badge/dockerhub-latest-blue.svg?logo=docker&logoColor=white)](https://hub.docker.com/r/thegeeklab/prometheus-pve-sd)
[![Quay.io](https://img.shields.io/badge/quay-latest-blue.svg?logo=docker&logoColor=white)](https://quay.io/repository/thegeeklab/prometheus-pve-sd)
[![Python Version](https://img.shields.io/pypi/pyversions/prometheus-pve-sd.svg)](https://pypi.org/project/prometheus-pve-sd/)
@ -12,11 +12,13 @@ Prometheus Service Discovery for Proxmox VE
[![Source: GitHub](https://img.shields.io/badge/source-github-blue.svg?logo=github&logoColor=white)](https://github.com/thegeeklab/prometheus-pve-sd)
[![License: MIT](https://img.shields.io/github/license/thegeeklab/prometheus-pve-sd)](https://github.com/thegeeklab/prometheus-pve-sd/blob/main/LICENSE)
TBD
This project provides a simple custom service discovery for [Prometheus](https://prometheus.io/). It is using the [Proxmox VE](https://www.proxmox.com/de/proxmox-ve) (PVE) API to fetch Hosts and it's meta information to generate a Prometheus compatible [file based](https://prometheus.io/docs/guides/file-sd/) service discovery. Releases are available as Python Packages on [GitHub](https://github.com/thegeeklab/prometheus-pve-sd/releases) or [PyPI](https://pypi.org/project/prometheus-pve-sd/) and as Docker Image on [Docker Hub](https://hub.docker.com/r/thegeeklab/prometheus-pve-sd).
You can find the full documentation at [https://prometheus-pve-sd.geekdocs.de](https://prometheus-pve-sd.geekdocs.de).
## Contributors
Special thanks goes to all [contributors](https://github.com/thegeeklab/prometheus-pve-sd/graphs/contributors). If you would like to contribute,
Special thanks to all [contributors](https://github.com/thegeeklab/prometheus-pve-sd/graphs/contributors). If you would like to contribute,
please see the [instructions](https://github.com/thegeeklab/prometheus-pve-sd/blob/main/CONTRIBUTING.md).
## License

View File

@ -1,23 +0,0 @@
FROM arm32v7/python:3.9-alpine@sha256:183252dde15e315fbe570a5355be839251aa4878b20163c767dd5238de3c988e
LABEL maintainer="Robert Kaussow <mail@thegeeklab.de>"
LABEL org.opencontainers.image.authors="Robert Kaussow <mail@thegeeklab.de>"
LABEL org.opencontainers.image.title="prometheus-pve-sd"
LABEL org.opencontainers.image.url="https://github.com/thegeeklab/prometheus-pve-sd/"
LABEL org.opencontainers.image.source="https://github.com/thegeeklab/prometheus-pve-sd/"
LABEL org.opencontainers.image.documentation="https://github.com/thegeeklab/prometheus-pve-sd/"
ENV PY_COLORS=1
ADD dist/prometheus_pve_sd-*.whl /
RUN apk update && \
pip install --upgrade --no-cache-dir pip && \
pip install --no-cache-dir $(find / -name "prometheus_pve_sd-*.whl") && \
rm -f prometheus_pve_sd-*.whl && \
rm -rf /var/cache/apk/* && \
rm -rf /root/.cache/
USER root
CMD []
ENTRYPOINT ["/usr/local/bin/prometheus-pve-sd"]

View File

@ -1,23 +0,0 @@
FROM arm64v8/python:3.9-alpine@sha256:2dd55073bf996f367008a7fad490add0343b5c151b708dcf52c133f70ab171a9
LABEL maintainer="Robert Kaussow <mail@thegeeklab.de>"
LABEL org.opencontainers.image.authors="Robert Kaussow <mail@thegeeklab.de>"
LABEL org.opencontainers.image.title="prometheus-pve-sd"
LABEL org.opencontainers.image.url="https://github.com/thegeeklab/prometheus-pve-sd/"
LABEL org.opencontainers.image.source="https://github.com/thegeeklab/prometheus-pve-sd/"
LABEL org.opencontainers.image.documentation="https://github.com/thegeeklab/prometheus-pve-sd/"
ENV PY_COLORS=1
ADD dist/prometheus_pve_sd-*.whl /
RUN apk update && \
pip install --upgrade --no-cache-dir pip && \
pip install --no-cache-dir $(find / -name "prometheus_pve_sd-*.whl") && \
rm -f prometheus_pve_sd-*.whl && \
rm -rf /var/cache/apk/* && \
rm -rf /root/.cache/
USER root
CMD []
ENTRYPOINT ["/usr/local/bin/prometheus-pve-sd"]

View File

@ -1,24 +0,0 @@
image: quay.io/thegeeklab/prometheus-pve-sd:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}
{{#if build.tags}}
tags:
{{#each build.tags}}
- {{this}}
{{/each}}
{{/if}}
manifests:
- image: quay.io/thegeeklab/prometheus-pve-sd:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}amd64
platform:
architecture: amd64
os: linux
- image: quay.io/thegeeklab/prometheus-pve-sd:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}arm64
platform:
architecture: arm64
os: linux
variant: v8
- image: quay.io/thegeeklab/prometheus-pve-sd:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}arm
platform:
architecture: arm
os: linux
variant: v7

View File

@ -1,24 +0,0 @@
image: thegeeklab/prometheus-pve-sd:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}
{{#if build.tags}}
tags:
{{#each build.tags}}
- {{this}}
{{/each}}
{{/if}}
manifests:
- image: thegeeklab/prometheus-pve-sd:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}amd64
platform:
architecture: amd64
os: linux
- image: thegeeklab/prometheus-pve-sd:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}arm64
platform:
architecture: arm64
os: linux
variant: v8
- image: thegeeklab/prometheus-pve-sd:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}arm
platform:
architecture: arm
os: linux
variant: v7

0
docs/.drone.yml Normal file
View File

0
docs/.hugo_build.lock Normal file
View File

37
docs/config.yaml Normal file
View File

@ -0,0 +1,37 @@
---
baseURL: https://prometheus-pve-sd.geekdocs.de/
title: prometheus-pve-sd
theme: hugo-geekdoc
pygmentsUseClasses: true
pygmentsCodeFences: true
# Geekdoc configuration
disablePathToLower: true
enableGitInfo: true
# Needed for mermaid/katex shortcodes
markup:
goldmark:
renderer:
unsafe: true
tableOfContents:
startLevel: 1
params:
description: >
prometheus-pve-sd is a simple custom service discovery for Prometheus. It is using the Proxmox VE API
to fetch Hosts and it's meta information to generate a Prometheus compatible file based service discovery.
images:
- "socialmedia2.png"
geekdocMenuBundle: true
geekdocToC: 3
geekdocRepo: https://github.com/thegeeklab/prometheus-pve-sd
geekdocEditPath: edit/main/docs
geekdocDateFormat: "Jan 2, 2006"
geekdocSearch: true
geekdocLegalNotice: https://thegeeklab.de/legal-notice/#contact-information
geekdocPrivacyPolicy: https://thegeeklab.de/legal-notice/#privacy-policy

15
docs/content/_index.md Normal file
View File

@ -0,0 +1,15 @@
---
title: Documentation
---
[![Build Status](https://ci.thegeeklab.de/api/badges/thegeeklab/prometheus-pve-sd/status.svg)](https://ci.thegeeklab.de/repos/thegeeklab/prometheus-pve-sd)
[![Docker Hub](https://img.shields.io/badge/dockerhub-latest-blue.svg?logo=docker&logoColor=white)](https://hub.docker.com/r/thegeeklab/prometheus-pve-sd)
[![Quay.io](https://img.shields.io/badge/quay-latest-blue.svg?logo=docker&logoColor=white)](https://quay.io/repository/thegeeklab/prometheus-pve-sd)
[![Python Version](https://img.shields.io/pypi/pyversions/prometheus-pve-sd.svg)](https://pypi.org/project/prometheus-pve-sd/)
[![PyPI Status](https://img.shields.io/pypi/status/prometheus-pve-sd.svg)](https://pypi.org/project/prometheus-pve-sd/)
[![PyPI Release](https://img.shields.io/pypi/v/prometheus-pve-sd.svg)](https://pypi.org/project/prometheus-pve-sd/)
[![GitHub contributors](https://img.shields.io/github/contributors/thegeeklab/prometheus-pve-sd)](https://github.com/thegeeklab/prometheus-pve-sd/graphs/contributors)
[![Source: GitHub](https://img.shields.io/badge/source-github-blue.svg?logo=github&logoColor=white)](https://github.com/thegeeklab/prometheus-pve-sd)
[![License: MIT](https://img.shields.io/github/license/thegeeklab/prometheus-pve-sd)](https://github.com/thegeeklab/prometheus-pve-sd/blob/main/LICENSE)
This project provides a simple custom service discovery for [Prometheus](https://prometheus.io/). It is using the [Proxmox VE](https://www.proxmox.com/de/proxmox-ve) (PVE) API to fetch Hosts and it's meta information to generate a Prometheus compatible [file based](https://prometheus.io/docs/guides/file-sd/) service discovery. Releases are available as Python Packages on [GitHub](https://github.com/thegeeklab/prometheus-pve-sd/releases) or [PyPI](https://pypi.org/project/prometheus-pve-sd/) and as Docker Image on [Docker Hub](https://hub.docker.com/r/thegeeklab/prometheus-pve-sd).

View File

@ -0,0 +1,11 @@
---
title: Configuration
---
Changes can be made on different locations which will be processed in the following order (last wins):
- default configuration (build-in)
- global configuration file (path depends on your operating system)
- user-defined configuration file
- environment variables
- CLI options

View File

@ -0,0 +1,29 @@
---
title: CLI options
---
You can get all available CLI options by running `prometheus-pve-sd --help`:
```Shell
$ prometheus-pve-sd --help
usage: prometheus-pve-sd [-h] [-c CONFIG_FILE] [-o OUTPUT_FILE] [-m OUTPUT_FILE_MODE] [-d LOOP_DELAY] [--no-service] [-f LOG_FORMAT] [-v] [-q] [--version]
Prometheus Service Discovery for Proxmox VE
options:
-h, --help show this help message and exit
-c CONFIG_FILE, --config CONFIG_FILE
location of configuration file
-o OUTPUT_FILE, --output OUTPUT_FILE
output file
-m OUTPUT_FILE_MODE, --mode OUTPUT_FILE_MODE
output file mode
-d LOOP_DELAY, --loop-delay LOOP_DELAY
delay between discovery runs
--no-service run discovery only once
-f LOG_FORMAT, --log-format LOG_FORMAT
used log format
-v increase log level
-q decrease log level
--version show program's version number and exit
```

View File

@ -0,0 +1,64 @@
---
title: Default settings
---
```Shell
---
logging:
# Supported log levels: debug|info|warning|error|critical
level: warning
# Supported log formats: console|json|simple
format: console
metrics:
enabled: true
address: "127.0.0.1"
port: 8000
output_file:
output_file_mode: "0640"
loop_delay: 300
# Run pve sd in a loop and discover hosts every n seconds (as defined in loop_delay).
# Can be disabled to run disovery only once.
service: true
exclude_state: []
# Needs to be a list of strings.
exclude_vmid: []
include_vmid: []
# Can be used to exclude vms by tags (proxmox 6+) - needs to be a list of strings.
# If `include_tags` and `exclude_tags` are set at the same time, the `exclude_tags` option takes precedence.
# If `include_tags` is set, and your VM don't have any tags set, they will not show up!
exclude_tags: []
include_tags: []
# Set either password or token_name and token_value
pve:
server:
user:
password:
token_name:
token_value:
auth_timeout: 5
verify_ssl: true
# Example with password
# pve:
# server: proxmox.example.com
# user: root
# password: secure
# auth_timeout: 5
# verify_ssl: true
# Example with API token
# pve:
# server: proxmox.example.com
# user: root
# token_name: pve_sd
# token_value: 01234567-89ab-cdef-0123-456789abcdef
# auth_timeout: 5
# verify_ssl: true
```

View File

@ -0,0 +1,43 @@
---
title: Environment Variables
---
```Shell
PROMETHEUS_PVE_SD_CONFIG_FILE=
# supported log levels: debug|info|warning|error|critical
PROMETHEUS_PVE_SD_LOG_LEVEL=warning
# supported log formats: console|json|simple
PROMETHEUS_PVE_SD_LOG_FORMAT=console
PROMETHEUS_PVE_SD_METRICS_ENABLED=true
PROMETHEUS_PVE_SD_METRICS_ADDRESS=127.0.01
PROMETHEUS_PVE_SD_METRICS_PORT=8000
PROMETHEUS_PVE_SD_OUTPUT_FILE=
PROMETHEUS_PVE_SD_OUTPUT_FILE_MODE=0640
PROMETHEUS_PVE_SD_LOOP_DELAY=300
# Run PVE SD in a loop and discover hosts every n seconds (as defined in PROMETHEUS_PVE_SD_LOOP_DELAY).
# Can be disabled to run disovery only once.
PROMETHEUS_PVE_SD_SERVICE=true
PROMETHEUS_PVE_SD_EXCLUDE_STATE=
# comma-separated list
PROMETHEUS_PVE_SD_EXCLUDE_VMID=
PROMETHEUS_PVE_SD_INCLUDE_VMID=
# comma-separated list
PROMETHEUS_PVE_SD_EXCLUDE_TAGS=
PROMETHEUS_PVE_SD_INCLUDE_TAGS=
PROMETHEUS_PVE_SD_PVE_SERVER=
PROMETHEUS_PVE_SD_PVE_USER=
PROMETHEUS_PVE_SD_PVE_PASSWORD=
PROMETHEUS_PVE_SD_PVE_TOKEN_NAME=
PROMETHEUS_PVE_SD_PVE_TOKEN_VALUE=
PROMETHEUS_PVE_SD_PVE_AUTH_TIMEOUT=5
PROMETHEUS_PVE_SD_PVE_VERIFY_SSL=true
```

View File

@ -0,0 +1,3 @@
---
title: Setup
---

View File

@ -0,0 +1,23 @@
---
title: Using docker
---
```Shell
docker run \
-e PROMETHEUS_PVE_SD_LOG_LEVEL=info \
-e PROMETHEUS_PVE_SD_LOG_FORMAT=console \
-e PROMETHEUS_PVE_SD_OUTPUT_FILE=/out/pve.json \
-e PROMETHEUS_PVE_SD_SERVICE=false \
-e PROMETHEUS_PVE_SD_PVE_SERVER=pve.example.com \
-e PROMETHEUS_PVE_SD_PVE_USER=root \
-e PROMETHEUS_PVE_SD_PVE_PASSWORD=secure \
-e PY_COLORS=1 \
-v $(pwd):/out \
thegeeklab/prometheus-pve-sd
```
{{< hint type=note >}}
Keep in mind, that you have to pass SELinux labels (:Z or :z) to your mount option if you are working on SELinux enabled systems.
{{< /hint >}}
After configuring and starting the service, Prometheus need to be [configured](/usage/getting-started/#prometheus-configuration) to use the external service discovery.

22
docs/content/setup/pip.md Normal file
View File

@ -0,0 +1,22 @@
---
title: Using pip
---
```Shell
# From PyPI as unprivileged user
$ pip install prometheus-pve-sd --user
# .. or as root
$ sudo pip install prometheus-pve-sd
# From Wheel file
$ pip install https://github.com/thegeeklab/prometheus-pve-sd/releases/download/v0.1.0/prometheus_pve_sd-0.1.0-py3-none-any.whl
```
Start the service:
```Shell
prometheus-pve-sd -vv --loop-delay 900 -o /etc/prometheus/pve.json
```
After configuring and starting the service, Prometheus need to be [configured](/usage/getting-started/#prometheus-configuration) to use the external service discovery.

View File

@ -0,0 +1,80 @@
---
title: Using Prometheus Operator
---
{{< toc >}}
As an alternative to local files service discovery Prometheus also support discoveries form HTTP endpoints. In a Kubernetes setup, with the Prometheus operator, it makes more sense to use this [HTTP SD](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#http_sd_config) instead of mounting the output file of the `prometheus-pve-sd` to the container.
The `prometheus-pve-sd` module doesn't have a dedicated HTTP endpoint, therefore you need to use a web server sidecar, that hosts the static file. The following deployment configuration can serve as a starting point for most setups, and just requires some minor adjustments, depending on your Kubernetes setup.
## Kubernetes configuration
Deployment configuration:
```YAML
apiVersion: apps/v1
kind: Deployment
metadata:
creationTimestamp: null
labels:
app: proxmox-service-discovery
name: proxmox-service-discovery
spec:
replicas: 1
selector:
matchLabels:
app: proxmox-service-discovery
strategy: {}
template:
metadata:
creationTimestamp: null
labels:
app: proxmox-service-discovery
spec:
containers:
- image: nginx
name: webserver
resources: {}
ports:
- containerPort: 80
protocol: TCP
name: http
volumeMounts:
- name: pve-sd-output
mountPath: /usr/share/nginx/html
- image: thegeeklab/prometheus-pve-sd
name: prometheus-pve-sd
resources: {}
env:
- name: PROMETHEUS_PVE_SD_OUTPUT_FILE
value: /tmp/pve/proxmox.json
# Add more configurations here, or use a configMap or secret to inject the remaining configs
volumeMounts:
- name: pve-sd-output
mountPath: /tmp/pve/
volumes:
- name: pve-sd-output
emptyDir: {}
status: {}
```
Additionally you will need a service, that exposes the HTTP endpoint within Kubernetes so Prometheus can scrape it.
Service configuration:
```YAML
apiVersion: v1
kind: Service
metadata:
name: pve-sd-service
spec:
selector:
app: proxmox-service-discovery
ports:
- protocol: TCP
port: 80
targetPort: 80
```
After configuring and starting the service, Prometheus need to be [configured](/usage/getting-started/#prometheus-configuration) to use the external service discovery.

View File

@ -0,0 +1,3 @@
---
title: Usage
---

View File

@ -0,0 +1,54 @@
---
title: Getting Started
---
{{< toc >}}
## Prometheus relabeling
### Use IP address labels
Instead of `__meta_pve_name`, it is also possible to configure Prometheus to use the address provided by `__meta_pve_ipv4` or `__meta_pve_ipv4` for connections:
```YAML
relabel_configs:
- replacement: ${1}:9273
source_labels:
- __meta_pve_ipv4
target_label: __address__
```
### Convert tags to custom labels
Tags of a node exposed by the `__meta_pve_tags` might be useful to build more complex configurations in Prometheus. As an example, an `alert` tag can be extracted to dine alerting routes based on the tag value.
**Example:**
Extract `group` and `alert` from a list of tags like this: `__meta_pve_tags="alert_team-1,group_cluster-1,node_node-1"`
```YAML
relabel_configs:
- source_labels:
- __meta_pve_tags
regex: ".*group_([\w\-_]*)"
target_label: "group"
replacement: "${1}"
- source_labels:
- __meta_pve_tags
regex: ".*alert_([\w\-_]*)"
target_label: "alert"
replacement: "${1}"
```
Use the extracted `alert` label to set an Alertmanager route:
```YAML
routes:
- receiver: "empty"
matchers:
- alert = muted
- receiver: "team-1"
matchers:
- alert = team-1
```

View File

@ -0,0 +1,83 @@
---
title: Getting Started
---
{{< toc >}}
## Available Labels
The following list of meta labels can be used to relabel your scrape results:
`__meta_pve_ipv4`
: Discovered IPv4 address or `False` if not found. To discover the IP address either QEMU guest agent or a cloud-init configuration is required.
`__meta_pve_ipv6`
: Discovered IPv6 address or `False` if not found. To discover the IP address either QEMU guest agent or a cloud-init configuration is required.
`__meta_pve_name`
: Name of the node.
`__meta_pve_type`
: Node type, either `qemu` or `lxc`.
`__meta_pve_vmid`
: VMID of the node.
`__meta_pve_cpu`
: Current CPU load of the node.
`__meta_pve_cores`
: Assigned CPU cores for the node.
`__meta_pve_memory`
: Assigned RAM for the node.
`__meta_pve_status`
: Current state of the node.
`__meta_pve_tags`
: A comma-separated list of tags, as set on the node. The label is not getting exported if no tags were found. (Requires PVE 6+)
`__meta_pve_groups`
: Groups discovered from the `Notes` field of the node. Need to be a valid JSON string e.g. `{"groups":["group1","group2"]}`.
## Prometheus configuration
### File service discovery
Prometheus needs a basic file service discovery configuration to fetch system metrics from the host's discovered from PVE. Depending on the used metrics exporter the configuration need to be adjusted, using [Telegraf](https://github.com/influxdata/telegraf/) a starter configuration might look like this:
```YAML
- file_sd_configs:
- files:
- /opt/prometheus/conf/file_sd/proxmox.json
job_name: telegraf-pve
metrics_path: /metrics
relabel_configs:
- replacement: ${1}:9273
source_labels:
- __meta_pve_name
target_label: __address__
- source_labels:
- __meta_pve_name
target_label: instance
```
### HTTP service discovery
If the static file is served by a web server, e.g. while using the [Prometheus Operator](/setup/prometheus-operator/) setup, a HTTP service discovery configuration is required:
```YAML
- http_sd_configs:
- url: http://pve-sd-service:80/proxmox.json
job_name: telegraf-pve
metrics_path: /metrics
relabel_configs:
- replacement: ${1}:9273
source_labels:
- __meta_pve_name
target_label: __address__
- source_labels:
- __meta_pve_name
target_label: instance
```

25
docs/data/menu/main.yml Normal file
View File

@ -0,0 +1,25 @@
---
main:
- name: Setup
sub:
- name: Using PIP
ref: "/setup/pip"
- name: Using Docker
ref: "/setup/docker"
- name: Using Prometheus Operator
ref: "/setup/prometheus-operator"
- name: Configuration
ref: "/configuration"
sub:
- name: Default settings
ref: "/configuration/defaults"
- name: CLI options
ref: "/configuration/cli"
- name: Environment variables
ref: "/configuration/env"
- name: Usage
sub:
- name: Getting Started
ref: "/usage/getting-started"
- name: Advanced
ref: "/usage/advanced"

10
docs/data/menu/more.yml Normal file
View File

@ -0,0 +1,10 @@
---
more:
- name: Releases
ref: "https://github.com/thegeeklab/prometheus-pve-sd/releases"
external: true
icon: "gdoc_download"
- name: "View Source"
ref: "https://github.com/thegeeklab/prometheus-pve-sd"
external: true
icon: "gdoc_github"

16
docs/static/.htaccess vendored Normal file
View File

@ -0,0 +1,16 @@
ErrorDocument 404 /404.html
ExpiresActive On
ExpiresDefault "access plus 600 seconds"
ExpiresByType text/css "access plus 1 week"
ExpiresByType text/javascript "access plus 1 month"
ExpiresByType text/html "access plus 1 seconds"
ExpiresByType application/javascript "access plus 1 month"
ExpiresByType application/x-javascript "access plus 1 month"
ExpiresByType image/gif "access plus 1 week"
ExpiresByType image/jpeg "access plus 1 week"
ExpiresByType image/png "access plus 1 week"
ExpiresByType image/x-icon "access plus 1 month"
ExpiresByType image/svg+xml "access plus 1 week"
ExpiresByType application/x-font-woff "access plus 1 week"
ExpiresByType application/font-woff2 "access plus 1 week"

162
docs/static/socialmedia.svg vendored Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 20 KiB

BIN
docs/static/socialmedia2.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

1435
poetry.lock generated

File diff suppressed because it is too large Load Diff

View File

View File

@ -6,8 +6,11 @@ import json
import shutil
import signal
import tempfile
from os import chmod
from time import sleep
from prometheus_client import start_http_server
import prometheuspvesd.exception
from prometheuspvesd import __version__
from prometheuspvesd.config import SingleConfig
@ -34,11 +37,9 @@ class PrometheusSD:
self.discovery = Discovery()
except APIError as e:
if not self.config.config["service"]:
self.log.sysexit_with_message(
"Proxmoxer API error: {0}".format(str(e).strip())
)
self.log.sysexit_with_message(f"Proxmoxer API error: {str(e).strip()}")
self.logger.error("Proxmoxer API error: {0}".format(str(e).strip()))
self.logger.error(f"Proxmoxer API error: {str(e).strip()}")
sleep(60)
continue
else:
@ -58,21 +59,28 @@ class PrometheusSD:
"--config",
dest="config_file",
action="store",
help="location of configuration file"
help="location of configuration file",
)
parser.add_argument(
"-o", "--output", dest="output_file", action="store", help="output file"
)
parser.add_argument(
"-m", "--mode", dest="output_file_mode", action="store", help="output file mode"
)
parser.add_argument(
"-d",
"--loop-delay",
dest="loop_delay",
action="store",
type=int,
help="delay between discovery runs"
help="delay between discovery runs",
)
parser.add_argument(
"--no-service", dest="service", action="store_false", help="run discovery only once"
"--no-service",
dest="service",
action="store_false",
default=None,
help="run discovery only once",
)
parser.add_argument(
"-f",
@ -80,7 +88,7 @@ class PrometheusSD:
dest="logging.format",
metavar="LOG_FORMAT",
action="store",
help="used log format"
help="used log format",
)
parser.add_argument(
"-v", dest="logging.level", action="append_const", const=-1, help="increase log level"
@ -88,9 +96,7 @@ class PrometheusSD:
parser.add_argument(
"-q", dest="logging.level", action="append_const", const=1, help="decrease log level"
)
parser.add_argument(
"--version", action="version", version="%(prog)s {}".format(__version__)
)
parser.add_argument("--version", action="version", version=f"%(prog)s {__version__}")
return parser.parse_args().__dict__
@ -105,40 +111,61 @@ class PrometheusSD:
config.config["logging"]["level"], config.config["logging"]["format"]
)
except ValueError as e:
self.log.sysexit_with_message("Can not set log level.\n{}".format(str(e)))
self.log.sysexit_with_message(f"Can not set log level.\n{e!s}")
required = [("pve.server", config.config["pve"]["server"]),
("pve.user", config.config["pve"]["user"]),
("pve.password", config.config["pve"]["password"])]
required = [
("pve.server", config.config["pve"]["server"]),
("pve.user", config.config["pve"]["user"]),
]
for name, value in required:
if not value:
self.log.sysexit_with_message("Option '{}' is required but not set".format(name))
self.log.sysexit_with_message(f"Option '{name}' is required but not set")
self.logger.info("Using config file {}".format(config.config_file))
if not config.config["pve"]["password"] and not (
config.config["pve"]["token_name"] and config.config["pve"]["token_value"]
):
self.log.sysexit_with_message(
"Either 'pve.password' or 'pve.token_name' and 'pve.token_value' "
"are required but not set"
)
self.logger.info(f"Using config file {config.config_file}")
return config
def _fetch(self):
loop_delay = self.config.config["loop_delay"]
output_file = self.config.config["output_file"]
self.logger.info("Writes targets to {}".format(output_file))
self.logger.info("Writes targets to {}".format(self.config.config["output_file"]))
self.logger.debug("Propagate from PVE")
if self.config.config["service"] and self.config.config["metrics"]["enabled"]:
self.logger.info(
"Starting metrics http endpoint on port {}".format(
self.config.config["metrics"]["port"]
)
)
start_http_server(
self.config.config["metrics"]["port"],
addr=self.config.config["metrics"]["address"],
)
while True:
try:
inventory = self.discovery.propagate()
except APIError as e:
self.logger.error("Proxmoxer API error: {0}".format(str(e).strip()))
self.logger.error(f"Proxmoxer API error: {str(e).strip()}")
except Exception as e: # noqa
self.logger.error("Unknown error: {0}".format(str(e).strip()))
self.logger.error(f"Unknown error: {str(e).strip()}")
else:
self._write(inventory)
if not self.config.config["service"]:
break
self.logger.info("Waiting {} seconds for next discovery loop".format(loop_delay))
self.logger.info(
"Waiting {} seconds for next discovery loop".format(
self.config.config["loop_delay"]
)
)
sleep(self.config.config["loop_delay"])
def _write(self, host_list: HostList):
@ -152,8 +179,9 @@ class PrometheusSD:
json.dump(output, tf, indent=4)
shutil.move(temp_file.name, self.config.config["output_file"])
chmod(self.config.config["output_file"], int(self.config.config["output_file_mode"], 8))
def _terminate(self, signal, frame):
def _terminate(self, signal, frame): # noqa
self.log.sysexit_with_message("Terminating", code=0)

105
prometheuspvesd/client.py Normal file
View File

@ -0,0 +1,105 @@
"""Proxmox Client."""
import requests
from prometheus_client import Counter
from prometheuspvesd.config import SingleConfig
from prometheuspvesd.exception import APIError
from prometheuspvesd.logger import SingleLog
from prometheuspvesd.model import HostList
from prometheuspvesd.utils import to_bool
try:
from proxmoxer import ProxmoxAPI
HAS_PROXMOXER = True
except ImportError:
HAS_PROXMOXER = False
PVE_REQUEST_COUNT_TOTAL = Counter("pve_sd_requests_total", "Total count of requests to PVE API")
PVE_REQUEST_COUNT_ERROR_TOTAL = Counter(
"pve_sd_requests_error_total", "Total count of failed requests to PVE API"
)
class ProxmoxClient:
"""Proxmox API Client."""
def __init__(self):
if not HAS_PROXMOXER:
self.log.sysexit_with_message(
"The Proxmox VE Prometheus SD requires proxmoxer: "
"https://pypi.org/project/proxmoxer/"
)
self.config = SingleConfig()
self.log = SingleLog()
self.logger = SingleLog().logger
self.client = self._auth()
self.logger.debug("Successfully authenticated")
self.host_list = HostList()
def _auth(self):
try:
self.logger.debug(
"Trying to authenticate against {} as user {}".format(
self.config.config["pve"]["server"], self.config.config["pve"]["user"]
)
)
if self.config.config["pve"]["token_name"]:
self.logger.debug("Using token login")
return ProxmoxAPI(
self.config.config["pve"]["server"],
user=self.config.config["pve"]["user"],
token_name=self.config.config["pve"]["token_name"],
token_value=self.config.config["pve"]["token_value"],
verify_ssl=to_bool(self.config.config["pve"]["verify_ssl"]),
timeout=self.config.config["pve"]["auth_timeout"],
)
return ProxmoxAPI(
self.config.config["pve"]["server"],
user=self.config.config["pve"]["user"],
password=self.config.config["pve"]["password"],
verify_ssl=to_bool(self.config.config["pve"]["verify_ssl"]),
timeout=self.config.config["pve"]["auth_timeout"],
)
except requests.RequestException as e:
PVE_REQUEST_COUNT_ERROR_TOTAL.inc()
raise APIError(str(e)) from e
def _do_request(self, *args):
PVE_REQUEST_COUNT_TOTAL.inc()
try:
# create a new tuple containing nodes and unpack it again for client.get
return self.client.get(*("nodes", *args))
except requests.RequestException as e:
PVE_REQUEST_COUNT_ERROR_TOTAL.inc()
raise APIError(str(e)) from e
def get_nodes(self):
self.logger.debug("fetching all nodes")
return self._do_request()
def get_all_vms(self, pve_node):
self.logger.debug(f"fetching all vms on node {pve_node}")
return self._do_request(pve_node, "qemu")
def get_all_containers(self, pve_node):
self.logger.debug(f"fetching all containers on node {pve_node}")
return self._do_request(pve_node, "lxc")
def get_instance_config(self, pve_node, pve_type, vmid):
self.logger.debug(f"fetching instance config for {vmid} on {pve_node}")
return self._do_request(pve_node, pve_type, vmid, "config")
def get_agent_info(self, pve_node, pve_type, vmid):
self.logger.debug(f"fetching agent info for {vmid} on {pve_node}")
return self._do_request(pve_node, pve_type, vmid, "agent", "info")["result"]
def get_network_interfaces(self, pve_node, vmid):
self.logger.debug(f"fetching network interfaces for {vmid} on {pve_node}")
return self._do_request(pve_node, "qemu", vmid, "agent", "network-get-interfaces")[
"result"
]

View File

@ -2,8 +2,7 @@
"""Global settings definition."""
import os
from pathlib import Path
from pathlib import PurePath
from pathlib import Path, PurePath
import anyconfig
import environs
@ -21,7 +20,7 @@ cache_dir = AppDirs("prometheus-pve-sd").user_cache_dir
default_output_file = os.path.join(cache_dir, "pve.json")
class Config():
class Config:
"""
Create an object with all necessary settings.
@ -32,86 +31,137 @@ class Config():
"""
SETTINGS = {
"metrics.enabled": {
"default": True,
"env": "METRICS_ENABLED",
"type": environs.Env().bool,
},
"metrics.address": {
"default": "127.0.0.1",
"env": "METRICS_ADDRESS",
"type": environs.Env().str,
},
"metrics.port": {
"default": 8000,
"env": "METRICS_PORT",
"type": environs.Env().int,
},
"config_file": {
"default": "",
"env": "CONFIG_FILE",
"type": environs.Env().str
"type": environs.Env().str,
},
"logging.level": {
"default": "WARNING",
"env": "LOG_LEVEL",
"file": True,
"type": environs.Env().str
"type": environs.Env().str,
},
"logging.format": {
"default": "console",
"env": "LOG_FORMAT",
"file": True,
"type": environs.Env().str
"type": environs.Env().str,
},
"output_file": {
"default": default_output_file,
"env": "OUTPUT_FILE",
"file": True,
"type": environs.Env().str
"type": environs.Env().str,
},
"output_file_mode": {
"default": "0640",
"env": "OUTPUT_FILE_MODE",
"file": True,
"type": environs.Env().str,
},
"loop_delay": {
"default": 300,
"env": "LOOP_DELAY",
"file": True,
"type": environs.Env().int
"type": environs.Env().int,
},
"service": {
"default": True,
"env": "SERVICE",
"file": True,
"type": environs.Env().bool
"type": environs.Env().bool,
},
"exclude_state": {
"default": [],
"env": "EXCLUDE_STATE",
"file": True,
"type": environs.Env().list
"type": environs.Env().list,
},
"exclude_vmid": {
"default": [],
"env": "EXCLUDE_STATE",
"env": "EXCLUDE_VMID",
"file": True,
"type": environs.Env().list
"type": environs.Env().list,
},
"include_vmid": {
"default": [],
"env": "INCLUDE_VMID",
"file": True,
"type": environs.Env().list,
},
"exclude_tags": {
"default": [],
"env": "EXCLUDE_TAGS",
"file": True,
"type": environs.Env().list,
},
"include_tags": {
"default": [],
"env": "INCLUDE_TAGS",
"file": True,
"type": environs.Env().list,
},
"pve.server": {
"default": "",
"env": "PVE_SERVER",
"file": True,
"type": environs.Env().str
"type": environs.Env().str,
},
"pve.user": {
"default": "",
"env": "PVE_USER",
"file": True,
"type": environs.Env().str
"type": environs.Env().str,
},
"pve.password": {
"default": "",
"env": "PVE_PASSWORD",
"file": True,
"type": environs.Env().str
"type": environs.Env().str,
},
"pve.token_name": {
"default": "",
"env": "PVE_TOKEN_NAME",
"file": True,
"type": environs.Env().str,
},
"pve.token_value": {
"default": "",
"env": "PVE_TOKEN_VALUE",
"file": True,
"type": environs.Env().str,
},
"pve.auth_timeout": {
"default": 5,
"env": "PVE_AUTH_TIMEOUT",
"file": True,
"type": environs.Env().int
"type": environs.Env().int,
},
"pve.verify_ssl": {
"default": True,
"env": "PVE_VERIFY_SSL",
"file": True,
"type": environs.Env().bool
"type": environs.Env().bool,
},
}
def __init__(self, args={}):
def __init__(self, args=None):
"""
Initialize a new settings class.
@ -120,7 +170,10 @@ class Config():
:returns: None
"""
self._args = args
if args is None:
self._args = {}
else:
self._args = args
self._schema = None
self.config_file = default_config_file
self.config = None
@ -161,12 +214,12 @@ class Config():
value = item["type"](envname)
normalized = self._add_dict_branch(normalized, key.split("."), value)
except environs.EnvError as e:
if '"{}" not set'.format(envname) in str(e):
if f'"{envname}" not set' in str(e):
pass
else:
raise prometheuspvesd.exception.ConfigError(
"Unable to read environment variable", str(e)
)
) from e
return normalized
@ -187,17 +240,18 @@ class Config():
for config in source_files:
if config and os.path.exists(config):
with open(config, "r", encoding="utf8") as stream:
with open(config, encoding="utf8") as stream:
s = stream.read()
try:
file_dict = ruamel.yaml.safe_load(s)
file_dict = ruamel.yaml.YAML(typ="safe", pure=True).load(s)
except (
ruamel.yaml.composer.ComposerError, ruamel.yaml.scanner.ScannerError
ruamel.yaml.composer.ComposerError,
ruamel.yaml.scanner.ScannerError,
) as e:
message = "{} {}".format(e.context, e.problem)
message = f"{e.context} {e.problem}"
raise prometheuspvesd.exception.ConfigError(
"Unable to read config file {}".format(config), message
)
f"Unable to read config file {config}", message
) from e
if self._validate(file_dict):
anyconfig.merge(defaults, file_dict, ac_merge=anyconfig.MS_DICTS)
@ -224,27 +278,26 @@ class Config():
if not os.path.isabs(path):
base = os.path.join(os.getcwd(), path)
return os.path.abspath(os.path.expanduser(os.path.expandvars(base)))
else:
return path
return path
def _validate(self, config):
try:
anyconfig.validate(config, self.schema, ac_schema_safe=False)
except jsonschema.exceptions.ValidationError as e:
schema_error = "Failed validating '{validator}' in schema{schema}\n{message}".format(
validator=e.validator,
schema=format_as_index(list(e.relative_schema_path)[:-1]),
message=e.message
)
raise prometheuspvesd.exception.ConfigError("Configuration error", schema_error)
schema = format_as_index(list(e.relative_schema_path)[:-1], 0)
schema_error = f"Failed validating '{e.validator}' in schema {schema}\n{e.message}"
raise prometheuspvesd.exception.ConfigError("Configuration error", schema_error) from e
return True
def _add_dict_branch(self, tree, vector, value):
key = vector[0]
tree[key] = value \
if len(vector) == 1 \
else self._add_dict_branch(tree[key] if key in tree else {}, vector[1:], value)
tree[key] = (
value
if len(vector) == 1
else self._add_dict_branch(tree.get(key, {}), vector[1:], value)
)
return tree

View File

@ -1,55 +1,35 @@
#!/usr/bin/env python3
"""Prometheus Discovery."""
import ipaddress
import json
import re
import socket
from collections import defaultdict
import requests
from prometheus_client import Gauge, Summary
from prometheuspvesd.client import ProxmoxClient
from prometheuspvesd.config import SingleConfig
from prometheuspvesd.exception import APIError
from prometheuspvesd.logger import SingleLog
from prometheuspvesd.model import Host
from prometheuspvesd.model import HostList
from prometheuspvesd.utils import to_bool
from prometheuspvesd.model import Host, HostList
try:
from proxmoxer import ProxmoxAPI
HAS_PROXMOXER = True
except ImportError:
HAS_PROXMOXER = False
PROPAGATION_TIME = Summary(
"pve_sd_propagate_seconds", "Time spent propagating the inventory from PVE"
)
HOST_GAUGE = Gauge("pve_sd_hosts", "Number of hosts discovered by PVE SD")
class Discovery():
class Discovery:
"""Prometheus PVE Service Discovery."""
def __init__(self):
if not HAS_PROXMOXER:
self.log.sysexit_with_message(
"The Proxmox VE Prometheus SD requires proxmoxer: "
"https://pypi.org/project/proxmoxer/"
)
self.config = SingleConfig()
self.log = SingleLog()
self.logger = SingleLog().logger
self.client = self._auth()
self.client = ProxmoxClient()
self.host_list = HostList()
def _auth(self):
try:
return ProxmoxAPI(
self.config.config["pve"]["server"],
user=self.config.config["pve"]["user"],
password=self.config.config["pve"]["password"],
verify_ssl=to_bool(self.config.config["pve"]["verify_ssl"]),
timeout=self.config.config["pve"]["auth_timeout"]
)
except requests.RequestException as e:
raise APIError(str(e))
def _get_names(self, pve_list, pve_type):
names = []
@ -72,82 +52,131 @@ class Discovery():
return variables
def _get_ip_address(self, pve_type, pve_node, vmid):
def validate(address):
try:
# IP address validation
if socket.inet_aton(address):
# Ignore localhost
if address != "127.0.0.1":
return address
except socket.error:
return False
address = False
def _get_ip_addresses(self, pve_type, pve_node, vmid):
ipv4_address = False
ipv6_address = False
networks = False
if pve_type == "qemu":
# If qemu agent is enabled, try to gather the IP address
try:
if self.client.nodes(pve_node).get(pve_type, vmid, "agent", "info") is not None:
networks = self.client.nodes(pve_node).get(
"qemu", vmid, "agent", "network-get-interfaces"
)["result"]
except Exception: # noqa # nosec
if self.client.get_agent_info(pve_node, pve_type, vmid) is not None:
networks = self.client.get_network_interfaces(pve_node, vmid)
except Exception: # noqa
pass
if networks:
if type(networks) is list:
for network in networks:
for ip_address in network["ip-addresses"]:
address = validate(ip_address["ip-address"])
if isinstance(networks, list):
for network in networks:
for ip_address in network.get("ip-addresses", []):
if ip_address["ip-address-type"] == "ipv4" and not ipv4_address:
ipv4_address = self._validate_ip(ip_address["ip-address"])
elif ip_address["ip-address-type"] == "ipv6" and not ipv6_address:
ipv6_address = self._validate_ip(ip_address["ip-address"])
if not address:
config = self.client.get_instance_config(pve_node, pve_type, vmid)
if config and not ipv4_address:
try:
config = self.client.nodes(pve_node).get(pve_type, vmid, "config")
sources = [config["net0"], config["ipconfig0"]]
if "ipconfig0" in config:
sources = [config["net0"], config["ipconfig0"]]
else:
sources = [config["net0"]]
for s in sources:
find = re.search(r"ip=(\d*\.\d*\.\d*\.\d*)", str(sources))
find = re.search(r"ip=(\d*\.\d*\.\d*\.\d*)", str(s))
if find and find.group(1):
address = find.group(1)
ipv4_address = find.group(1)
break
except Exception: # noqa # nosec
except Exception: # noqa
pass
return address
if config and not ipv6_address:
try:
if "ipconfig0" in config:
sources = [config["net0"], config["ipconfig0"]]
else:
sources = [config["net0"]]
def _exclude(self, pve_list):
for s in sources:
find = re.search(
r"ip=(([a-fA-F0-9]{0,4}:{0,2}){0,7}:[0-9a-fA-F]{1,4})", str(s)
)
if find and find.group(1):
ipv6_address = find.group(1)
break
except Exception: # noqa
pass
return ipv4_address, ipv6_address
def _filter(self, pve_list):
filtered = []
for item in pve_list:
obj = defaultdict(dict, item)
tags = []
tags_excl = self.config.config["exclude_tags"]
if isinstance(obj["tags"], str):
tags = obj["tags"].split(";")
self.logger.debug(f"vmid {obj['vmid']}: discovered tags: {tags}")
if (
len(self.config.config["include_vmid"]) > 0
and str(obj["vmid"]) not in self.config.config["include_vmid"]
):
continue
if len(self.config.config["include_tags"]) > 0 and (
bool(obj["tags"]) is False # continue if tags is not set
or set(tags).isdisjoint(self.config.config["include_tags"])
):
continue
if obj["template"] == 1:
continue
if obj["status"] in self.config.config["exclude_state"]:
if obj["status"] in map(str, self.config.config["exclude_state"]):
continue
if obj["vmid"] in self.config.config["exclude_vmid"]:
if str(obj["vmid"]) in self.config.config["exclude_vmid"]:
continue
if isinstance(obj["tags"], str) and not set(tags).isdisjoint(tags_excl):
self.logger.debug(
f"vmid {obj['vmid']}: "
f"excluded by tags: {list(set(tags).intersection(tags_excl))}"
)
continue
filtered.append(item.copy())
return filtered
def _validate_ip(self, address: object) -> object:
try:
if (
not ipaddress.ip_address(address).is_loopback
and not ipaddress.ip_address(address).is_link_local
):
return address
except ValueError:
return False
@PROPAGATION_TIME.time()
def propagate(self):
self.host_list.clear()
for node in self._get_names(self.client.nodes.get(), "node"):
nodelist = self._get_names(self.client.get_nodes(), "node")
self.logger.info(f"Discovered nodes: {','.join(nodelist)}")
for node in nodelist:
try:
qemu_list = self._exclude(self.client.nodes(node).qemu.get())
container_list = self._exclude(self.client.nodes(node).lxc.get())
except Exception as e: # noqa
raise APIError(str(e))
qemu_list = self._filter(self.client.get_all_vms(node))
container_list = self._filter(self.client.get_all_containers(node))
except Exception as e:
raise APIError(str(e)) from e
# Merge QEMU and Containers lists from this node
instances = self._get_variables(qemu_list, "qemu").copy()
instances.update(self._get_variables(container_list, "container"))
self.logger.info("Found {} targets".format(len(instances)))
HOST_GAUGE.set(len(instances))
self.logger.info(f"{node}: Found {len(instances)} targets")
for host in instances:
host_meta = instances[host]
vmid = host_meta["proxmox_vmid"]
@ -157,14 +186,14 @@ class Discovery():
except KeyError:
pve_type = "qemu"
config = self.client.nodes(node).get(pve_type, vmid, "config")
config = self.client.get_instance_config(node, pve_type, vmid)
try:
description = (config["description"])
description = config["description"]
except KeyError:
description = None
except Exception as e: # noqa
raise APIError(str(e))
except Exception as e:
raise APIError(str(e)) from e
try:
metadata = json.loads(description)
@ -173,12 +202,12 @@ class Discovery():
except ValueError:
metadata = {"notes": description}
address = self._get_ip_address(pve_type, node, vmid) or host
ipv4_address, ipv6_address = self._get_ip_addresses(pve_type, node, vmid)
prom_host = Host(vmid, host, address, pve_type)
prom_host = Host(vmid, host, ipv4_address, ipv6_address, pve_type)
config_flags = [("cpu", "sockets"), ("cores", "cores"), ("memory", "memory")]
meta_flags = [("status", "proxmox_status")]
meta_flags = [("status", "proxmox_status"), ("tags", "proxmox_tags")]
for key, flag in config_flags:
if flag in config:
@ -192,6 +221,6 @@ class Discovery():
prom_host.add_label("groups", ",".join(metadata["groups"]))
self.host_list.add_host(prom_host)
self.logger.debug("Discovered {}".format(prom_host))
self.logger.debug(f"Discovered {prom_host}")
return self.host_list

View File

@ -3,11 +3,10 @@
class PrometheusSDError(Exception):
"""Generic exception class for promtheus-pve-sd."""
"""Generic exception class for Prometheus-pve-sd."""
def __init__(self, msg, original_exception=""):
super(PrometheusSDError,
self).__init__("{msg}\n{org}".format(msg=msg, org=original_exception))
super().__init__(f"{msg}\n{original_exception}")
self.original_exception = original_exception

View File

@ -8,8 +8,7 @@ import sys
import colorama
from pythonjsonlogger import jsonlogger
from prometheuspvesd.utils import Singleton
from prometheuspvesd.utils import to_bool
from prometheuspvesd.utils import Singleton, to_bool
CONSOLE_FORMAT = "{}{}[%(levelname)s]{} %(message)s"
JSON_FORMAT = "%(asctime)s %(levelname)s %(message)s"
@ -26,7 +25,7 @@ def _should_do_markup():
colorama.init(autoreset=True, strip=not _should_do_markup())
class LogFilter(object):
class LogFilter:
"""A custom log filter which excludes log messages above the logged level."""
def __init__(self, level):
@ -47,22 +46,22 @@ class LogFilter(object):
class SimpleFormatter(logging.Formatter):
"""Logging Formatter for simple logs."""
def format(self, record): # noqa
def format(self, record):
return logging.Formatter.format(self, record)
class MultilineFormatter(logging.Formatter):
"""Logging Formatter to reset color after newline characters."""
def format(self, record): # noqa
record.msg = record.msg.replace("\n", "\n{}... ".format(colorama.Style.RESET_ALL))
def format(self, record):
record.msg = record.msg.replace("\n", f"\n{colorama.Style.RESET_ALL}... ")
return logging.Formatter.format(self, record)
class MultilineJsonFormatter(jsonlogger.JsonFormatter):
"""Logging Formatter to remove newline characters."""
def format(self, record): # noqa
def format(self, record):
record.msg = record.msg.replace("\n", " ")
return jsonlogger.JsonFormatter.format(self, record)
@ -70,11 +69,11 @@ class MultilineJsonFormatter(jsonlogger.JsonFormatter):
class Log:
"""Handle logging."""
def __init__(self, level=logging.WARN, name="prometheuspvesd", log_format="console"):
def __init__(self, level=logging.WARNING, name="prometheuspvesd", log_format="console"):
self.logger = logging.getLogger(name)
self.logger.setLevel(level)
self.logger.addHandler(self._get_error_handler(log_format))
self.logger.addHandler(self._get_warn_handler(log_format))
self.logger.addHandler(self._get_warning_handler(log_format))
self.logger.addHandler(self._get_info_handler(log_format))
self.logger.addHandler(self._get_critical_handler(log_format))
self.logger.addHandler(self._get_debug_handler(log_format))
@ -102,10 +101,10 @@ class Log:
return handler
def _get_warn_handler(self, log_format):
def _get_warning_handler(self, log_format):
handler = logging.StreamHandler(sys.stdout)
handler.setLevel(logging.WARN)
handler.addFilter(LogFilter(logging.WARN))
handler.setLevel(logging.WARNING)
handler.addFilter(LogFilter(logging.WARNING))
if log_format == "json":
handler.setFormatter(MultilineJsonFormatter(JSON_FORMAT))
@ -114,7 +113,7 @@ class Log:
else:
handler.setFormatter(
MultilineFormatter(
self.warn(
self.warning(
CONSOLE_FORMAT.format(
colorama.Fore.YELLOW, colorama.Style.BRIGHT, colorama.Style.RESET_ALL
)
@ -196,7 +195,7 @@ class Log:
self.logger.setLevel(level)
self.logger.addHandler(self._get_error_handler(log_level))
self.logger.addHandler(self._get_warn_handler(log_level))
self.logger.addHandler(self._get_warning_handler(log_level))
self.logger.addHandler(self._get_info_handler(log_level))
self.logger.addHandler(self._get_critical_handler(log_level))
self.logger.addHandler(self._get_debug_handler(log_level))
@ -213,8 +212,8 @@ class Log:
"""Format error messages and return string."""
return msg
def warn(self, msg):
"""Format warn messages and return string."""
def warning(self, msg):
"""Format warning messages and return string."""
return msg
def info(self, msg):
@ -230,7 +229,7 @@ class Log:
:returns: string
"""
return "{}{}{}".format(color, msg, colorama.Style.RESET_ALL)
return f"{color}{msg}{colorama.Style.RESET_ALL}"
def sysexit(self, code=1):
sys.exit(code)

View File

@ -5,19 +5,24 @@
class Host:
"""Represents a virtual machine or container in PVE."""
def __init__(self, vmid, hostname, ip_address, pve_type):
self.hostname = hostname
self.ip_address = ip_address
self.vmid = vmid
self.pve_type = pve_type
def __init__(self, vmid, hostname, ipv4_address, ipv6_address, pve_type):
self.hostname = str(hostname)
self.ipv4_address = str(ipv4_address)
self.ipv6_address = str(ipv6_address)
self.vmid = str(vmid)
self.pve_type = str(pve_type)
self.labels = {}
self.labels["__meta_pve_ip"] = ip_address
self.labels["__meta_pve_name"] = hostname
self.labels["__meta_pve_type"] = pve_type
self.labels["__meta_pve_vmid"] = str(vmid)
self.add_label("ipv4", ipv4_address)
self.add_label("ipv6", ipv6_address)
self.add_label("name", hostname)
self.add_label("type", pve_type)
self.add_label("vmid", vmid)
def __str__(self):
return f"{self.hostname}({self.vmid}): {self.pve_type} {self.ip_address}"
return (
f"{self.hostname}({self.vmid}): "
f"{self.pve_type} {self.ipv4_address} {self.ipv6_address}"
)
def add_label(self, key, value):
key = key.replace("-", "_").replace(" ", "_")
@ -33,6 +38,20 @@ class HostList:
def __init__(self):
self.hosts = []
def __eq__(self, other):
if not isinstance(other, HostList):
return False
if len(other.hosts) != len(self.hosts):
return False
for host in self.hosts:
if other.host_exists(host):
continue
return False
return True
def clear(self):
self.hosts = []

View File

@ -0,0 +1 @@
"""Init pytest unit tests."""

View File

@ -0,0 +1,30 @@
---
logging:
level: warning
format: console
metrics:
enabled: true
address: "127.0.0.1"
port: 8000
output_file: dummy
output_file_mode: "0640"
loop_delay: 300
service: true
exclude_state: []
exclude_vmid: []
exclude_tags: []
include_vmid: []
include_tags: []
pve:
server: proxmox.example.com
user: root
password: secure
token_name: pve_sd
token_value: 01234567-89ab-cdef-0123-456789abcdef
auth_timeout: 5
verify_ssl: true

View File

@ -0,0 +1 @@
"""Init pytest fixtures."""

View File

@ -0,0 +1,377 @@
"""Global pytest fixtures."""
import environs
import pytest
from prometheuspvesd.model import Host, HostList
@pytest.fixture
def builtins():
return {
"metrics.enabled": {
"default": True,
"env": "METRICS_ENABLED",
"type": environs.Env().bool,
},
"metrics.address": {
"default": "127.0.0.1",
"env": "METRICS_ADDRESS",
"type": environs.Env().str,
},
"metrics.port": {"default": 8000, "env": "METRICS_PORT", "type": environs.Env().int},
"config_file": {"default": "", "env": "CONFIG_FILE", "type": environs.Env().str},
"logging.level": {
"default": "WARNING",
"env": "LOG_LEVEL",
"file": True,
"type": environs.Env().str,
},
"logging.format": {
"default": "console",
"env": "LOG_FORMAT",
"file": True,
"type": environs.Env().str,
},
"output_file": {
"default": "dummy",
"env": "OUTPUT_FILE",
"file": True,
"type": environs.Env().str,
},
"output_file_mode": {
"default": "0640",
"env": "OUTPUT_FILE_MODE",
"file": True,
"type": environs.Env().str,
},
"loop_delay": {
"default": 300,
"env": "LOOP_DELAY",
"file": True,
"type": environs.Env().int,
},
"service": {"default": False, "env": "SERVICE", "file": True, "type": environs.Env().bool},
"exclude_state": {
"default": [],
"env": "EXCLUDE_STATE",
"file": True,
"type": environs.Env().list,
},
"exclude_vmid": {
"default": [],
"env": "EXCLUDE_VMID",
"file": True,
"type": environs.Env().list,
},
"exclude_tags": {
"default": [],
"env": "EXCLUDE_TAGS",
"file": True,
"type": environs.Env().list,
},
"include_vmid": {
"default": [],
"env": "INCLUDE_VMID",
"file": True,
"type": environs.Env().list,
},
"include_tags": {
"default": [],
"env": "INCLUDE_TAGS",
"file": True,
"type": environs.Env().list,
},
"pve.server": {
"default": "dummyserver",
"env": "PVE_SERVER",
"file": True,
"type": environs.Env().str,
},
"pve.user": {
"default": "dummyuser",
"env": "PVE_USER",
"file": True,
"type": environs.Env().str,
},
"pve.password": {
"default": "dummypass",
"env": "PVE_PASSWORD",
"file": True,
"type": environs.Env().str,
},
"pve.token_name": {
"default": "dummyname",
"env": "PVE_TOKEN_NAME",
"file": True,
"type": environs.Env().str,
},
"pve.token_value": {
"default": "dummyvalue",
"env": "PVE_TOKEN_VALUE",
"file": True,
"type": environs.Env().str,
},
"pve.auth_timeout": {
"default": 5,
"env": "PVE_AUTH_TIMEOUT",
"file": True,
"type": environs.Env().int,
},
"pve.verify_ssl": {
"default": True,
"env": "PVE_VERIFY_SSL",
"file": True,
"type": environs.Env().bool,
},
}
@pytest.fixture
def defaults():
return {
"exclude_state": [],
"exclude_tags": [],
"exclude_vmid": [],
"include_tags": [],
"include_vmid": [],
"logging": {"format": "console", "level": "WARNING"},
"loop_delay": 300,
"metrics": {"address": "127.0.0.1", "enabled": True, "port": 8000},
"output_file": "dummy",
"output_file_mode": "0640",
"pve": {
"auth_timeout": 5,
"password": "",
"server": "",
"user": "",
"token_name": "",
"token_value": "",
"verify_ssl": True,
},
"service": True,
}
@pytest.fixture
def nodes():
return [
{
"level": "",
"id": "node/example-node",
"disk": 4783488,
"cpu": 0.0935113631167406,
"maxcpu": 24,
"maxmem": 142073272990,
"mem": 135884478304,
"node": "example-node",
"type": "node",
"status": "online",
"maxdisk": 504209920,
"uptime": 200,
}
]
@pytest.fixture
def qemus():
return [
{
"diskwrite": 0,
"vmid": "100",
"name": "100.example.com",
"cpu": 0.0202130478509556,
"diskread": 0,
"template": "",
"uptime": 3101505,
"maxdisk": 26843545600,
"maxmem": 1073741824,
"pid": "1765",
"cpus": 1,
"netin": 2856071643,
"disk": 0,
"status": "running",
"netout": 12159205236,
"mem": 496179157,
"tags": "unmonitored;excluded;postgres",
},
{
"diskwrite": 0,
"vmid": "101",
"name": "101.example.com",
"cpu": 0.0202130478509556,
"diskread": 0,
"template": "",
"uptime": 3101505,
"maxdisk": 26843545600,
"maxmem": 1073741824,
"pid": "1765",
"cpus": 1,
"netin": 2856071643,
"disk": 0,
"status": "running",
"netout": 12159205236,
"mem": 496179157,
},
{
"diskwrite": 0,
"vmid": "102",
"name": "102.example.com",
"cpu": 0.0202130478509556,
"diskread": 0,
"template": "",
"uptime": 3101505,
"maxdisk": 26843545600,
"maxmem": 1073741824,
"pid": "1765",
"cpus": 1,
"netin": 2856071643,
"disk": 0,
"status": "prelaunch",
"netout": 12159205236,
"mem": 496179157,
"tags": "monitored",
},
]
@pytest.fixture
def instance_config():
return {
"name": "102.example.com",
"description": '{"groups": "test-group"}',
"net0": "virtio=D8-85-75-47-2E-8D,bridge=vmbr122,ip=192.0.2.25,ip=2001:db8::666:77:8888",
"cpu": 2,
"cores": 2,
}
@pytest.fixture
def agent_info():
return {
"supported_commands": [
{"name": "guest-network-get-interfaces", "enabled": True, "success-response": True}
],
"version": "5.2.0",
}
@pytest.fixture
def addresses():
return {
"ipv4_valid": [
"192.0.2.1",
"198.51.100.1",
],
"ipv4_invalid": [
"127.0.0.1",
"169.254.1.1",
],
"ipv6_valid": [
"2001:db8:3333:4444:5555:6666:7777:8888",
"2001:db8:3333:4444:CCCC:DDDD:EEEE:FFFF",
"::",
"2001:db8::",
"::1234:5678",
"2001:db8::1234:5678",
"2001:0db8:0001:0000:0000:0ab9:C0A8:0102",
],
"ipv6_invalid": [
"::1",
"fe80::903a:1c1a:e802:11e4",
],
}
@pytest.fixture
def networks():
return [
{
"hardware-address": "00:00:00:00:00:00",
"ip-addresses": [
{"ip-address": "127.0.0.1", "ip-address-type": "ipv4", "prefix": 8},
{"ip-address": "::1", "ip-address-type": "ipv6", "prefix": 128},
],
"name": "lo",
"statistics": {
"rx-bytes": 9280,
"rx-dropped": 0,
"rx-errs": 0,
"rx-packets": 92,
"tx-bytes": 9280,
"tx-dropped": 0,
"tx-errs": 0,
"tx-packets": 92,
},
},
{
"hardware-address": "92:0b:bd:c1:f8:39",
"ip-addresses": [
{"ip-address": "192.0.2.1", "ip-address-type": "ipv4", "prefix": 32},
{"ip-address": "192.0.2.4", "ip-address-type": "ipv4", "prefix": 32},
{
"ip-address": "2001:db8:3333:4444:5555:6666:7777:8888",
"ip-address-type": "ipv6",
"prefix": 64,
},
],
"name": "eth0",
"statistics": {
"rx-bytes": 2861070337,
"rx-dropped": 0,
"rx-errs": 0,
"rx-packets": 18065580,
"tx-bytes": 12185866619,
"tx-dropped": 0,
"tx-errs": 0,
"tx-packets": 14423878,
},
},
{"hardware-address": "ba:97:85:bd:9a:a5", "name": "eth1"},
]
@pytest.fixture
def inventory():
hostlist = HostList()
hostlist.add_host(Host("100", "100.example.com", "192.0.2.1", False, "qemu"))
hostlist.add_host(Host("101", "101.example.com", "192.0.2.2", False, "qemu"))
hostlist.add_host(Host("102", "102.example.com", "192.0.2.3", False, "qemu"))
return hostlist
@pytest.fixture
def labels():
return [
{
"targets": ["100.example.com"],
"labels": {
"__meta_pve_ipv4": "192.0.2.1",
"__meta_pve_ipv6": "False",
"__meta_pve_name": "100.example.com",
"__meta_pve_type": "qemu",
"__meta_pve_vmid": "100",
},
},
{
"targets": ["101.example.com"],
"labels": {
"__meta_pve_ipv4": "192.0.2.2",
"__meta_pve_ipv6": "False",
"__meta_pve_name": "101.example.com",
"__meta_pve_type": "qemu",
"__meta_pve_vmid": "101",
},
},
{
"targets": ["102.example.com"],
"labels": {
"__meta_pve_ipv4": "192.0.2.3",
"__meta_pve_ipv6": "False",
"__meta_pve_name": "102.example.com",
"__meta_pve_type": "qemu",
"__meta_pve_vmid": "102",
},
},
]

View File

@ -0,0 +1,60 @@
"""Pytest conftest fixtures."""
import logging
import os
import sys
from contextlib import contextmanager
import pytest
from _pytest.logging import LogCaptureHandler
from prometheuspvesd.utils import Singleton
@pytest.fixture(autouse=True)
def reset_singletons():
Singleton._instances = {}
@pytest.fixture(autouse=True)
def reset_os_environment():
os.environ.clear()
@pytest.fixture(autouse=True)
def reset_sys_argv():
sys.argv = ["prometheus-pve-sd"]
@contextmanager
def local_caplog_fn(level=logging.INFO, name="prometheuspvesd"):
"""
Context manager that captures records from non-propagating loggers.
After the end of the 'with' statement, the log level is restored to its original
value. Code adapted from https://github.com/pytest-dev/pytest/issues/3697#issuecomment-790925527.
:param int level: The level.
:param logging.Logger logger: The logger to update.
"""
logger = logging.getLogger(name)
old_level = logger.level
logger.setLevel(level)
handler = LogCaptureHandler()
logger.addHandler(handler)
try:
yield handler
finally:
logger.setLevel(old_level)
logger.removeHandler(handler)
@pytest.fixture
def local_caplog():
"""Fixture that yields a context manager for capturing records from non-propagating loggers."""
yield local_caplog_fn

View File

@ -0,0 +1,146 @@
"""Test CLI class."""
import json
import pytest
from proxmoxer import ProxmoxAPI
import prometheuspvesd.exception
from prometheuspvesd.cli import PrometheusSD
from prometheuspvesd.client import ProxmoxClient
from prometheuspvesd.config import Config
from prometheuspvesd.discovery import Discovery
from prometheuspvesd.exception import APIError
from prometheuspvesd.logger import Log
pytest_plugins = [
"prometheuspvesd.test.fixtures.fixtures",
]
def test_cli_required_error(mocker, capsys):
mocker.patch.object(ProxmoxClient, "_auth", return_value=mocker.create_autospec(ProxmoxAPI))
mocker.patch.object(PrometheusSD, "_fetch", return_value=True)
with pytest.raises(SystemExit) as e:
PrometheusSD()
stdout, stderr = capsys.readouterr()
assert "Option 'pve.server' is required but not set" in stderr
assert e.value.code == 1
@pytest.mark.parametrize(
"testinput",
[
{"pve.user": "dummy", "pve.password": "", "pve.token_name": "", "pve.token_value": ""},
{
"pve.user": "dummy",
"pve.password": "",
"pve.token_name": "dummy",
"pve.token_value": "",
},
{
"pve.user": "dummy",
"pve.password": "",
"pve.token_name": "",
"pve.token_value": "dummy",
},
],
)
def test_cli_auth_required_error(mocker, capsys, builtins, testinput):
for key, value in testinput.items():
builtins[key]["default"] = value
mocker.patch.dict(Config.SETTINGS, builtins)
mocker.patch.object(ProxmoxClient, "_auth", return_value=mocker.create_autospec(ProxmoxAPI))
mocker.patch.object(PrometheusSD, "_fetch", return_value=True)
with pytest.raises(SystemExit) as e:
PrometheusSD()
stdout, stderr = capsys.readouterr()
assert (
"Either 'pve.password' or 'pve.token_name' and 'pve.token_value' are required but not set"
in stderr
)
assert e.value.code == 1
@pytest.mark.parametrize(
"testinput",
[
{"pve.password": "dummy", "pve.token_name": "", "pve.token_value": ""},
{"pve.password": "", "pve.token_name": "dummy", "pve.token_value": "dummy"},
],
)
def test_cli_auth_no_error(mocker, builtins, testinput):
for key, value in testinput.items():
builtins[key]["default"] = value
mocker.patch.dict(Config.SETTINGS, builtins)
mocker.patch.object(ProxmoxClient, "_auth", return_value=mocker.create_autospec(ProxmoxAPI))
mocker.patch.object(PrometheusSD, "_fetch", return_value=True)
psd = PrometheusSD()
for key, value in testinput.items():
assert psd.config.config["pve"][key.split(".")[1]] == value
def test_cli_config_error(mocker, capsys):
mocker.patch(
"prometheuspvesd.config.SingleConfig.__init__",
side_effect=prometheuspvesd.exception.ConfigError("Dummy Config Exception"),
)
mocker.patch.object(ProxmoxClient, "_auth", return_value=mocker.create_autospec(ProxmoxAPI))
mocker.patch.object(PrometheusSD, "_fetch", return_value=True)
with pytest.raises(SystemExit) as e:
PrometheusSD()
stdout, stderr = capsys.readouterr()
assert "Dummy Config Exception" in stderr
assert e.value.code == 1
def test_cli_log_error(mocker, capsys):
mocker.patch.object(Log, "update_logger", side_effect=ValueError("Dummy Loglevel Exception"))
mocker.patch.object(ProxmoxClient, "_auth", return_value=mocker.create_autospec(ProxmoxAPI))
mocker.patch.object(PrometheusSD, "_fetch", return_value=True)
with pytest.raises(SystemExit) as e:
PrometheusSD()
stdout, stderr = capsys.readouterr()
assert "Dummy Loglevel Exception" in stderr
assert e.value.code == 1
def test_cli_api_error(mocker, builtins, capsys):
mocker.patch.dict(Config.SETTINGS, builtins)
mocker.patch.object(ProxmoxClient, "_auth", side_effect=APIError("Dummy API Exception"))
mocker.patch.object(PrometheusSD, "_fetch", return_value=True)
with pytest.raises(SystemExit) as e:
PrometheusSD()
stdout, stderr = capsys.readouterr()
assert "Proxmoxer API error: Dummy API Exception" in stderr
assert e.value.code == 1
def test_cli_write(mocker, tmp_path, builtins, inventory, labels):
temp = tmp_path / "temp.txt"
out = tmp_path / "out.txt"
builtins["output_file"]["default"] = out.as_posix()
mocker.patch.dict(Config.SETTINGS, builtins)
mocker.patch.object(ProxmoxClient, "_auth", return_value=mocker.create_autospec(ProxmoxAPI))
mocker.patch.object(Discovery, "propagate", return_value=inventory)
mocker.patch("tempfile.NamedTemporaryFile", return_value=temp.open("w"))
psd = PrometheusSD()
assert json.loads(out.read_text()) == labels
assert oct(out.stat().st_mode & 0o777) == oct(int(psd.config.config["output_file_mode"], 8))

View File

@ -0,0 +1,38 @@
"""Test Config class."""
import pytest
import ruamel.yaml
import prometheuspvesd.exception
from prometheuspvesd.config import Config
pytest_plugins = [
"prometheuspvesd.test.fixtures.fixtures",
]
def test_yaml_config(mocker, defaults):
mocker.patch(
"prometheuspvesd.config.default_config_file", "./prometheuspvesd/test/data/config.yml"
)
config = Config()
defaults["pve"]["user"] = "root"
defaults["pve"]["password"] = "secure"
defaults["pve"]["server"] = "proxmox.example.com"
defaults["pve"]["token_name"] = "pve_sd"
defaults["pve"]["token_value"] = "01234567-89ab-cdef-0123-456789abcdef"
assert config.config == defaults
def test_yaml_config_error(mocker):
mocker.patch(
"prometheuspvesd.config.default_config_file", "./prometheuspvesd/test/data/config.yml"
)
mocker.patch.object(ruamel.yaml.YAML, "load", side_effect=ruamel.yaml.composer.ComposerError)
with pytest.raises(prometheuspvesd.exception.ConfigError) as e:
Config()
assert "Unable to read config file ./prometheuspvesd/test/data/config.yml" in str(e.value)

View File

@ -0,0 +1,134 @@
"""Test Discovery class."""
import logging
import pytest
from proxmoxer import ProxmoxAPI
from prometheuspvesd.client import ProxmoxClient
from prometheuspvesd.discovery import Discovery
pytest_plugins = [
"prometheuspvesd.test.fixtures.fixtures",
]
def records_to_messages(records):
return [r.getMessage() for r in records]
@pytest.fixture
def discovery(mocker):
mocker.patch.object(ProxmoxClient, "_auth", return_value=mocker.create_autospec(ProxmoxAPI))
return Discovery()
def test_exclude_vmid(discovery, qemus):
discovery.config.config["exclude_vmid"] = ["100", "101", "102"]
filtered = discovery._filter(qemus)
assert len(filtered) == 0
def test_exclude_state(discovery, qemus):
discovery.config.config["exclude_state"] = ["prelaunch"]
filtered = discovery._filter(qemus)
assert len(filtered) == 2
def test_exclude_tags(discovery, qemus, local_caplog):
discovery.config.config["exclude_tags"] = ["unmonitored"]
with local_caplog(level=logging.DEBUG) as caplog:
filtered = discovery._filter(qemus)
assert (
"vmid 100: discovered tags: ['unmonitored', 'excluded', 'postgres']"
in records_to_messages(caplog.records)
)
assert "vmid 100: excluded by tags: ['unmonitored']"
assert len(filtered) == 2
@pytest.mark.parametrize(
"testinput,expected",
[
(["monitored"], 1),
(["monitored", "postgres"], 2),
([], 3),
],
)
def test_include_tags(discovery, qemus, testinput, expected):
discovery.config.config["include_tags"] = testinput
filtered = discovery._filter(qemus)
assert len(filtered) == expected
@pytest.mark.parametrize(
"testinput,expected",
[
(["101", "100"], 2),
([], 3),
],
)
def test_include_vmid(discovery, qemus, testinput, expected):
discovery.config.config["include_vmid"] = testinput
filtered = discovery._filter(qemus)
assert len(filtered) == expected
def test_include_and_exclude_tags(discovery, qemus):
discovery.config.config["include_tags"] = ["postgres"]
discovery.config.config["exclude_tags"] = ["unmonitored"]
filtered = discovery._filter(qemus)
assert len(filtered) == 0
def test_validate_ip(discovery, addresses):
# IPv4 validation
for address in addresses["ipv4_valid"]:
assert discovery._validate_ip(address)
for address in addresses["ipv4_invalid"]:
assert not discovery._validate_ip(address)
# IPv6 validation
for address in addresses["ipv6_valid"]:
assert discovery._validate_ip(address)
for address in addresses["ipv6_invalid"]:
assert not discovery._validate_ip(address)
def test_get_ip_addresses(mocker, discovery, networks):
mocker.patch.object(ProxmoxClient, "get_network_interfaces", return_value=networks)
assert discovery._get_ip_addresses("qemu", "dummy", "dummy") == (
networks[1]["ip-addresses"][0]["ip-address"],
networks[1]["ip-addresses"][2]["ip-address"],
)
def test_get_ip_addresses_from_instance_config(mocker, discovery, instance_config):
mocker.patch.object(ProxmoxClient, "get_network_interfaces", return_value=[])
mocker.patch.object(ProxmoxClient, "get_instance_config", return_value=instance_config)
assert discovery._get_ip_addresses("qemu", "dummy", "dummy") == (
"192.0.2.25",
"2001:db8::666:77:8888",
)
def test_propagate(
mocker, discovery, nodes, qemus, instance_config, agent_info, networks, inventory
):
mocker.patch.object(ProxmoxClient, "get_nodes", return_value=nodes)
mocker.patch.object(ProxmoxClient, "get_all_vms", return_value=qemus)
mocker.patch.object(ProxmoxClient, "get_instance_config", return_value=instance_config)
mocker.patch.object(ProxmoxClient, "get_agent_info", return_value=agent_info)
mocker.patch.object(ProxmoxClient, "get_network_interfaces", return_value=networks)
assert discovery.propagate() == inventory

View File

@ -0,0 +1,58 @@
"""Test Host class."""
import pytest
from prometheuspvesd.model import Host
pytest_plugins = [
"prometheuspvesd.test.fixtures.fixtures",
]
@pytest.mark.parametrize(
"testinput,expected",
[
(
{
"vmid": 101,
"hostname": "host1",
"ipv4_address": False,
"ipv6_address": False,
"pve_type": "qemu",
},
{
"__meta_pve_vmid": "101",
"__meta_pve_name": "host1",
"__meta_pve_ipv4": "False",
"__meta_pve_ipv6": "False",
"__meta_pve_type": "qemu",
},
),
(
{
"vmid": "202",
"hostname": "host2",
"ipv4_address": "129.168.0.1",
"ipv6_address": "2001:db8:3333:4444:5555:6666:7777:8888",
"pve_type": "qemu",
},
{
"__meta_pve_vmid": "202",
"__meta_pve_name": "host2",
"__meta_pve_ipv4": "129.168.0.1",
"__meta_pve_ipv6": "2001:db8:3333:4444:5555:6666:7777:8888",
"__meta_pve_type": "qemu",
},
),
],
)
def test_host(testinput, expected):
host = Host(
testinput["vmid"],
testinput["hostname"],
testinput["ipv4_address"],
testinput["ipv6_address"],
testinput["pve_type"],
)
assert host.labels == expected

View File

@ -1,7 +1,29 @@
#!/usr/bin/env python3
"""Global utility methods and classes."""
from distutils.util import strtobool
def strtobool(value):
"""Convert a string representation of truth to true or false."""
_map = {
"y": True,
"yes": True,
"t": True,
"true": True,
"on": True,
"1": True,
"n": False,
"no": False,
"f": False,
"false": False,
"off": False,
"0": False,
}
try:
return _map[str(value).lower()]
except KeyError as err:
raise ValueError(f'"{value}" is not a valid bool value') from err
def to_bool(string):
@ -15,5 +37,5 @@ class Singleton(type):
def __call__(cls, *args, **kwargs):
if cls not in cls._instances:
cls._instances[cls] = super(Singleton, cls).__call__(*args, **kwargs)
cls._instances[cls] = super().__call__(*args, **kwargs)
return cls._instances[cls]

View File

@ -10,86 +10,128 @@ classifiers = [
"Natural Language :: English",
"Operating System :: POSIX",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Utilities",
]
description = "Prometheus Service Discovery for Proxmox VE."
documentation = "https://github.com/thegeeklab/prometheus-pve-sd/"
homepage = "https://github.com/thegeeklab/prometheus-pve-sd/"
include = [
"LICENSE",
]
include = ["LICENSE"]
keywords = ["prometheus", "sd", "pve", "metrics"]
license = "MIT"
name = "prometheus-pve-sd"
packages = [
{include = "prometheuspvesd"},
]
packages = [{ include = "prometheuspvesd" }]
readme = "README.md"
repository = "https://github.com/thegeeklab/prometheus-pve-sd/"
version = "0.0.0"
[tool.poetry.dependencies]
anyconfig = "0.11.0"
anyconfig = "0.14.0"
appdirs = "1.4.4"
colorama = "0.4.4"
environs = "9.3.2"
jsonschema = "3.2.0"
nested-lookup = "0.2.22"
proxmoxer = "1.1.1"
python = "^3.6.0"
python-json-logger = "2.0.1"
requests = "2.25.1"
"ruamel.yaml" = "0.17.9"
[tool.poetry.dev-dependencies]
bandit = "1.7.0"
flake8 = "3.9.2"
flake8-blind-except = "0.2.0"
flake8-builtins = "1.5.3"
flake8-docstrings = "1.6.0"
flake8-eradicate = "1.0.0"
flake8-isort = "4.0.0"
flake8-logging-format = "0.6.0"
flake8-pep3101 = "1.3.0"
flake8-polyfill = "1.0.2"
flake8-quotes = "3.2.0"
pep8-naming = "0.11.1"
pydocstyle = "6.1.1"
pytest = "6.2.4"
pytest-cov = "2.12.1"
pytest-mock = "3.6.1"
yapf = "0.31.0"
colorama = "0.4.6"
environs = "11.0.0"
jsonschema = "4.22.0"
nested-lookup = "0.2.25"
prometheus-client = "0.20.0"
proxmoxer = "2.0.1"
python = "^3.8.0"
python-json-logger = "2.0.7"
requests = "2.31.0"
"ruamel.yaml" = "0.18.6"
[tool.poetry.scripts]
prometheus-pve-sd = "prometheuspvesd.cli:main"
[tool.poetry.group.dev.dependencies]
ruff = "0.4.5"
pytest = "8.2.1"
pytest-mock = "3.14.0"
pytest-cov = "5.0.0"
toml = "0.10.2"
[tool.poetry-dynamic-versioning]
enable = true
style = "semver"
vcs = "git"
[tool.isort]
default_section = "THIRDPARTY"
force_single_line = true
line_length = 99
sections = ["FUTURE", "STDLIB", "THIRDPARTY", "FIRSTPARTY", "LOCALFOLDER"]
skip_glob = ["**/.env*", "**/env/*", "**/.venv/*", "**/docs/*"]
[tool.pytest.ini_options]
addopts = "prometheuspvesd --cov=prometheuspvesd --cov-report=xml:coverage.xml --cov-report=term --cov-append --no-cov-on-fail"
filterwarnings = [
"ignore::FutureWarning",
"ignore:.*collections.*:DeprecationWarning",
"ignore:.*pep8.*:FutureWarning",
]
addopts = "prometheuspvesd --cov=prometheuspvesd --cov-report=xml:coverage.xml --cov-report=term-missing --no-cov-on-fail --cov-fail-under=80"
filterwarnings = ["ignore::FutureWarning", "ignore::DeprecationWarning"]
[tool.coverage.run]
omit = ["**/test/*"]
[build-system]
build-backend = "poetry.core.masonry.api"
build-backend = "poetry_dynamic_versioning.backend"
requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning"]
[tool.ruff]
exclude = [
".git",
"__pycache__",
"build",
"dist",
"*.pyc",
"*.egg-info",
".cache",
".eggs",
"env*",
]
line-length = 99
indent-width = 4
[tool.ruff.lint]
# Explanation of errors
#
# D102: Missing docstring in public method
# D103: Missing docstring in public function
# D105: Missing docstring in magic method
# D107: Missing docstring in __init__
# D202: No blank lines allowed after function docstring
# D203: One blank line required before class docstring
# D212: Multi-line docstring summary should start at the first line
ignore = [
"D102",
"D103",
"D105",
"D107",
"D202",
"D203",
"D212",
"UP038",
"RUF012",
]
select = [
"D",
"E",
"F",
"Q",
"W",
"I",
"S",
"BLE",
"N",
"UP",
"B",
"A",
"C4",
"T20",
"SIM",
"RET",
"ARG",
"ERA",
"RUF",
]
[tool.ruff.lint.per-file-ignores]
"test_*.py" = ["S"]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
line-ending = "lf"

View File

@ -1,4 +1,12 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["github>thegeeklab/renovate-presets"]
"extends": ["github>thegeeklab/renovate-presets"],
"packageRules": [
{
"matchManagers": ["woodpecker"],
"matchFileNames": [".woodpecker/test.yml"],
"matchPackageNames": ["docker.io/library/python"],
"enabled": false
}
]
}

View File

@ -1,20 +0,0 @@
[flake8]
# Explanation of errors
#
# D102: Missing docstring in public method
# D103: Missing docstring in public function
# D105: Missing docstring in magic method
# D107: Missing docstring in __init__
# D202: No blank lines allowed after function docstring
# W503:Line break occurred before a binary operator
ignore = D102, D103, D105, D107, D202, W503
max-line-length = 99
inline-quotes = double
exclude = .git, __pycache__, build, dist, test, *.pyc, *.egg-info, .cache, .eggs, env*
[yapf]
based_on_style = google
column_limit = 99
dedent_closing_brackets = true
coalesce_brackets = true
split_before_logical_operator = true