ansible/roles/openshift-apps/testdays/templates/deploymentconfig.yml
2020-11-02 16:10:32 +01:00

150 lines
4 KiB
YAML

---
apiVersion: v1
kind: DeploymentConfig
metadata:
labels:
app: testdays
service: testdays
name: testdays
spec:
replicas: 1
selector:
app: testdays
deploymentconfig: testdays
strategy:
type: Recreate
recreateParams:
mid:
failurePolicy: Abort
execNewPod:
containerName: testdays
# We only need to init the database the first time, after we just need to check
# for DB upgrades
command: ["python", "/opt/app-root/src/testdays/cli.py", "init_db"]
template:
metadata:
labels:
app: testdays
deploymentconfig: testdays
spec:
containers:
- name: testdays
image: testdays:latest
ports:
- containerPort: 8080
resources: {}
env:
- name: POSTGRESQL_USER
value: "{{ testdays_db_user }}"
- name: POSTGRESQL_PASSWORD
value: "{{ testdays_db_pass }}"
- name: POSTGRESQL_DATABASE
value: "{{ testdays_db_name }}"
- name: POSTGRESQL_SERVICE_HOST
value: "db01{{ env_suffix }}.iad2.fedoraproject.org"
- name: POSTGRESQL_SERVICE_PORT
value: "5432"
- name: SECRET_KEY
value: "{{ testdays_secret_key }}"
- name: RESULTSDB_URL
value: "https://taskotron.fedoraproject.org/resultsdb/results"
- name: OPENSHIFT_PROD
value: "1"
readinessProbe:
timeoutSeconds: 1
initialDelaySeconds: 5
httpGet:
path: /
port: 8080
livenessProbe:
timeoutSeconds: 1
initialDelaySeconds: 30
httpGet:
path: /
port: 8080
triggers:
- type: ConfigChange
- type: ImageChange
imageChangeParams:
automatic: true
containerNames:
- testdays
from:
kind: ImageStreamTag
name: testdays:latest
---
apiVersion: v1
kind: DeploymentConfig
metadata:
labels:
app: resultsdb
service: resultsdb
name: resultsdb
spec:
replicas: 1
selector:
app: resultsdb
deploymentconfig: resultsdb
strategy:
type: Recreate
recreateParams:
mid:
failurePolicy: Abort
execNewPod:
containerName: resultsdb
# We only need to init the database the first time, after we just need to check
# for DB upgrades
command: ["python", "/opt/app-root/src/resultsdb/cli.py", "init_db"]
template:
metadata:
labels:
app: resultsdb
deploymentconfig: resultsdb
spec:
containers:
- name: resultsdb
image: resultsdb:latest
ports:
- containerPort: 8080
resources: {}
env:
- name: POSTGRESQL_USER
value: "{{ resultsdb_testdays_db_user }}"
- name: POSTGRESQL_PASSWORD
value: "{{ resultsdb_testdays_db_pass }}"
- name: POSTGRESQL_DATABASE
value: "{{ resultsdb_testdays_db_name }}"
- name: POSTGRESQL_SERVICE_HOST
value: "db01{{ env_suffix }}.iad2.fedoraproject.org"
- name: POSTGRESQL_SERVICE_PORT
value: "5432"
- name: SECRET_KEY
value: "{{ resultsdb_testdays_secret_key }}"
- name: RESULTSDB_URL
value: "resultsdb.testdays.svc.cluster.local:8080/api/v2.0"
- name: OPENSHIFT_PROD
value: "1"
readinessProbe:
timeoutSeconds: 1
initialDelaySeconds: 5
httpGet:
path: /
port: 8080
livenessProbe:
timeoutSeconds: 1
initialDelaySeconds: 30
httpGet:
path: /
port: 8080
triggers:
- type: ConfigChange
- type: ImageChange
imageChangeParams:
automatic: true
containerNames:
- resultsdb
from:
kind: ImageStreamTag
name: resultsdb:latest