Skip to content

Commit

Permalink
Merge pull request #9663 from hakman/canal-typha-affinity
Browse files Browse the repository at this point in the history
Prefer nodes with "master" role for Canal Typha pods
  • Loading branch information
k8s-ci-robot committed Aug 1, 2020
2 parents 492696f + 1c6597e commit 197b6a6
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 5 deletions.
11 changes: 9 additions & 2 deletions upup/models/bindata.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion upup/pkg/fi/cloudup/bootstrapchannelbuilder.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 197b6a6

Please sign in to comment.