Run 2 instances of tusd

This commit is contained in:
Abdelhadi Khiati 2018-07-10 23:37:46 +01:00
parent d8cbc9ce6b
commit e527a9b0aa
1 changed files with 20 additions and 3 deletions

View File

@ -1,15 +1,32 @@
apiVersion: extensions/v1beta1 apiVersion: apps/v1
kind: Deployment kind: StatefulSet
metadata: metadata:
name: tusd name: tusd
namespace: tus namespace: tus
spec: spec:
replicas: 1 replicas: 2
serviceName: "tusd"
template: template:
metadata: metadata:
labels: labels:
app: tusd app: tusd
spec: spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: cloud.google.com/gke-preemptible
operator: Exists
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
operator: In
values:
- tusd
topologyKey: kubernetes.io/hostname
containers: containers:
- image: docker.io/tusproject/tusd:latest - image: docker.io/tusproject/tusd:latest
imagePullPolicy: Always imagePullPolicy: Always