Skip to content

Commit 2ba0252

Browse files
committed
Update backend security context.
1 parent 3276ef4 commit 2ba0252

File tree

3 files changed

+26
-15
lines changed

3 files changed

+26
-15
lines changed

Diff for: backend/Dockerfile

+3-1
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,6 @@ CMD sh -c "python3 manage.py migrate --noinput && \
5454
python3 manage.py createinitialrevisions && \
5555
python3 manage.py collectstatic --noinput && \
5656
# python3 manage.py export --cleanup=1 --upload=1 && \
57-
python3 manage.py runserver 0.0.0.0:8000"
57+
python3 manage.py runserver 0.0.0.0:8000"
58+
59+
USER 1001

Diff for: backend/openshift.deploy.yml

+15-13
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@ parameters:
1414
required: true
1515
- name: CPU_REQUEST
1616
required: false
17-
value: 200m
17+
value: 100m
1818
- name: CPU_LIMIT
1919
required: false
20-
value: 1000m
20+
value: 500m
2121
- name: MEMORY_REQUEST
2222
required: false
23-
value: 1500Mi
23+
value: 750Mi
2424
- name: MEMORY_LIMIT
2525
required: false
26-
value: 2Gi
26+
value: 1Gi
2727
- name: E_LICENSING_URL
2828
required: true
2929
- name: DB_REPLICATE
@@ -459,19 +459,19 @@ objects:
459459
requests:
460460
cpu: "${CPU_REQUEST}"
461461
memory: "${MEMORY_REQUEST}"
462-
readinessProbe:
463-
httpGet:
464-
path: /health
465-
port: 8000
462+
# readinessProbe:
463+
# httpGet:
464+
# path: /health
465+
# port: 8000
466466
# initialDelaySeconds: 20
467467
# timeoutSeconds: 3
468468
# periodSeconds: 5
469469
# successThreshold: 1
470470
# failureThreshold: 5
471-
livenessProbe:
472-
httpGet:
473-
path: /health
474-
port: 8000
471+
# livenessProbe:
472+
# httpGet:
473+
# path: /health
474+
# port: 8000
475475
# initialDelaySeconds: 20
476476
# timeoutSeconds: 3
477477
# periodSeconds: 30
@@ -483,7 +483,9 @@ objects:
483483
restartPolicy: Always
484484
terminationGracePeriodSeconds: 30
485485
dnsPolicy: ClusterFirst
486-
securityContext: {}
486+
securityContext:
487+
capabilities:
488+
add: ["NET_BIND_SERVICE"]
487489
schedulerName: default-scheduler
488490
- apiVersion: autoscaling/v1
489491
kind: HorizontalPodAutoscaler

Diff for: common/openshift.init.yml

+8-1
Original file line numberDiff line numberDiff line change
@@ -140,5 +140,12 @@ objects:
140140
labels:
141141
template: nr-gwells-backend-network-security-policy
142142
spec:
143+
podSelector: {}
144+
ingress:
145+
- from:
146+
- namespaceSelector:
147+
matchLabels:
148+
environment: dev
149+
name: cd43d9
143150
policyTypes:
144-
- Ingress
151+
- Ingress

0 commit comments

Comments
 (0)