cara/app-config/openshift/deployments.yaml
Nicola Tarocco 4b30f6aaed
openshift: update yamls and checks
* update OpenShift yamls
* fix OpenShift yamls checks
2024-10-13 22:43:42 +02:00

286 lines
8.9 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/v1
kind: Deployment
metadata:
name: auth-service
labels:
app: auth-service
spec:
replicas: 1
template:
metadata:
labels:
app: auth-service
spec:
containers:
- name: auth-service
image: 'gitlab-registry.cern.ch/caimira/caimira/auth-service:latest'
ports:
- containerPort: 8080
protocol: TCP
envFrom:
- configMapRef:
name: auth-service
- secretRef:
name: auth-service-secrets
imagePullPolicy: Always
resources:
limits:
cpu: 100m
memory: 250Mi
requests:
cpu: 50m
memory: 40Mi
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: RollingUpdate
selector:
matchLabels:
app: auth-service
-
apiVersion: apps/v1
kind: Deployment
metadata:
name: caimira-router
spec:
replicas: 1
template:
metadata:
labels:
app: caimira-router
spec:
volumes:
- name: nginx-config
configMap:
name: router
defaultMode: 420
- name: var-run
emptyDir: {}
- name: var-cache-nginx
emptyDir: {}
- name: var-log-nginx
emptyDir: {}
containers:
- name: caimira-router
image: 'registry.cern.ch/docker.io/library/nginx:1.23'
ports:
- containerPort: 8080
protocol: TCP
- containerPort: 8443
protocol: TCP
imagePullPolicy: Always
resources:
limits:
cpu: 100m
memory: 250Mi
requests:
cpu: 50m
memory: 16Mi
volumeMounts:
- name: nginx-config
mountPath: /etc/nginx/conf.d
- name: var-run
mountPath: /var/run
- name: var-cache-nginx
mountPath: /var/cache/nginx
- name: var-log-nginx
mountPath: /var/log/nginx
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: RollingUpdate
selector:
matchLabels:
app: caimira-router
-
apiVersion: apps/v1
kind: Deployment
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: cern_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: '0'
- name: CAIMIRA_PROFILER_ENABLED
value: '1'
image: 'gitlab-registry.cern.ch/caimira/caimira/calculator-app:latest'
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: 50m
memory: 250Mi
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: RollingUpdate
selector:
matchLabels:
app: calculator-app
-
apiVersion: apps/v1
kind: Deployment
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: '0'
- name: CAIMIRA_PROFILER_ENABLED
value: '1'
image: 'gitlab-registry.cern.ch/caimira/caimira/calculator-app:latest'
ports:
- containerPort: 8080
protocol: TCP
imagePullPolicy: Always
resources:
limits:
cpu: '3'
memory: 3Gi
requests:
cpu: 50m
memory: 250Mi
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: RollingUpdate
selector:
matchLabels:
app: calculator-open-app