From fd02a053c5597bdc78d1cb79c5d9a750c2ec5393 Mon Sep 17 00:00:00 2001 From: Chris Roat <1053153+chrisroat@users.noreply.github.com> Date: Thu, 6 Jan 2022 21:12:01 -0800 Subject: [PATCH] Allows deployment to spot instances --- deploy/k8s.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/deploy/k8s.yaml b/deploy/k8s.yaml index 6b967bcd..f556a8b1 100644 --- a/deploy/k8s.yaml +++ b/deploy/k8s.yaml @@ -37,7 +37,7 @@ spec: serviceAccountName: node-termination-handler affinity: nodeAffinity: - # Restrict to GPU nodes or preemptible nodes + # Restrict to GPU nodes or preemptible nodes or spot nodes requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: @@ -46,6 +46,9 @@ spec: - matchExpressions: - key: cloud.google.com/gke-preemptible operator: Exists + - matchExpressions: + - key: cloud.google.com/gke-spot + operator: Exists containers: # TODO: Update to an official image once the build is automated via GCB. - image: k8s.gcr.io/gke-node-termination-handler@sha256:aca12d17b222dfed755e28a44d92721e477915fb73211d0a0f8925a1fa847cca