mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-06-04 14:38:06 -02:30
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:
@@ -88,6 +88,9 @@ kube_vip_retryperiod: 1
|
||||
kube_vip_enable_node_labeling: false
|
||||
kube_vip_bgp_sourceip:
|
||||
kube_vip_bgp_sourceif:
|
||||
kube_vip_metrics_enabled: false
|
||||
# TCP port for kube-vip Prometheus metrics; manifest sets prometheus_server to :PORT (same as kube-vip upstream default, see cmd/kube-vip.go).
|
||||
kube_vip_metrics_port: 2112
|
||||
|
||||
# Requests for load balancer app
|
||||
loadbalancer_apiserver_memory_requests: 32M
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user