mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-05-25 01:27:47 -02:30
nodelocaldns: allow a secondary pod for nodelocaldns for local-HA (#8100)
* nodelocaldns: allow a secondary pod for nodelocaldns for local-HA * CI: add job to test nodelocaldns secondary
This commit is contained in:
@@ -16,7 +16,7 @@ spec:
|
||||
k8s-app: nodelocaldns
|
||||
annotations:
|
||||
prometheus.io/scrape: 'true'
|
||||
prometheus.io/port: '9253'
|
||||
prometheus.io/port: '{{ nodelocaldns_prometheus_port }}'
|
||||
spec:
|
||||
nodeSelector:
|
||||
{{ nodelocaldns_ds_nodeselector }}
|
||||
@@ -38,16 +38,16 @@ spec:
|
||||
requests:
|
||||
cpu: {{ nodelocaldns_cpu_requests }}
|
||||
memory: {{ nodelocaldns_memory_requests }}
|
||||
args: [ "-localip", "{{ nodelocaldns_ip }}", "-conf", "/etc/coredns/Corefile", "-upstreamsvc", "coredns" ]
|
||||
securityContext:
|
||||
privileged: true
|
||||
{% if nodelocaldns_bind_metrics_host_ip %}
|
||||
env:
|
||||
- name: MY_HOST_IP
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: status.hostIP
|
||||
{% endif %}
|
||||
args:
|
||||
- -localip
|
||||
- {{ nodelocaldns_ip }}
|
||||
- -conf
|
||||
- /etc/coredns/Corefile
|
||||
- -upstreamsvc
|
||||
- coredns
|
||||
{% if enable_nodelocaldns_secondary %}
|
||||
- -skipteardown
|
||||
{% else %}
|
||||
ports:
|
||||
- containerPort: 53
|
||||
name: dns
|
||||
@@ -58,6 +58,16 @@ spec:
|
||||
- containerPort: 9253
|
||||
name: metrics
|
||||
protocol: TCP
|
||||
{% endif %}
|
||||
securityContext:
|
||||
privileged: true
|
||||
{% if nodelocaldns_bind_metrics_host_ip %}
|
||||
env:
|
||||
- name: MY_HOST_IP
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: status.hostIP
|
||||
{% endif %}
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
host: {{ nodelocaldns_ip }}
|
||||
|
||||
Reference in New Issue
Block a user