kubernetes / kubernetes/cloud-provider-openstack

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

Open
#2,465 29 comments 21 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
720
Forks
687
Avg merge
1d 14h
Merged PRs (30d)
51

Description

**Component:** openstack-cloud-controller-manager (occm)

**FEATURE REQUEST?**:
> /kind feature

As a Kubernetes + occm user I would like to be able to create Prometheus endpoint (a listener with a special protocol "PROMETHEUS") so that I can easily monitor my Octavia Load Balancers using Prometheus.

**What happened**:
Currently the only way to do so is to use Openstack CLI / APIs
`openstack loadbalancer listener create --name stats-listener --protocol PROMETHEUS --protocol-port 9100 --allowed-cidr 10.0.0.0/8 $os_octavia_id `

**What you expected to happen**:
Create the Prometheus endpoint using annotations at Loadbalancer creation (Kubernetes service type LoadBalancer)

Annotations that we suggest to add:
```apiVersion: v1
kind: Service
metadata:
name: octavia-metrics
annotations:
loadbalancer.openstack.org/metrics-enable: "true"
loadbalancer.openstack.org/metrics-port: "9100"
loadbalancer.openstack.org/metrics-allow-cidrs: "10.0.0.0/8, fe80::/10"
loadbalancer.openstack.org/vip-address: "10.4.2.3" # Auto-computed field based on Octavia VIP as it is required for Prometheus configuration or any other solution (currently it is not possible to retrieve private IP of public LBs)
labels:
app: test-octavia
spec:
ports:
- name: client
port: 80
protocol: TCP
targetPort: 80
selector:
app: nginx
type: LoadBalancer
```

**Anything else we need to know?**:
Related Octavia documentation:
https://docs.openstack.org/octavia/latest/user/guides/monitoring.html#monitoring-with-prometheus

As an [Openstack Public Cloud Provider](https://www.openstack.org/marketplace/public-clouds/ovh-group/ovh-public-cloud) we are currently working on a custom CCM implementation, for this reason we can potentially do the PR associated with this request, but we'd like to at least validate the implementation before starting developments.

Contributor guide

Open the contributing guide

Research direction

Start with the proposed Kubernetes Service annotations and the related Octavia Prometheus monitoring documentation linked in the issue. Define the expected annotation behavior, including listener creation, allowed CIDRs, metrics port, and VIP exposure; done means a LoadBalancer Service can create the requested Prometheus endpoint through occm.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cloud, infrastructure
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.