forked from SAP-archive/teched2020-developer-keynote
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deployment.yaml
77 lines (73 loc) · 1.4 KB
/
deployment.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
73
74
75
76
77
kind: ConfigMap
apiVersion: v1
metadata:
name: appconfig
data:
API_KEY: YOUR-API-KEY
destinations: |
[{"name": "apihub_sandbox","url": "https://sandbox.api.sap.com"}]
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: s4mock
spec:
replicas: 1
selector:
matchLabels:
app: s4mock
template:
metadata:
labels:
app: s4mock
version: v1
spec:
containers:
# replace this image URL with your own repository
- image: docker.pkg.github.com/OWNER/REPOSITORY/s4mock:latest
imagePullPolicy: Always
name: s4mock
ports:
- name: http
containerPort: 5000
resources:
limits:
memory: 1000Mi
requests:
memory: 32Mi
envFrom:
- configMapRef:
name: appconfig
imagePullSecrets:
- name: regcred
---
apiVersion: v1
kind: Service
metadata:
name: s4mock
labels:
app: s4mock
spec:
ports:
- port: 5000
name: http
targetPort: 5000
selector:
app: s4mock
---
apiVersion: gateway.kyma-project.io/v1alpha1
kind: APIRule
metadata:
name: s4mock
spec:
gateway: kyma-gateway.kyma-system.svc.cluster.local
service:
name: s4mock
port: 5000
host: s4mock
rules:
- path: /.*
methods: ["GET","POST","PUT","DELETE","PATCH","HEAD"]
accessStrategies:
- handler: noop
config: {}