Improve deployment security

This commit is contained in:
2022-02-14 09:42:44 +00:00
parent a7b1891501
commit 9f8b2e7711
4 changed files with 30 additions and 25 deletions

View File

@@ -17,6 +17,11 @@ spec:
app: dsm-client
spec:
securityContext:
runAsNonRoot: true
fsGroup: 1001
sysctls: []
containers:
- name: dsm-client
image: IMAGE
@@ -28,11 +33,26 @@ spec:
memory: 32Mi
cpu: 5m
ports:
- containerPort: 80
- name: http
containerPort: 8080
livenessProbe:
tcpSocket:
port: http
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 6
successThreshold: 1
readinessProbe:
tcpSocket:
port: http
periodSeconds: 5
timeoutSeconds: 3
failureThreshold: 3
successThreshold: 1
initialDelaySeconds: 5
periodSeconds: 15
httpGet:
path: /health
port: 80
securityContext:
runAsUser: 1001
runAsNonRoot: true