-
Notifications
You must be signed in to change notification settings - Fork 3
/
gcp-awesome-node.yml
81 lines (81 loc) · 1.88 KB
/
gcp-awesome-node.yml
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
apiVersion: v1
kind: Namespace
metadata:
name: auto-awesome-node
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: auto-awesome-node
namespace: auto-awesome-node
labels:
app: auto-awesome-node
spec:
replicas: 3
template:
metadata:
name: auto-awesome-node
labels:
app: auto-awesome-node
spec:
containers:
- name: auto-awesome-node
image: europe-west6-docker.pkg.dev/your-project/your-artifact-repo/awesome-node-gcp-build:latest
resources:
limits:
cpu: 100m
memory: 120M
requests:
cpu: 100m
memory: 120M
ports:
- containerPort: 8080
livenessProbe:
httpGet:
path: /healthcheck
port: 8080
initialDelaySeconds: 10
periodSeconds: 5
readinessProbe:
httpGet:
path: /healthcheck
port: 8080
initialDelaySeconds: 5
periodSeconds: 2
selector:
matchLabels:
app: auto-awesome-node
---
apiVersion: v1
kind: Service
metadata:
namespace: auto-awesome-node
name: auto-awesome-node-svc
spec:
type: ClusterIP
ports:
- protocol: TCP
port: 80
targetPort: 8080
selector:
app: auto-awesome-node
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
namespace: auto-awesome-node
name: auto-awesome-node-ingress
annotations:
# If the class annotation is not specified it defaults to "gce".
kubernetes.io/ingress.class: "gce"
spec:
rules:
- http:
paths:
- path: /*
pathType: ImplementationSpecific
backend:
service:
name: auto-awesome-node-svc
port:
number: 80