[gold] Add anti-affinity to improve uptime

This will require that each of the 3 pods (replicas) of
baselineserver run on different nodes (machines), so if
a node goes bad (like it did yesterday) we shouldn't have
as catastrophic of losses.

https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity

Change-Id: If51f68e921c6b1d52492cdd15c65517c0ff5537f
Reviewed-on: https://skia-review.googlesource.com/c/buildbot/+/299856
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
Auto-Submit: Kevin Lubick <kjlubick@google.com>
diff --git a/golden/k8s-config-templates/gold-baselineserver-template.yaml b/golden/k8s-config-templates/gold-baselineserver-template.yaml
index 92599d0..a96fd04 100644
--- a/golden/k8s-config-templates/gold-baselineserver-template.yaml
+++ b/golden/k8s-config-templates/gold-baselineserver-template.yaml
@@ -34,6 +34,16 @@
         prometheus.io.scrape: "true"
         prometheus.io.port: "20000"
     spec:
+      affinity:
+        podAntiAffinity:
+          requiredDuringSchedulingIgnoredDuringExecution:
+            - labelSelector:
+                matchExpressions:
+                  - key: "app"
+                    operator: In
+                    values:
+                      - gold-{{.INSTANCE_ID}}-baselineserver
+              topologyKey: "kubernetes.io/hostname"
       automountServiceAccountToken: false
       securityContext:
         runAsUser: 2000 # aka skia