97 lines
2.6 KiB
YAML
97 lines
2.6 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: xlog
|
|
namespace: crossbell
|
|
spec:
|
|
progressDeadlineSeconds: 600
|
|
replicas: 5
|
|
revisionHistoryLimit: 5
|
|
selector:
|
|
matchLabels:
|
|
app: xlog
|
|
strategy:
|
|
rollingUpdate:
|
|
maxSurge: 25%
|
|
maxUnavailable: 25%
|
|
type: RollingUpdate
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: xlog
|
|
spec:
|
|
enableServiceLinks: false
|
|
containers:
|
|
- image: $IMAGE_TAG_RELEASE
|
|
imagePullPolicy: Always
|
|
name: xlog
|
|
envFrom:
|
|
- secretRef:
|
|
name: xlog
|
|
ports:
|
|
- containerPort: 3000
|
|
protocol: TCP
|
|
resources:
|
|
requests:
|
|
memory: "1000Mi"
|
|
cpu: "150m"
|
|
limits:
|
|
memory: "2000Mi"
|
|
cpu: "500m"
|
|
terminationMessagePath: /dev/termination-log
|
|
terminationMessagePolicy: File
|
|
volumeMounts:
|
|
- name: xlog-image
|
|
mountPath: /app/.next/cache/images
|
|
readinessProbe:
|
|
tcpSocket:
|
|
port: 3000
|
|
initialDelaySeconds: 40
|
|
periodSeconds: 10
|
|
livenessProbe:
|
|
tcpSocket:
|
|
port: 3000
|
|
initialDelaySeconds: 40
|
|
periodSeconds: 20
|
|
- name: caddy
|
|
image: kindjeff/caddy-tlsredis-docker
|
|
imagePullPolicy: Always
|
|
command: ["caddy", "run", "-config", "/app/Caddyfile"]
|
|
envFrom:
|
|
- secretRef:
|
|
name: xlog-caddy
|
|
ports:
|
|
- containerPort: 80
|
|
name: http
|
|
- containerPort: 443
|
|
name: https
|
|
volumeMounts:
|
|
- name: caddyfile
|
|
mountPath: /app
|
|
- name: caddy-validator
|
|
image: python
|
|
command: ["/bin/sh", "-c"]
|
|
args: ["pip install flask requests; flask --app=app run"]
|
|
ports:
|
|
- containerPort: 5000
|
|
name: http
|
|
volumeMounts:
|
|
- name: validator
|
|
mountPath: /app.py
|
|
subPath: app.py
|
|
dnsPolicy: ClusterFirst
|
|
restartPolicy: Always
|
|
schedulerName: default-scheduler
|
|
securityContext: {}
|
|
terminationGracePeriodSeconds: 30
|
|
volumes:
|
|
- name: caddyfile
|
|
configMap:
|
|
name: xlog-caddy
|
|
- name: validator
|
|
configMap:
|
|
name: xlog-caddy-validator
|
|
- name: xlog-image
|
|
persistentVolumeClaim:
|
|
claimName: xlog-image # OSS PVC created manually in the ACK console
|