forked from papicella/springbootemployee-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathemployee-K8s-good.yaml
More file actions
61 lines (60 loc) · 1.3 KB
/
employee-K8s-good.yaml
File metadata and controls
61 lines (60 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
apiVersion: apps/v1
kind: Deployment
metadata:
name: snyk-employee-api
spec:
selector:
matchLabels:
app: snyk-employee-api
replicas: 1
template:
metadata:
labels:
app: snyk-employee-api
spec:
containers:
- name: snyk-employee-api
image: pasapples/springbootemployee:cnb
imagePullPolicy: Always
readinessProbe:
httpGet:
path: /ready
port: 8080
livenessProbe:
httpGet:
path: /health
port: 8080
initialDelaySeconds: 80
resources:
limits:
memory: 756Mi
cpu: "1"
requests:
memory: 200Mi
cpu: "0.5"
securityContext:
readOnlyRootFilesystem: true
runAsNonRoot: true
allowPrivilegeEscalation: false
capabilities:
drop:
- all
ports:
- containerPort: 8080
---
apiVersion: v1
kind: Service
metadata:
name: snyk-employee-api-lb
labels:
name: snyk-employee-api-lb
spec:
ports:
- port: 80
targetPort: 8080
protocol: TCP
selector:
app: snyk-employee-api
loadBalancerSourceRanges:
- "143.231.0.0/16"
type: LoadBalancer