Skip to content

Commit

Permalink
fix(installer): add pod affinity (#2175)
Browse files Browse the repository at this point in the history
Co-authored-by: root <[email protected]>
  • Loading branch information
Lis and root authored Nov 15, 2022
1 parent 7b9e7b0 commit 8812b3c
Show file tree
Hide file tree
Showing 15 changed files with 165 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,17 @@ spec:
- matchExpressions:
- key: node-role.kubernetes.io/master
operator: Exists
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
labelSelector:
matchExpressions:
- key: app
operator: In
values:
- tke-platform-api
topologyKey: kubernetes.io/hostname
weight: 1
containers:
- name: tke-platform-api
image: {{ .Values.api.image }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,17 @@ spec:
- matchExpressions:
- key: node-role.kubernetes.io/master
operator: Exists
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
labelSelector:
matchExpressions:
- key: app
operator: In
values:
- tke-platform-controller
topologyKey: kubernetes.io/hostname
weight: 1
initContainers:
- command:
- sh
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,17 @@ spec:
- matchExpressions:
- key: node-role.kubernetes.io/master
operator: Exists
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
labelSelector:
matchExpressions:
- key: app
operator: In
values:
- tke-application-api
topologyKey: kubernetes.io/hostname
weight: 1
containers:
- name: tke-application-api
image: {{ .Image }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,17 @@ spec:
- matchExpressions:
- key: node-role.kubernetes.io/master
operator: Exists
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
labelSelector:
matchExpressions:
- key: app
operator: In
values:
- tke-application-controller
topologyKey: kubernetes.io/hostname
weight: 1
containers:
- name: tke-application-controller
image: {{ .Image }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,17 @@ spec:
- matchExpressions:
- key: node-role.kubernetes.io/master
operator: Exists
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
labelSelector:
matchExpressions:
- key: app
operator: In
values:
- tke-audit-api
topologyKey: kubernetes.io/hostname
weight: 1
containers:
- name: tke-audit-api
image: {{ .Image }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,17 @@ spec:
- matchExpressions:
- key: node-role.kubernetes.io/master
operator: Exists
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
labelSelector:
matchExpressions:
- key: app
operator: In
values:
- tke-business-api
topologyKey: kubernetes.io/hostname
weight: 1
containers:
- name: tke-business-api
image: {{ .Image }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,17 @@ spec:
- matchExpressions:
- key: node-role.kubernetes.io/master
operator: Exists
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
labelSelector:
matchExpressions:
- key: app
operator: In
values:
- tke-business-controller
topologyKey: kubernetes.io/hostname
weight: 1
containers:
- name: tke-business-controller
image: {{ .Image }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,17 @@ spec:
- matchExpressions:
- key: node-role.kubernetes.io/master
operator: Exists
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
labelSelector:
matchExpressions:
- key: app
operator: In
values:
- tke-logagent-api
topologyKey: kubernetes.io/hostname
weight: 1
containers:
- name: tke-logagent-api
image: {{ .Image }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,17 @@ spec:
- matchExpressions:
- key: node-role.kubernetes.io/master
operator: Exists
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
labelSelector:
matchExpressions:
- key: app
operator: In
values:
- tke-logagent-controller
topologyKey: kubernetes.io/hostname
weight: 1
containers:
- name: tke-logagent-controller
image: {{ .Image }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,17 @@ spec:
- matchExpressions:
- key: node-role.kubernetes.io/master
operator: Exists
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
labelSelector:
matchExpressions:
- key: app
operator: In
values:
- tke-mesh-api
topologyKey: kubernetes.io/hostname
weight: 1
containers:
- name: tke-mesh-api
image: {{ .Image }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,17 @@ spec:
- matchExpressions:
- key: node-role.kubernetes.io/master
operator: Exists
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
labelSelector:
matchExpressions:
- key: app
operator: In
values:
- tke-mesh-controller
topologyKey: kubernetes.io/hostname
weight: 1
containers:
- name: tke-mesh-controller
image: {{ .Image }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,17 @@ spec:
- matchExpressions:
- key: node-role.kubernetes.io/master
operator: Exists
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
labelSelector:
matchExpressions:
- key: app
operator: In
values:
- tke-monitor-api
topologyKey: kubernetes.io/hostname
weight: 1
containers:
- name: tke-monitor-api
image: {{ .Image }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,17 @@ spec:
- matchExpressions:
- key: node-role.kubernetes.io/master
operator: Exists
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
labelSelector:
matchExpressions:
- key: app
operator: In
values:
- tke-monitor-controller
topologyKey: kubernetes.io/hostname
weight: 1
containers:
- name: tke-monitor-controller
image: {{ .Image }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,17 @@ spec:
- matchExpressions:
- key: node-role.kubernetes.io/master
operator: Exists
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
labelSelector:
matchExpressions:
- key: app
operator: In
values:
- tke-notify-api
topologyKey: kubernetes.io/hostname
weight: 1
containers:
- name: tke-notify-api
image: {{ .Image }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,17 @@ spec:
- matchExpressions:
- key: node-role.kubernetes.io/master
operator: Exists
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
labelSelector:
matchExpressions:
- key: app
operator: In
values:
- tke-notify-controller
topologyKey: kubernetes.io/hostname
weight: 1
containers:
- name: tke-notify-controller
image: {{ .Image }}
Expand Down

0 comments on commit 8812b3c

Please sign in to comment.