52 lines
1.4 KiB
Django/Jinja
52 lines
1.4 KiB
Django/Jinja
{% macro load_file(filename) %}{% include filename %}{%- endmacro -%}
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
labels:
|
|
app: kanban
|
|
service: kanban-web
|
|
name: kanban-web
|
|
annotations:
|
|
image.openshift.io/triggers: >-
|
|
[{"from":{"kind":"ImageStreamTag","name":"kanban:latest","namespace":"kanban"},"fieldPath":"spec.template.spec.containers[?(@.name==\"kanban-web\")].image","pause":"false"}]
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: kanban
|
|
service: kanban-web
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: kanban
|
|
service: kanban-web
|
|
spec:
|
|
containers:
|
|
- name: kanban-web
|
|
image: image-registry.openshift-image-registry.svc:5000/kanban/kanban:latest
|
|
ports:
|
|
- containerPort: 8080
|
|
resources: {}
|
|
env:
|
|
{{ load_file('envvars.jinja') | indent(8) }}
|
|
volumeMounts:
|
|
- name: kanban-secret-volume
|
|
mountPath: /opt/app-root/secret/
|
|
readOnly: true
|
|
readinessProbe:
|
|
timeoutSeconds: 15
|
|
initialDelaySeconds: 5
|
|
httpGet:
|
|
path: /api/0/probe
|
|
port: 8080
|
|
livenessProbe:
|
|
timeoutSeconds: 25
|
|
initialDelaySeconds: 60
|
|
httpGet:
|
|
path: /api/0/probe
|
|
port: 8080
|
|
volumes:
|
|
- name: kanban-secret-volume
|
|
secret:
|
|
secretName: kanban-secret
|