Configure AIAP pod anti-affinity

This adds an anti-affinity rule to airship-in-a-pod, so that only
a single AIAP can run on a given node at a time.  This is currently
required because of the way AIAP configures host mounts; future work
will allow multiple AIAPs to co-exist on a node, at which point this
anti-affinity rule can be taken out.

Change-Id: Ib8f5062a3bd2b4ea6d0a95c42cce08ac9789c362
changes/23/807223/1
Matt McEuen 1 year ago
parent d78f3e5c11
commit a67286151f
  1. 10
      tools/airship-in-a-pod/examples/base/airship-in-a-pod.yaml

@ -14,7 +14,17 @@ apiVersion: v1
kind: Pod
metadata:
name: airship-in-a-pod
labels:
aiap: aiap
spec:
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: aiap
operator: Exists
topologyKey: kubernetes.io/hostname
hostNetwork: false
restartPolicy: Never
containers:

Loading…
Cancel
Save