2018-01-06 15:53:24 +00:00
|
|
|
apiVersion: v1
|
2018-01-11 10:08:20 +00:00
|
|
|
kind: PersistentVolume
|
|
|
|
metadata:
|
|
|
|
name: nfs-tusd
|
|
|
|
namespace: tusd
|
|
|
|
spec:
|
|
|
|
capacity:
|
|
|
|
storage: 50Gi
|
|
|
|
accessModes:
|
|
|
|
- ReadWriteMany
|
|
|
|
nfs:
|
|
|
|
server: NFS_SERVER_IP
|
|
|
|
path: "/tusd"
|
|
|
|
|
|
|
|
---
|
2018-01-06 15:53:24 +00:00
|
|
|
kind: PersistentVolumeClaim
|
2018-01-11 10:08:20 +00:00
|
|
|
apiVersion: v1
|
2018-01-06 15:53:24 +00:00
|
|
|
metadata:
|
2018-01-11 10:08:20 +00:00
|
|
|
name: nfs-tusd
|
|
|
|
namespace: tusd
|
2018-01-06 15:53:24 +00:00
|
|
|
spec:
|
|
|
|
accessModes:
|
2018-01-11 10:08:20 +00:00
|
|
|
- ReadWriteMany
|
|
|
|
storageClassName: ""
|
2018-01-06 15:53:24 +00:00
|
|
|
resources:
|
|
|
|
requests:
|
|
|
|
storage: 50Gi
|
|
|
|
---
|
|
|
|
apiVersion: extensions/v1beta1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
name: tusd
|
|
|
|
namespace: tus
|
|
|
|
spec:
|
|
|
|
replicas: 1
|
|
|
|
minReadySeconds: 10
|
|
|
|
strategy:
|
|
|
|
type: RollingUpdate
|
|
|
|
rollingUpdate:
|
2018-01-11 10:08:20 +00:00
|
|
|
maxSurge: 2
|
2018-01-06 15:53:24 +00:00
|
|
|
maxUnavailable: 0
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: tusd
|
|
|
|
spec:
|
|
|
|
containers:
|
|
|
|
- image: docker.io/tusproject/tusd:latest
|
|
|
|
imagePullPolicy: Always
|
|
|
|
args: ["-port=8080","-behind-proxy","-max-size=1000000000"]
|
|
|
|
name: tusd
|
|
|
|
resources:
|
|
|
|
limits:
|
|
|
|
cpu: 0.7
|
|
|
|
memory: "2Gi"
|
|
|
|
requests:
|
|
|
|
cpu: 0.5
|
|
|
|
memory: "1Gi"
|
|
|
|
ports:
|
|
|
|
- containerPort: 8080
|
|
|
|
securityContext:
|
|
|
|
runAsUser: 1000
|
|
|
|
fsGroup: 1000
|
|
|
|
volumeMounts:
|
|
|
|
- name: tusd-disk
|
|
|
|
mountPath: /srv/tusd-data
|
|
|
|
volumes:
|
|
|
|
- name: tusd-disk
|
|
|
|
persistentVolumeClaim:
|
2018-01-11 10:08:20 +00:00
|
|
|
claimName: nfs-tusd
|
2018-01-06 15:53:24 +00:00
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: Service
|
|
|
|
metadata:
|
|
|
|
name: tusd
|
|
|
|
namespace: tus
|
|
|
|
spec:
|
|
|
|
ports:
|
|
|
|
- port: 80
|
|
|
|
targetPort: 8080
|
|
|
|
protocol: TCP
|
|
|
|
selector:
|
|
|
|
app: tusd
|
|
|
|
---
|
|
|
|
apiVersion: extensions/v1beta1
|
|
|
|
kind: Ingress
|
|
|
|
metadata:
|
|
|
|
name: tusd
|
|
|
|
namespace: tus
|
|
|
|
annotations:
|
|
|
|
kubernetes.io/tls-acme: "true"
|
|
|
|
kubernetes.io/ingress.class: "nginx"
|
2018-01-08 07:21:35 +00:00
|
|
|
nginx.ingress.kubernetes.io/proxy-body-size: 0m
|
2018-01-06 15:53:24 +00:00
|
|
|
nginx.ingress.kubernetes.io/proxy-connect-timeout: "300"
|
|
|
|
nginx.ingress.kubernetes.io/proxy-read-timeout: "300"
|
|
|
|
nginx.ingress.kubernetes.io/proxy-request-buffering: "off"
|
|
|
|
nginx.ingress.kubernetes.io/proxy-send-timeout: "300"
|
|
|
|
spec:
|
|
|
|
tls:
|
|
|
|
- hosts:
|
|
|
|
- tusd.tus.io
|
|
|
|
secretName: tusd-tls
|
|
|
|
- hosts:
|
|
|
|
- master.tus.io
|
|
|
|
secretName: master-tls
|
|
|
|
rules:
|
|
|
|
- host: tusd.tus.io
|
|
|
|
http:
|
|
|
|
paths:
|
|
|
|
- path: /
|
|
|
|
backend:
|
|
|
|
serviceName: tusd
|
|
|
|
servicePort: 80
|
|
|
|
- host: master.tus.io
|
|
|
|
http:
|
|
|
|
paths:
|
|
|
|
- path: /
|
|
|
|
backend:
|
|
|
|
serviceName: tusd
|
|
|
|
servicePort: 80
|
|
|
|
---
|
|
|
|
apiVersion: autoscaling/v1
|
|
|
|
kind: HorizontalPodAutoscaler
|
|
|
|
metadata:
|
|
|
|
name: tusd
|
|
|
|
namespace: tus
|
|
|
|
spec:
|
|
|
|
scaleTargetRef:
|
|
|
|
apiVersion: apps/v1beta1
|
|
|
|
kind: Deployment
|
|
|
|
name: tusd
|
|
|
|
minReplicas: 1
|
|
|
|
maxReplicas: 5
|
|
|
|
targetCPUUtilizationPercentage: 90
|