Prevent gitea pods from being co-scheduled

For scale out purposes, we only want one gitea pod per underlying
kubernetes node. Use podAntiAffinity to accomplish this.

Change-Id: Icd8f70cf7e1640e58133f67e8a519267ac3b36d3
This commit is contained in:
Monty Taylor 2019-01-09 20:13:19 +00:00 committed by James E. Blair
parent 35851e2053
commit 3513dfb9fc
1 changed files with 10 additions and 0 deletions

View File

@ -71,3 +71,13 @@ spec:
- name: secrets
secret:
secretName: gitea-app
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
operator: In
values:
- gitea
topologyKey: "kubernetes.io/hostname"