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
|
||||
{% if enable_nodelocaldns_secondary %}
|
||||
- -skipteardown
|
||||
{% else %}
|
||||
{% endif %}
|
||||
ports:
|
||||
- containerPort: 53
|
||||
name: dns
|
||||
@@ -55,10 +55,9 @@ spec:
|
||||
- containerPort: 53
|
||||
name: dns-tcp
|
||||
protocol: TCP
|
||||
- containerPort: 9253
|
||||
- containerPort: {{ nodelocaldns_prometheus_port }}
|
||||
name: metrics
|
||||
protocol: TCP
|
||||
{% endif %}
|
||||
securityContext:
|
||||
privileged: true
|
||||
{% if nodelocaldns_bind_metrics_host_ip %}
|
||||
|
||||
@@ -39,6 +39,10 @@ spec:
|
||||
cpu: {{ nodelocaldns_cpu_requests }}
|
||||
memory: {{ nodelocaldns_memory_requests }}
|
||||
args: [ "-localip", "{{ nodelocaldns_ip }}", "-conf", "/etc/coredns/Corefile", "-upstreamsvc", "coredns", "-skipteardown" ]
|
||||
ports:
|
||||
- containerPort: {{ nodelocaldns_secondary_prometheus_port }}
|
||||
name: metrics
|
||||
protocol: TCP
|
||||
securityContext:
|
||||
privileged: true
|
||||
{% if nodelocaldns_bind_metrics_host_ip %}
|
||||
|
||||
Reference in New Issue
Block a user