forked from fleetman-ci-cd-demo/fleetman-api-gateway
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy.yaml
executable file
·45 lines (42 loc) · 1.02 KB
/
deploy.yaml
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
apiVersion: apps/v1
kind: Deployment
metadata:
name: api-gateway
spec:
selector:
matchLabels:
app: api-gateway
replicas: 1
template: # template for the pods
metadata:
labels:
app: api-gateway
spec:
containers:
- name: api-gateway
image: ${REPOSITORY_TAG}
env:
- name: SPRING_PROFILES_ACTIVE
value: production-microservice
# Using this as a way to avoid having to bother pushing images to registry.
imagePullPolicy: Never
readinessProbe:
httpGet:
path: /
port: 8080
---
apiVersion: v1
kind: Service
metadata:
name: fleetman-api-gateway
spec:
# This defines which pods are going to be represented by this Service
# The service becomes a network endpoint for either other services
# or maybe external users to connect to (eg browser)
selector:
app: api-gateway
ports:
- name: http
port: 8080
nodePort: 30020
type: NodePort