ansible/roles/openshift-apps/koschei/templates/frontend-deployment.yml

56 lines
1.4 KiB
YAML

# https://docs.openshift.com/container-platform/4.15/rest_api/workloads_apis/deployment-apps-v1.html
apiVersion: apps/v1
kind: Deployment
metadata:
name: frontend
labels:
service: frontend
spec:
replicas: {{koschei_frontend_replicas}}
selector:
matchLabels:
service: frontend
strategy:
type: RollingUpdate
template:
metadata:
labels:
service: frontend
spec:
containers:
- name: frontend
image: image-registry.openshift-image-registry.svc:5000/koschei/koschei:latest
command: [/usr/bin/koschei-frontend]
ports:
- containerPort: 8080
volumeMounts:
- name: config
mountPath: /etc/koschei
readOnly: true
resources:
requests:
cpu: 500m
memory: 256Mi
limits:
cpu: 3000m
memory: 896Mi
readinessProbe:
timeoutSeconds: 1
initialDelaySeconds: 5
httpGet:
path: /collections
port: 8080
livenessProbe:
timeoutSeconds: 1
initialDelaySeconds: 30
httpGet:
path: /collections
port: 8080
volumes:
- name: config
secret:
secretName: frontend-config
topologySpreadConstraints:
- topologyKey: kubernetes.io/hostname
maxSkew: 1
whenUnsatisfiable: ScheduleAnyway