kube-apiserver: remove pod anti affinity
With single controller node they are not needed, as they won't be
spreaded and with multiple, they will be installed as a DaemonSet, so
they are not needed either.
@@ -58,37 +58,6 @@ spec:
checkpointer.alpha.coreos.com/checkpoint: "true"
seccomp.security.alpha.kubernetes.io/pod: 'docker/default'
spec:
- affinity:
- podAntiAffinity:
- {{- if eq (int .Values.apiserver.replicas) 1 }}
- preferredDuringSchedulingIgnoredDuringExecution:
- - weight: 100
- podAffinityTerm:
- labelSelector:
- matchExpressions:
- - key: tier
- operator: In
- values:
- - controlplane
- - key: k8s-app
- operator: In
- values:
- - kube-apiserver
- topologyKey: kubernetes.io/hostname
- {{- else }}
- requiredDuringSchedulingIgnoredDuringExecution:
- - labelSelector:
- matchExpressions:
- - key: tier
- operator: In
- values:
- - controlplane
- - key: k8s-app
- operator: In
- values:
- - kube-apiserver
- topologyKey: kubernetes.io/hostname
- {{- end }}
hostNetwork: true
nodeSelector:
node.kubernetes.io/master: ""
