mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-05-19 23:07:47 -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:
@@ -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