-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathk8s-descriptor.yaml
72 lines (72 loc) · 1.67 KB
/
k8s-descriptor.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
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
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: api-gateway
spec:
replicas: 1
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
type: RollingUpdate
template:
metadata:
name: api-gateway
labels:
app: api-gateway
spec:
imagePullSecrets:
- name: my-docker-registry-secret
containers:
- name: api-gateway
image: eu.gcr.io/my-docker-registry/api-gateway
imagePullPolicy: Always
ports:
- containerPort: 8080
livenessProbe:
failureThreshold: 3
httpGet:
path: /
port: 8080
periodSeconds: 30
successThreshold: 1
timeoutSeconds: 240
readinessProbe:
failureThreshold: 3
httpGet:
path: /health
port: 8080
periodSeconds: 30
successThreshold: 1
timeoutSeconds: 240
env:
- name: K8S_API_TOKEN
valueFrom:
secretKeyRef:
name: my-serviceaccount-token-secret
key: token
- name: K8S_API_HOST
value: "kubernetes.default.svc.cluster.local"
- name: K8S_API_PORT
value: "443"
- name: AUTH_HOST
value: "auth-service-service"
- name: AUTH_PORT
value: "80"
args: [
"-Djava.security.egd=file:/dev/./urandom",
"-Xmx1g",
"-Dintegration.kubernetes.namespaces.0=my-env",
]
---
apiVersion: extensions/v1beta1
kind: Service
metadata:
name: api-gateway-svc
spec:
ports:
- port: 80
targetPort: 8080
selector:
app: api-gateway
type: NodePort