Testdays - deploymentconfig -> deployment, mk1

This commit is contained in:
Josef Skladanka 2024-12-20 12:01:30 +01:00
parent c15a2f2cea
commit a67508e5de
3 changed files with 128 additions and 9 deletions

View file

@ -82,6 +82,11 @@
object_template: deploymentconfig.yml
object_objectname: deploymentconfig.yml
- role: openshift/object
object_app: testdays
object_template: deployment.yml
object_objectname: deployment.yml
- role: openshift/object
object_app: testdays
object_template: imagestream.yml

View file

@ -0,0 +1,114 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: testdays
service: testdays
name: testdays
annotations:
image.openshift.io/triggers: >-
[{"from":{"kind":"ImageStreamTag","name":"testdays:latest","namespace":"testdays"},"fieldPath":"spec.template.spec.containers[?(@.name==\"testdays\")].image","pause":"false"}]
spec:
replicas: 1
selector:
matchLabels:
app: testdays
service: testdays
template:
metadata:
labels:
app: testdays
service: testdays
spec:
containers:
- name: testdays
image: image-registry.openshift-image-registry.svc:5000/testdays/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: "http://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
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: resultsdb
service: resultsdb
name: resultsdb
annotations:
image.openshift.io/triggers: >-
[{"from":{"kind":"ImageStreamTag","name":"resultsdb:latest","namespace":"resultsdb"},"fieldPath":"spec.template.spec.containers[?(@.name==\"resultsdb\")].image","pause":"false"}]
spec:
replicas: 1
selector:
matchLabels:
app: resultsdb
service: resultsdb
template:
metadata:
labels:
app: resultsdb
service: resultsdb
spec:
containers:
- name: resultsdb
image: image-registry.openshift-image-registry.svc:5000/resultsdb/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: OPENSHIFT_PROD
value: "1"
readinessProbe:
timeoutSeconds: 1
initialDelaySeconds: 5
httpGet:
path: /
port: 8080
livenessProbe:
timeoutSeconds: 1
initialDelaySeconds: 30
httpGet:
path: /
port: 8080

View file

@ -7,7 +7,7 @@ metadata:
service: testdays
name: testdays
spec:
replicas: 1
replicas: 0
selector:
app: testdays
deploymentconfig: testdays
@ -31,7 +31,7 @@ spec:
- name: testdays
image: testdays:latest
ports:
- containerPort: 8080
- containerPort: 8081
resources: {}
env:
- name: POSTGRESQL_USER
@ -47,7 +47,7 @@ spec:
- name: SECRET_KEY
value: "{{ testdays_secret_key }}"
- name: RESULTSDB_URL
value: "http://resultsdb.testdays.svc.cluster.local:8080/api/v2.0"
value: "http://resultsdb.testdays.svc.cluster.local:8081/api/v2.0"
- name: OPENSHIFT_PROD
value: "1"
readinessProbe:
@ -55,13 +55,13 @@ spec:
initialDelaySeconds: 5
httpGet:
path: /
port: 8080
port: 8081
livenessProbe:
timeoutSeconds: 1
initialDelaySeconds: 30
httpGet:
path: /
port: 8080
port: 8081
triggers:
- type: ConfigChange
@ -82,7 +82,7 @@ metadata:
service: resultsdb
name: resultsdb
spec:
replicas: 1
replicas: 0
selector:
app: resultsdb
deploymentconfig: resultsdb
@ -106,7 +106,7 @@ spec:
- name: resultsdb
image: resultsdb:latest
ports:
- containerPort: 8080
- containerPort: 8081
resources: {}
env:
- name: POSTGRESQL_USER
@ -128,13 +128,13 @@ spec:
initialDelaySeconds: 5
httpGet:
path: /
port: 8080
port: 8081
livenessProbe:
timeoutSeconds: 1
initialDelaySeconds: 30
httpGet:
path: /
port: 8080
port: 8081
triggers:
- type: ConfigChange