Testdays - deploymentconfig -> deployment, mk1
This commit is contained in:
parent
c15a2f2cea
commit
a67508e5de
3 changed files with 128 additions and 9 deletions
|
@ -82,6 +82,11 @@
|
||||||
object_template: deploymentconfig.yml
|
object_template: deploymentconfig.yml
|
||||||
object_objectname: deploymentconfig.yml
|
object_objectname: deploymentconfig.yml
|
||||||
|
|
||||||
|
- role: openshift/object
|
||||||
|
object_app: testdays
|
||||||
|
object_template: deployment.yml
|
||||||
|
object_objectname: deployment.yml
|
||||||
|
|
||||||
- role: openshift/object
|
- role: openshift/object
|
||||||
object_app: testdays
|
object_app: testdays
|
||||||
object_template: imagestream.yml
|
object_template: imagestream.yml
|
||||||
|
|
114
roles/openshift-apps/testdays/templates/deployment.yml
Normal file
114
roles/openshift-apps/testdays/templates/deployment.yml
Normal 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
|
|
@ -7,7 +7,7 @@ metadata:
|
||||||
service: testdays
|
service: testdays
|
||||||
name: testdays
|
name: testdays
|
||||||
spec:
|
spec:
|
||||||
replicas: 1
|
replicas: 0
|
||||||
selector:
|
selector:
|
||||||
app: testdays
|
app: testdays
|
||||||
deploymentconfig: testdays
|
deploymentconfig: testdays
|
||||||
|
@ -31,7 +31,7 @@ spec:
|
||||||
- name: testdays
|
- name: testdays
|
||||||
image: testdays:latest
|
image: testdays:latest
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 8080
|
- containerPort: 8081
|
||||||
resources: {}
|
resources: {}
|
||||||
env:
|
env:
|
||||||
- name: POSTGRESQL_USER
|
- name: POSTGRESQL_USER
|
||||||
|
@ -47,7 +47,7 @@ spec:
|
||||||
- name: SECRET_KEY
|
- name: SECRET_KEY
|
||||||
value: "{{ testdays_secret_key }}"
|
value: "{{ testdays_secret_key }}"
|
||||||
- name: RESULTSDB_URL
|
- 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
|
- name: OPENSHIFT_PROD
|
||||||
value: "1"
|
value: "1"
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
|
@ -55,13 +55,13 @@ spec:
|
||||||
initialDelaySeconds: 5
|
initialDelaySeconds: 5
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /
|
path: /
|
||||||
port: 8080
|
port: 8081
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
timeoutSeconds: 1
|
timeoutSeconds: 1
|
||||||
initialDelaySeconds: 30
|
initialDelaySeconds: 30
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /
|
path: /
|
||||||
port: 8080
|
port: 8081
|
||||||
|
|
||||||
triggers:
|
triggers:
|
||||||
- type: ConfigChange
|
- type: ConfigChange
|
||||||
|
@ -82,7 +82,7 @@ metadata:
|
||||||
service: resultsdb
|
service: resultsdb
|
||||||
name: resultsdb
|
name: resultsdb
|
||||||
spec:
|
spec:
|
||||||
replicas: 1
|
replicas: 0
|
||||||
selector:
|
selector:
|
||||||
app: resultsdb
|
app: resultsdb
|
||||||
deploymentconfig: resultsdb
|
deploymentconfig: resultsdb
|
||||||
|
@ -106,7 +106,7 @@ spec:
|
||||||
- name: resultsdb
|
- name: resultsdb
|
||||||
image: resultsdb:latest
|
image: resultsdb:latest
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 8080
|
- containerPort: 8081
|
||||||
resources: {}
|
resources: {}
|
||||||
env:
|
env:
|
||||||
- name: POSTGRESQL_USER
|
- name: POSTGRESQL_USER
|
||||||
|
@ -128,13 +128,13 @@ spec:
|
||||||
initialDelaySeconds: 5
|
initialDelaySeconds: 5
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /
|
path: /
|
||||||
port: 8080
|
port: 8081
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
timeoutSeconds: 1
|
timeoutSeconds: 1
|
||||||
initialDelaySeconds: 30
|
initialDelaySeconds: 30
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /
|
path: /
|
||||||
port: 8080
|
port: 8081
|
||||||
|
|
||||||
triggers:
|
triggers:
|
||||||
- type: ConfigChange
|
- type: ConfigChange
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue