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