Merge branch 'feature/check-oc-config-prod' into 'master'

Align the dev and prod openshift configs, and validate that they remain correct

See merge request cara/cara!230
This commit is contained in:
Philip James Elson 2021-07-31 04:04:23 +00:00
commit 2645ff2a43
3 changed files with 29 additions and 7 deletions

View file

@ -42,7 +42,7 @@ test_dev:
- python ./config-generate.py ${CARA_INSTANCE} --output-directory ./${CARA_INSTANCE}/expected
- python ./config-normalise.py ./${CARA_INSTANCE}/actual ./${CARA_INSTANCE}/actual-normed
- python ./config-normalise.py ./${CARA_INSTANCE}/expected ./${CARA_INSTANCE}/expected-normed
- diff -u ./test-cara/actual-normed/ ./${CARA_INSTANCE}/expected-normed/
- diff -u ./${CARA_INSTANCE}/actual-normed/ ./${CARA_INSTANCE}/expected-normed/
artifacts:
paths:
@ -59,6 +59,15 @@ check_openshift_config_test-cara:
OC_TOKEN: "${OPENSHIFT_CONFIG_CHECKER_TOKEN_TEST_CARA}"
check_openshift_config_prod:
extends: .test_openshift_config
variables:
CARA_INSTANCE: 'cara'
BRANCH: 'master'
OC_SERVER: openshift.cern.ch
OC_TOKEN: "${OPENSHIFT_CONFIG_CHECKER_TOKEN_PROD}"
# A development installation of CARA tested with pytest.
test_dev-39:
variables:

View file

@ -41,6 +41,9 @@
namespace: openshift
type: Source
triggers:
- type: ImageChange
imageChange: {}
- type: ConfigChange
- generic:
secretReference:
name: gitlab-cara-webhook-secret

View file

@ -73,6 +73,7 @@
kind: DeploymentConfig
metadata:
name: cara-app
labels: {app: cara-app}
spec:
replicas: 1
template:
@ -81,16 +82,18 @@
app: cara-app
spec:
containers:
- name: cara-app
- name: cara-webservice
env:
- name: APP_NAME
value: cara-voila
image: '${PROJECT_NAME}/cara-app'
image: '${PROJECT_NAME}/cara-webservice'
ports:
- containerPort: 8080
protocol: TCP
imagePullPolicy: Always
resources: {}
resources:
limits: { cpu: '1', memory: 1Gi }
requests: { cpu: 1m, memory: 512Mi }
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
dnsPolicy: ClusterFirst
@ -117,10 +120,10 @@
imageChangeParams:
automatic: true
containerNames:
- cara-app
- cara-webservice
from:
kind: ImageStreamTag
name: 'cara-app:latest'
name: 'cara-webservice:latest'
namespace: ${PROJECT_NAME}
-
apiVersion: v1
@ -165,7 +168,6 @@
selector:
app: cara-router
triggers:
- type: ConfigChange
- type: ImageChange
imageChangeParams:
automatic: true
@ -181,6 +183,9 @@
kind: DeploymentConfig
metadata:
name: cara-webservice
labels:
image: cara-webservice
app: cara-webservice
spec:
replicas: 1
template:
@ -196,6 +201,8 @@
secretKeyRef:
key: COOKIE_SECRET
name: auth-service-secrets
- name: REPORT_PARALLELISM
value: '3'
- name: APP_NAME
value: cara-webservice
- name: CARA_CALCULATOR_PREFIX
@ -260,6 +267,9 @@
kind: DeploymentConfig
metadata:
name: cara-calculator-open
labels:
image: cara-webservice
app: cara-calculator-open
spec:
replicas: 1
template: