Browse Source

Feat: add dns_autoscaler_affinity remove in-place values

Upstream has removed affinity, and fix upgrade failing test.

Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
pull/12165/head
ChengHao Yang 5 months ago
parent
commit
2907936c85
Failed to extract signature
2 changed files with 2 additions and 15 deletions
  1. 1
      roles/kubernetes-apps/ansible/defaults/main.yml
  2. 16
      roles/kubernetes-apps/ansible/templates/dns-autoscaler.yml.j2

1
roles/kubernetes-apps/ansible/defaults/main.yml

@ -65,6 +65,7 @@ dns_autoscaler_cpu_requests: 20m
dns_autoscaler_memory_requests: 10Mi
dns_autoscaler_deployment_nodeselector: "kubernetes.io/os: linux"
# dns_autoscaler_extra_tolerations: [{effect: NoSchedule, operator: "Exists"}]
dns_autoscaler_affinity: {}
# etcd metrics
# etcd_metrics_service_labels:

16
roles/kubernetes-apps/ansible/templates/dns-autoscaler.yml.j2

@ -48,21 +48,7 @@ spec:
{{ dns_autoscaler_extra_tolerations | list | to_nice_yaml(indent=2) | indent(8) }}
{% endif %}
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- topologyKey: "kubernetes.io/hostname"
labelSelector:
matchLabels:
k8s-app: dns-autoscaler{{ coredns_ordinal_suffix }}
nodeAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
preference:
matchExpressions:
- key: node-role.kubernetes.io/control-plane
operator: In
values:
- ""
{{ dns_autoscaler_affinity | to_nice_yaml(indent=2) | indent(8) }}
containers:
- name: autoscaler
image: "{{ dnsautoscaler_image_repo }}:{{ dnsautoscaler_image_tag }}"

Loading…
Cancel
Save