cloud-provider-openstack icon indicating copy to clipboard operation
cloud-provider-openstack copied to clipboard

[occm] Support Octavia/Amphora Prometheus endpoint creation using annotations

Open Lucasgranet opened this issue 1 year ago • 9 comments

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

Lucasgranet avatar Aug 22 '24 13:08 Lucasgranet

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.

k8s-ci-robot avatar Aug 22 '24 13:08 k8s-ci-robot

/ok-to-test

jichenjc avatar Sep 03 '24 01:09 jichenjc

Hello,

Have you any feedback or questions about this PR?

Lucasgranet avatar Sep 10 '24 08:09 Lucasgranet

Hello, @jichenjc @dulek,

If you have some time, would you mind reviewing this PR please?

Thank you,

Lucasgranet avatar Oct 15 '24 12:10 Lucasgranet

/retest

Lucasgranet avatar Jan 06 '25 15:01 Lucasgranet

CLA Signed

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.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

k8s-ci-robot avatar May 13 '25 06:05 k8s-ci-robot

/retest

Lucasgranet avatar May 30 '25 09:05 Lucasgranet

@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.

k8s-ci-robot avatar Oct 31 '25 16:10 k8s-ci-robot