forked from abbi-gaurav/ic2021-s1-capexample
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcapexample-deploy.yaml
92 lines (92 loc) · 1.85 KB
/
capexample-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
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
82
83
84
85
86
87
88
89
90
91
92
apiVersion: apps/v1
kind: Deployment
metadata:
name: capexample-app
spec:
replicas: 1
selector:
matchLabels:
app: capexample-app
template:
metadata:
labels:
app: capexample-app
version: v1
spec:
containers:
- name: capexample-app
image: gunter04/ic2021s1capimage
imagePullPolicy: Always
resources:
limits:
memory: "128Mi"
cpu: "500m"
requests:
memory: 32Mi
ports:
- containerPort: 4004
name: http
volumeMounts:
- mountPath: /usr/src/app/myvolume
name: capexample-volume
- mountPath: /usr/src/app/config
name: capexample-file01-configmap
volumes:
- name: capexample-volume
persistentVolumeClaim:
claimName: capexample-volumeclaim
- name: capexample-file01-configmap
configMap:
name: capexample-file01
---
apiVersion: v1
kind: Service
metadata:
name: capexample-service
labels:
app: capexample-app
spec:
ports:
- port: 4004
name: http
targetPort: 4004
selector:
app: capexample-app
---
apiVersion: gateway.kyma-project.io/v1alpha1
kind: APIRule
metadata:
name: apj-train-capex1-rule
spec:
gateway: kyma-gateway.kyma-system.svc.cluster.local
service:
name: capexample-service
port: 4004
host: apj-train-capex1
rules:
- path: /.*
methods: ["GET"]
mutators: []
accessStrategies:
- handler: noop
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: capexample-volumeclaim
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 100Mi
status: {}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: capexample-file01
data:
testfile01.txt: |
# This is just a sample file content
# for a file added through yaml