mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2025-12-13 21:34:40 +03:00
Ensure metrics port exists for nodelocaldns/nodelocaldns-second daemonsets (#11998)
- update metrics port to use port variable - unconditionally define ports
This commit is contained in:
@@ -47,7 +47,7 @@ spec:
|
|||||||
- coredns
|
- coredns
|
||||||
{% if enable_nodelocaldns_secondary %}
|
{% if enable_nodelocaldns_secondary %}
|
||||||
- -skipteardown
|
- -skipteardown
|
||||||
{% else %}
|
{% endif %}
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 53
|
- containerPort: 53
|
||||||
name: dns
|
name: dns
|
||||||
@@ -55,10 +55,9 @@ spec:
|
|||||||
- containerPort: 53
|
- containerPort: 53
|
||||||
name: dns-tcp
|
name: dns-tcp
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
- containerPort: 9253
|
- containerPort: {{ nodelocaldns_prometheus_port }}
|
||||||
name: metrics
|
name: metrics
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
{% endif %}
|
|
||||||
securityContext:
|
securityContext:
|
||||||
privileged: true
|
privileged: true
|
||||||
{% if nodelocaldns_bind_metrics_host_ip %}
|
{% if nodelocaldns_bind_metrics_host_ip %}
|
||||||
|
|||||||
@@ -39,6 +39,10 @@ spec:
|
|||||||
cpu: {{ nodelocaldns_cpu_requests }}
|
cpu: {{ nodelocaldns_cpu_requests }}
|
||||||
memory: {{ nodelocaldns_memory_requests }}
|
memory: {{ nodelocaldns_memory_requests }}
|
||||||
args: [ "-localip", "{{ nodelocaldns_ip }}", "-conf", "/etc/coredns/Corefile", "-upstreamsvc", "coredns", "-skipteardown" ]
|
args: [ "-localip", "{{ nodelocaldns_ip }}", "-conf", "/etc/coredns/Corefile", "-upstreamsvc", "coredns", "-skipteardown" ]
|
||||||
|
ports:
|
||||||
|
- containerPort: {{ nodelocaldns_secondary_prometheus_port }}
|
||||||
|
name: metrics
|
||||||
|
protocol: TCP
|
||||||
securityContext:
|
securityContext:
|
||||||
privileged: true
|
privileged: true
|
||||||
{% if nodelocaldns_bind_metrics_host_ip %}
|
{% if nodelocaldns_bind_metrics_host_ip %}
|
||||||
|
|||||||
Reference in New Issue
Block a user