[occm] Support Octavia/Amphora Prometheus endpoint creation using annotations
What this PR does / why we need it: Adds the ability to add a Prometheus listener on the Octavia LoadBalancer in order to fetch it with any Prometheus scrapper to get metrics from the LoadBalancer.
This PR brings 4 new annotations:
loadbalancer.openstack.org/metrics-enable: "true" # Enable the listener endpoint on the Octavia LoadBalancer (default false)
loadbalancer.openstack.org/metrics-port: "9101" # Listener's port (default 9100)
loadbalancer.openstack.org/metrics-allow-cidrs: "10.0.0.0/8" # Listener's allowed cidrs (default none) - see below
loadbalancer.openstack.org/load-balancer-vip-address: "10.4.2.3" # Auto-computed field based on Octavia VIP
Why you should have to use loadbalancer.openstack.org/metrics-allow-cidrs
It's strongly recommended to apply an allowed cidrs on the listener. If a Floating IP is attached to the Octavia, the metric endpoint will be exposed publicly. Apply a restriction to the K8S's subnet is recommended.
More detail on the Prometheus listener: https://docs.openstack.org/octavia/latest/user/guides/monitoring.html#monitoring-with-prometheus
Which issue this PR fixes(if applicable): fixes #2465
Special notes for reviewers: A new E2E test has been added.
Release note:
[openstack-cloud-controller-manager] Support Octavia/Amphora Prometheus endpoint creation using annotations
Hi @Lucasgranet. Thanks for your PR.
I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.
Once the patch is verified, the new status will be reflected by the ok-to-test label.
I understand the commands that are listed here.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.
/ok-to-test
Hello,
Have you any feedback or questions about this PR?
Hello, @jichenjc @dulek,
If you have some time, would you mind reviewing this PR please?
Thank you,
/retest
The committers listed above are authorized under a signed CLA.
- :white_check_mark: login: Lucasgranet / name: Lucas Granet (864cdf32aea68076dd1e2de1ac74cf98420cde9b)
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: Once this PR has been reviewed and has the lgtm label, please assign zetaab for approval. For more information see the Code Review Process.
The full list of commands accepted by this bot can be found here.
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
/retest
@Lucasgranet: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:
| Test name | Commit | Details | Required | Rerun command |
|---|---|---|---|---|
| openstack-cloud-controller-manager-e2e-test | 864cdf32aea68076dd1e2de1ac74cf98420cde9b | link | true | /test openstack-cloud-controller-manager-e2e-test |
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.