mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2025-12-14 22:04:43 +03:00
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:
@@ -29,6 +29,8 @@ coredns_default_zone_cache_block: |
|
|||||||
cache 30
|
cache 30
|
||||||
|
|
||||||
coredns_pod_disruption_budget: false
|
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
|
# value for coredns pdb
|
||||||
coredns_pod_disruption_budget_max_unavailable: "30%"
|
coredns_pod_disruption_budget_max_unavailable: "30%"
|
||||||
deploy_coredns: true
|
deploy_coredns: true
|
||||||
|
|||||||
@@ -9,6 +9,9 @@ metadata:
|
|||||||
addonmanager.kubernetes.io/mode: Reconcile
|
addonmanager.kubernetes.io/mode: Reconcile
|
||||||
kubernetes.io/name: "coredns{{ coredns_ordinal_suffix }}"
|
kubernetes.io/name: "coredns{{ coredns_ordinal_suffix }}"
|
||||||
spec:
|
spec:
|
||||||
|
{% if not enable_dns_autoscaler %}
|
||||||
|
replicas: {{ coredns_replicas }}
|
||||||
|
{% endif %}
|
||||||
strategy:
|
strategy:
|
||||||
type: RollingUpdate
|
type: RollingUpdate
|
||||||
rollingUpdate:
|
rollingUpdate:
|
||||||
|
|||||||
Reference in New Issue
Block a user