-
Notifications
You must be signed in to change notification settings - Fork 7
/
weather-appv2.yaml
70 lines (68 loc) · 1.63 KB
/
weather-appv2.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
---
apiVersion: v1
kind: ConfigMap
metadata:
name: private-appv2
namespace: apps
data:
api.json: |
{
"forecast": {
"1": {"city": "GopherCity", "weather": "Cloudy", "dt": "3128231402"},
"2": {"city": "City of Gopher", "weather": "Rainy", "dt": "3128231402"},
"3": {"code": "GopherCentral", "weather": "Shiny", "dt": "3128231402"}
},
"forecast-fr": {
"1": {"city": "GopherCity", "weather": "Nuageux", "dt": "3128231402"},
"2": {"city": "City of Gopher", "weather": "Pluvieux", "dt": "3128231402"},
"3": {"code": "GopherCentral", "weather": "Ensoleillé", "dt": "3128231402"}
}
}
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: private-app
namespace: apps
spec:
replicas: 1
selector:
matchLabels:
app: private-appv2
template:
metadata:
labels:
app: private-appv2
spec:
containers:
- name: api
image: ghcr.io/traefik/api-server:v1.1.0
args: ["-data", "/api/api.json", "-openapi", "/public/openapi.yaml", "-errorrate", "2"]
imagePullPolicy: IfNotPresent
volumeMounts:
- name: api-data
mountPath: /api
- name: openapi
mountPath: /public
volumes:
- name: api-data
configMap:
name: private-appv2-data
- name: openapi
configMap:
name: private-appv2-openapispec
---
apiVersion: v1
kind: Service
metadata:
name: private-appv2
namespace: apps
labels:
app: private-appv2
spec:
type: ClusterIP
ports:
- port: 3000
name: api
selector:
app: private-appv2