|
@@ -2,7 +2,7 @@ apiVersion: v1
|
|
|
kind: Service
|
|
|
metadata:
|
|
|
name: companion
|
|
|
- namespace: uppy
|
|
|
+ namespace: companion
|
|
|
labels:
|
|
|
app: companion
|
|
|
spec:
|
|
@@ -17,41 +17,25 @@ apiVersion: apps/v1
|
|
|
kind: StatefulSet
|
|
|
metadata:
|
|
|
name: companion
|
|
|
- namespace: uppy
|
|
|
+ namespace: companion
|
|
|
spec:
|
|
|
selector:
|
|
|
matchLabels:
|
|
|
app: companion
|
|
|
- replicas: 2
|
|
|
+ replicas: 1
|
|
|
serviceName: "companion"
|
|
|
template:
|
|
|
metadata:
|
|
|
labels:
|
|
|
app: companion
|
|
|
spec:
|
|
|
- affinity:
|
|
|
- nodeAffinity:
|
|
|
- requiredDuringSchedulingIgnoredDuringExecution:
|
|
|
- nodeSelectorTerms:
|
|
|
- - matchExpressions:
|
|
|
- - key: cloud.google.com/gke-preemptible
|
|
|
- operator: Exists
|
|
|
- podAntiAffinity:
|
|
|
- requiredDuringSchedulingIgnoredDuringExecution:
|
|
|
- - labelSelector:
|
|
|
- matchExpressions:
|
|
|
- - key: app
|
|
|
- operator: In
|
|
|
- values:
|
|
|
- - companion
|
|
|
- topologyKey: kubernetes.io/hostname
|
|
|
containers:
|
|
|
- image: docker.io/transloadit/companion:latest
|
|
|
imagePullPolicy: Always
|
|
|
name: companion
|
|
|
envFrom:
|
|
|
- secretRef:
|
|
|
- name: uppy-companion-env
|
|
|
+ name: companion-env
|
|
|
ports:
|
|
|
- containerPort: 3020
|
|
|
volumeMounts:
|
|
@@ -62,7 +46,6 @@ spec:
|
|
|
name: companion-data
|
|
|
spec:
|
|
|
accessModes: [ "ReadWriteOnce" ]
|
|
|
- storageClassName: "standard"
|
|
|
resources:
|
|
|
requests:
|
|
|
storage: 10Gi
|
|
@@ -71,30 +54,29 @@ apiVersion: extensions/v1beta1
|
|
|
kind: Ingress
|
|
|
metadata:
|
|
|
name: companion
|
|
|
- namespace: uppy
|
|
|
+ namespace: companion
|
|
|
annotations:
|
|
|
kubernetes.io/tls-acme: "true"
|
|
|
kubernetes.io/ingress.class: "nginx"
|
|
|
certmanager.k8s.io/cluster-issuer: "letsencrypt-prod"
|
|
|
certmanager.k8s.io/acme-http01-edit-in-place: "true"
|
|
|
- nginx.ingress.kubernetes.io/affinity: "cookie"
|
|
|
- nginx.ingress.kubernetes.io/session-cookie-name: "route"
|
|
|
- nginx.ingress.kubernetes.io/session-cookie-hash: "sha1"
|
|
|
spec:
|
|
|
tls:
|
|
|
- secretName: server-tls
|
|
|
hosts:
|
|
|
- companion.uppy.io
|
|
|
- - server.uppy.io
|
|
|
+ - secretName: uppy-tls
|
|
|
+ hosts:
|
|
|
+ - server.uppy.io
|
|
|
rules:
|
|
|
- - host: server.uppy.io
|
|
|
+ - host: companion.uppy.io
|
|
|
http:
|
|
|
paths:
|
|
|
- path: /
|
|
|
backend:
|
|
|
serviceName: companion
|
|
|
servicePort: 80
|
|
|
- - host: companion.uppy.io
|
|
|
+ - host: server.uppy.io
|
|
|
http:
|
|
|
paths:
|
|
|
- path: /
|
|
@@ -106,7 +88,7 @@ apiVersion: autoscaling/v1
|
|
|
kind: HorizontalPodAutoscaler
|
|
|
metadata:
|
|
|
name: companion
|
|
|
- namespace: uppy
|
|
|
+ namespace: companion
|
|
|
spec:
|
|
|
scaleTargetRef:
|
|
|
apiVersion: apps/v1
|