coredns: set deploy replicas when dns autoscaler is disabled (#12387)

Allow setting deployment replicas through `coredns_replicas` when
`enable_dns_autoscaler` is set to false.

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
This commit is contained in:
Seena Fallah
2025-09-20 12:50:14 +02:00
committed by GitHub
parent fae4e08f35
commit 13c70d3a58
2 changed files with 5 additions and 0 deletions

View File

@@ -29,6 +29,8 @@ coredns_default_zone_cache_block: |
cache 30
coredns_pod_disruption_budget: false
# when enable_dns_autoscaler is false, coredns_replicas is used to set the number of replicas
coredns_replicas: 2
# value for coredns pdb
coredns_pod_disruption_budget_max_unavailable: "30%"
deploy_coredns: true

View File

@@ -9,6 +9,9 @@ metadata:
addonmanager.kubernetes.io/mode: Reconcile
kubernetes.io/name: "coredns{{ coredns_ordinal_suffix }}"
spec:
{% if not enable_dns_autoscaler %}
replicas: {{ coredns_replicas }}
{% endif %}
strategy:
type: RollingUpdate
rollingUpdate: