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

124 lines
2.8 KiB
YAML
Raw Normal View History

2018-07-10 22:46:50 +00:00
apiVersion: extensions/v1beta1
kind: Deployment
2018-01-06 15:53:24 +00:00
metadata:
name: tusd
namespace: tus
spec:
replicas: 1
2018-01-06 15:53:24 +00:00
template:
metadata:
labels:
app: tusd
spec:
2019-05-08 03:06:26 +00:00
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: cloud.google.com/gke-preemptible
operator: DoesNotExist
2018-01-06 15:53:24 +00:00
containers:
- image: docker.io/tusproject/tusd:latest
imagePullPolicy: Always
args: ["-s3-bucket","tusdtest.transloadit.com","-port=8080","-behind-proxy","-max-size=20000000000","-timeout=6000"]
2018-01-06 15:53:24 +00:00
name: tusd
resources:
limits:
memory: "2Gi"
# requests:
# memory: "1Gi"
2018-01-06 15:53:24 +00:00
ports:
2018-02-16 13:46:20 +00:00
- name: tusd-web
containerPort: 8080
2018-07-10 22:21:57 +00:00
envFrom:
- configMapRef:
name: tusd-env
- secretRef:
name: tusd-s3
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:
2018-07-10 22:21:57 +00:00
- name: tusd-account
mountPath: /gcs
2018-01-06 15:53:24 +00:00
volumes:
2018-07-10 22:21:57 +00:00
- name: tusd-account
secret:
secretName: gcs-account
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:
2018-07-07 17:07:33 +00:00
certmanager.k8s.io/cluster-issuer: "letsencrypt-prod"
certmanager.k8s.io/acme-challenge-type: "http01"
2018-01-06 15:53:24 +00:00
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"
2019-08-12 09:35:07 +00:00
nginx.ingress.kubernetes.io/ssl-redirect: "false"
2018-01-06 15:53:24 +00:00
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
metrics:
- type: Resource
resource:
name: cpu
targetAverageUtilization: 80
- type: Resource
resource:
name: memory
targetAverageValue: 1800Mi