cara/app-config/openshift/deploymentconfig.yaml

415 lines
13 KiB
YAML

---
kind: "Template"
apiVersion: template.openshift.io/v1
metadata:
name: "caimira-application"
annotations:
description: "CAiMIRA application OpenShift template."
tags: "caimira-application"
labels:
template: "caimira-application"
objects:
-
apiVersion: apps.openshift.io/v1
kind: DeploymentConfig
metadata:
name: auth-service
labels:
app: auth-service
spec:
replicas: 1
template:
metadata:
labels:
app: auth-service
deploymentconfig: auth-service
spec:
containers:
- name: auth-service
image: '${PROJECT_NAME}/auth-service'
ports:
- containerPort: 8080
protocol: TCP
envFrom:
- configMapRef:
name: auth-service
- secretRef:
name: auth-service-secrets
imagePullPolicy: Always
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: { }
terminationGracePeriodSeconds: 30
strategy:
activeDeadlineSeconds: 21600
resources: { }
rollingParams:
intervalSeconds: 1
maxSurge: 25%
maxUnavailable: 25%
timeoutSeconds: 600
updatePeriodSeconds: 1
type: Rolling
test: false
selector:
deploymentconfig: auth-service
triggers:
- type: ConfigChange
- type: ImageChange
imageChangeParams:
automatic: true
containerNames:
- auth-service
from:
kind: ImageStreamTag
name: 'auth-service:latest'
namespace: ${PROJECT_NAME}
-
apiVersion: apps.openshift.io/v1
kind: DeploymentConfig
metadata:
name: expert-app
labels: {app: expert-app}
spec:
replicas: 1
template:
metadata:
labels:
app: expert-app
spec:
containers:
- name: calculator-app
env:
- name: APP_NAME
value: caimira-voila
image: '${PROJECT_NAME}/calculator-app'
ports:
- containerPort: 8080
protocol: TCP
imagePullPolicy: Always
resources:
limits: { cpu: '1', memory: 1Gi }
requests: { cpu: 1m, memory: 512Mi }
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: { }
terminationGracePeriodSeconds: 30
strategy:
activeDeadlineSeconds: 21600
resources: { }
rollingParams:
intervalSeconds: 1
maxSurge: 25%
maxUnavailable: 25%
timeoutSeconds: 600
updatePeriodSeconds: 1
type: Rolling
test: false
selector:
app: expert-app
triggers:
- type: ConfigChange
- type: ImageChange
imageChangeParams:
automatic: true
containerNames:
- calculator-app
from:
kind: ImageStreamTag
name: 'calculator-app:latest'
namespace: ${PROJECT_NAME}
-
apiVersion: apps.openshift.io/v1
kind: DeploymentConfig
metadata:
name: expert-co2-app
labels: {app: expert-co2-app}
spec:
replicas: 1
template:
metadata:
labels:
app: expert-co2-app
spec:
containers:
- name: calculator-app
env:
- name: APP_NAME
value: caimira-co2-voila
image: '${PROJECT_NAME}/calculator-app'
ports:
- containerPort: 8080
protocol: TCP
imagePullPolicy: Always
resources:
limits: { cpu: '1', memory: 1Gi }
requests: { cpu: 1m, memory: 512Mi }
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: { }
terminationGracePeriodSeconds: 30
strategy:
activeDeadlineSeconds: 21600
resources: { }
rollingParams:
intervalSeconds: 1
maxSurge: 25%
maxUnavailable: 25%
timeoutSeconds: 600
updatePeriodSeconds: 1
type: Rolling
test: false
selector:
app: expert-co2-app
triggers:
- type: ConfigChange
- type: ImageChange
imageChangeParams:
automatic: true
containerNames:
- calculator-app
from:
kind: ImageStreamTag
name: 'calculator-app:latest'
namespace: ${PROJECT_NAME}
-
apiVersion: apps.openshift.io/v1
kind: DeploymentConfig
metadata:
name: caimira-router
spec:
replicas: 1
template:
metadata:
labels:
app: caimira-router
spec:
containers:
- name: caimira-router
image: '${PROJECT_NAME}/caimira-router'
ports:
- containerPort: 8080
protocol: TCP
- containerPort: 8443
protocol: TCP
imagePullPolicy: Always
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: { }
terminationGracePeriodSeconds: 30
strategy:
activeDeadlineSeconds: 21600
resources: { }
rollingParams:
intervalSeconds: 1
maxSurge: 25%
maxUnavailable: 25%
timeoutSeconds: 600
updatePeriodSeconds: 1
type: Rolling
test: false
selector:
app: caimira-router
triggers:
- type: ImageChange
imageChangeParams:
automatic: true
containerNames:
- caimira-router
from:
kind: ImageStreamTag
name: 'caimira-router:latest'
namespace: ${PROJECT_NAME}
- type: ConfigChange
-
apiVersion: apps.openshift.io/v1
kind: DeploymentConfig
metadata:
name: calculator-app
labels:
image: calculator-app
app: calculator-app
spec:
replicas: 1
template:
metadata:
labels:
app: calculator-app
spec:
containers:
- name: calculator-app
env:
- name: COOKIE_SECRET
valueFrom:
secretKeyRef:
key: COOKIE_SECRET
name: auth-service-secrets
- name: REPORT_PARALLELISM
value: '3'
- name: APP_NAME
value: calculator-app
- name: APPLICATION_ROOT
value: /
- name: CAIMIRA_CALCULATOR_PREFIX
value: /calculator-cern
- name: CAIMIRA_THEME
value: caimira/apps/templates/cern
- name: ARVE_CLIENT_ID
valueFrom:
secretKeyRef:
key: ARVE_CLIENT_ID
name: arve-api
- name: ARVE_CLIENT_SECRET
valueFrom:
secretKeyRef:
key: ARVE_CLIENT_SECRET
name: arve-api
- name: ARVE_API_KEY
valueFrom:
secretKeyRef:
key: ARVE_API_KEY
name: arve-api
- name: DATA_SERVICE_ENABLED
value: 'False'
image: '${PROJECT_NAME}/calculator-app'
ports:
- containerPort: 8080
protocol: TCP
imagePullPolicy: Always
readinessProbe:
failureThreshold: 3
httpGet:
path: /calculator-cern
port: 8080
scheme: HTTP
initialDelaySeconds: 3
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
resources:
limits:
cpu: '3'
memory: 3Gi
requests:
cpu: '1'
memory: 1Gi
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: { }
terminationGracePeriodSeconds: 30
strategy:
activeDeadlineSeconds: 21600
resources: { }
rollingParams:
intervalSeconds: 1
maxSurge: 25%
maxUnavailable: 25%
timeoutSeconds: 600
updatePeriodSeconds: 1
type: Rolling
test: false
selector:
app: calculator-app
triggers:
- type: ImageChange
imageChangeParams:
automatic: true
containerNames:
- calculator-app
from:
kind: ImageStreamTag
name: 'calculator-app:latest'
namespace: ${PROJECT_NAME}
- type: ConfigChange
-
apiVersion: apps.openshift.io/v1
kind: DeploymentConfig
metadata:
name: calculator-open-app
labels:
image: calculator-app
app: calculator-open-app
spec:
replicas: 1
template:
metadata:
labels:
app: calculator-open-app
spec:
containers:
- name: calculator-open-app
env:
- name: APP_NAME
value: calculator-app
- name: APPLICATION_ROOT
value: /
- name: CAIMIRA_CALCULATOR_PREFIX
value: /calculator-open
- name: DATA_SERVICE_ENABLED
value: 'False'
image: '${PROJECT_NAME}/calculator-app'
ports:
- containerPort: 8080
protocol: TCP
imagePullPolicy: Always
resources:
limits:
cpu: '3'
memory: 3Gi
requests:
cpu: '1'
memory: 1Gi
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: { }
terminationGracePeriodSeconds: 30
strategy:
activeDeadlineSeconds: 21600
resources: { }
rollingParams:
intervalSeconds: 1
maxSurge: 25%
maxUnavailable: 25%
timeoutSeconds: 600
updatePeriodSeconds: 1
type: Rolling
test: false
selector:
app: calculator-open-app
triggers:
- type: ConfigChange
- type: ImageChange
imageChangeParams:
automatic: true
containerNames:
- calculator-open-app
from:
kind: ImageStreamTag
name: 'calculator-app:latest'
namespace: ${PROJECT_NAME}
- type: ConfigChange
parameters:
- name: PROJECT_NAME
description: The name of this project, e.g. caimira-test
required: true