mirror of https://github.com/kubernetes/kops.git
Merge pull request #9663 from hakman/canal-typha-affinity
Prefer nodes with "master" role for Canal Typha pods
This commit is contained in:
commit
197b6a68e9
|
|
@ -16163,15 +16163,22 @@ spec:
|
|||
annotations:
|
||||
cluster-autoscaler.kubernetes.io/safe-to-evict: 'true'
|
||||
spec:
|
||||
affinity:
|
||||
nodeAffinity:
|
||||
preferredDuringSchedulingIgnoredDuringExecution:
|
||||
- weight: 100
|
||||
preference:
|
||||
matchExpressions:
|
||||
- key: node-role.kubernetes.io/master
|
||||
operator: Exists
|
||||
nodeSelector:
|
||||
kubernetes.io/os: linux
|
||||
kubernetes.io/role: master
|
||||
hostNetwork: true
|
||||
tolerations:
|
||||
# Mark the pod as a critical add-on for rescheduling.
|
||||
- key: CriticalAddonsOnly
|
||||
operator: Exists
|
||||
- key: "node-role.kubernetes.io/master"
|
||||
- key: node-role.kubernetes.io/master
|
||||
effect: NoSchedule
|
||||
# Since Calico can't network a pod until Typha is up, we need to run Typha itself
|
||||
# as a host-networked pod.
|
||||
|
|
|
|||
|
|
@ -531,15 +531,22 @@ spec:
|
|||
annotations:
|
||||
cluster-autoscaler.kubernetes.io/safe-to-evict: 'true'
|
||||
spec:
|
||||
affinity:
|
||||
nodeAffinity:
|
||||
preferredDuringSchedulingIgnoredDuringExecution:
|
||||
- weight: 100
|
||||
preference:
|
||||
matchExpressions:
|
||||
- key: node-role.kubernetes.io/master
|
||||
operator: Exists
|
||||
nodeSelector:
|
||||
kubernetes.io/os: linux
|
||||
kubernetes.io/role: master
|
||||
hostNetwork: true
|
||||
tolerations:
|
||||
# Mark the pod as a critical add-on for rescheduling.
|
||||
- key: CriticalAddonsOnly
|
||||
operator: Exists
|
||||
- key: "node-role.kubernetes.io/master"
|
||||
- key: node-role.kubernetes.io/master
|
||||
effect: NoSchedule
|
||||
# Since Calico can't network a pod until Typha is up, we need to run Typha itself
|
||||
# as a host-networked pod.
|
||||
|
|
|
|||
|
|
@ -782,7 +782,7 @@ func (b *BootstrapChannelBuilder) buildAddons() *channelsapi.Addons {
|
|||
"k8s-1.9": "3.2.3-kops.1",
|
||||
"k8s-1.12": "3.7.5-kops.2",
|
||||
"k8s-1.15": "3.12.2-kops.1",
|
||||
"k8s-1.16": "3.13.4-kops.1",
|
||||
"k8s-1.16": "3.13.4-kops.2",
|
||||
}
|
||||
{
|
||||
id := "k8s-1.9"
|
||||
|
|
|
|||
Loading…
Reference in New Issue