kube-vip: optional Prometheus metrics (default port 2112) (#13229)

Add kube_vip_metrics_enabled and kube_vip_metrics_port; wire
prometheus_server and container port in the static pod manifest.
Default metrics port to 2112 to match kube-vip upstream. Document
and sample inventory updated.
This commit is contained in:
Sumit Solanki
2026-05-19 11:15:02 +05:30
committed by GitHub
parent 17f270325d
commit 7fd29b5529
4 changed files with 24 additions and 0 deletions

View File

@@ -109,11 +109,21 @@ spec:
{% if kube_vip_lb_fwdmethod %}
- name: lb_fwdmethod
value: {{ kube_vip_lb_fwdmethod | string | to_json }}
{% endif %}
{% if kube_vip_metrics_enabled %}
- name: prometheus_server
value: {{ (':' ~ (kube_vip_metrics_port | string)) | to_json }}
{% endif %}
image: {{ kube_vip_image_repo }}:{{ kube_vip_image_tag }}
imagePullPolicy: {{ k8s_image_pull_policy }}
name: kube-vip
resources: {}
{% if kube_vip_metrics_enabled %}
ports:
- name: metrics
containerPort: {{ kube_vip_metrics_port }}
protocol: TCP
{% endif %}
{% if kube_vip_lb_fwdmethod == "masquerade" %}
securityContext:
privileged: true