tusd/.infra/kube/tusd-kube.yaml

116 lines
2.3 KiB
YAML
Raw Normal View History

2018-01-06 15:53:24 +00:00
kind: PersistentVolumeClaim
apiVersion: v1
2018-01-06 15:53:24 +00:00
metadata:
2018-05-04 18:00:00 +00:00
name: standard-tusd
2018-01-11 11:03:14 +00:00
namespace: tus
2018-01-06 15:53:24 +00:00
spec:
accessModes:
2018-04-25 14:00:23 +00:00
- ReadWriteOnce
2018-05-04 18:00:00 +00:00
storageClassName: "standard"
2018-01-06 15:53:24 +00:00
resources:
requests:
2018-01-11 23:58:59 +00:00
storage: 20Gi
2018-01-06 15:53:24 +00:00
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: tusd
namespace: tus
spec:
replicas: 1
strategy:
2018-04-25 14:00:23 +00:00
type: Recreate
2018-01-06 15:53:24 +00:00
template:
metadata:
labels:
app: tusd
spec:
containers:
- image: docker.io/tusproject/tusd:latest
imagePullPolicy: Always
args: ["-port=8080","-behind-proxy","-max-size=20000000000"]
2018-01-06 15:53:24 +00:00
name: tusd
resources:
limits:
memory: "2Gi"
requests:
memory: "1Gi"
ports:
2018-02-16 13:46:20 +00:00
- name: tusd-web
containerPort: 8080
2018-01-06 15:53:24 +00:00
securityContext:
2018-01-11 23:58:59 +00:00
runAsUser: 0
fsGroup: 0
2018-01-06 15:53:24 +00:00
volumeMounts:
- name: tusd-disk
mountPath: /srv/tusd-data
volumes:
- name: tusd-disk
persistentVolumeClaim:
2018-05-04 18:00:00 +00:00
claimName: standard-tusd
2018-01-06 15:53:24 +00:00
---
apiVersion: v1
kind: Service
metadata:
name: tusd
namespace: tus
spec:
ports:
2018-02-16 13:46:20 +00:00
- name: tusd-web
port: 80
2018-01-06 15:53:24 +00:00
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