generated from kyma-project/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathworkload.yaml
87 lines (86 loc) · 1.56 KB
/
workload.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
apiVersion: v1
kind: Namespace
metadata:
name: workload
labels:
istio-injection: enabled
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: httpbin
namespace: workload
---
apiVersion: v1
kind: Service
metadata:
name: httpbin
namespace: workload
labels:
app: httpbin
service: httpbin
spec:
ports:
- name: http
port: 8000
targetPort: 8080
selector:
app: httpbin
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: httpbin
namespace: workload
spec:
replicas: 1
selector:
matchLabels:
app: httpbin
version: v1
template:
metadata:
labels:
app: httpbin
version: v1
spec:
serviceAccountName: httpbin
containers:
- image: docker.io/kong/httpbin
imagePullPolicy: IfNotPresent
name: httpbin
# Same as found in Dockerfile's CMD but using an unprivileged port
command:
- gunicorn
- -b
- 0.0.0.0:8080
- httpbin:app
- -k
- gevent
env:
# Tells pipenv to use a writable directory instead of $HOME
- name: WORKON_HOME
value: /tmp
ports:
- containerPort: 8080
---
apiVersion: gateway.kyma-project.io/v1beta1
kind: APIRule
metadata:
labels:
app.kubernetes.io/name: httpbin
name: httpbin
namespace: workload
spec:
gateway: kyma-gateway.kyma-system.svc.cluster.local
host: httpbin
rules:
- accessStrategies:
- handler: no_auth
methods:
- GET
- POST
path: /.*
service:
name: httpbin
port: 8000