4 Commits

Author SHA1 Message Date
Jaromir Wysoglad
6047081ec1 Add TLS support.
This adds a new config option: "prometheus_ca_cert". If this
option is set, then it forces the client to use https to access
prometheus and it uses the specified ca cert to verify the
prometheus' certificate.

Change-Id: Iccb911a590d5b3b9a4c6ac08c4d020641c8094a9
2024-02-26 08:17:08 -05:00
Erno Kuvaja
5746f69ddc Flake8 changes
Adding comments for all ignores and extensions.
Adding extensions from OpenStack Hacking.
Fixing few breakages of those added extensions.

Change-Id: Idacee2ca555411e33b65817fb9245d130cf36574
2023-10-18 12:23:49 +01:00
Jaromír Wysoglad
53b335aaca
Add automated unit testing and a set of tests (#9)
* Add unit testing

* Fix code according to CI

This includes:
  - formating changes
  - rewording of some doc strings
  - adding support to {label!~'value'} in rbac

* Add unit tests automation

* Fix CI automation

* Add requirements.txt
2023-09-05 14:54:33 +02:00
Jaromír Wysoglad
a580772449
Prometheus interaction (#7)
* Remove old observability client

* Add initial functionality for prometheus querying

* Fix a copy-paste error in get_client()

* Add additional functionality.

This commit adds:
    - commands:
        delete
        clear-tombstones
        snapshot
    - Better rbac injection as well as a possibility
      to disable rbac.
    - Configuration of prometheus_client through
      env variables and /etc/openstack/prometheus.yaml

* Make README up to date

* Implement Martin's PR comments

* Implement better support for label values in rbac

* PEP8
2023-08-03 15:30:19 +02:00