-
Notifications
You must be signed in to change notification settings - Fork 0
/
sample-workload.yaml
70 lines (69 loc) · 1.58 KB
/
sample-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
---
apiVersion: v1
kind: Secret
metadata:
name: sample-secret
data:
testSecretData: YXJhbnlhLmFyaGF0LmRldg== # aranya.arhat.dev
type: Opaque
---
apiVersion: v1
kind: ConfigMap
metadata:
name: sample-configmap
data:
default.conf: |-
server {
listen 8080;
server_name localhost;
location / {
proxy_pass http://example.com;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
---
apiVersion: v1
kind: Pod
metadata:
name: example-edge-pod
spec:
tolerations:
# set which virtual cluster (kubernetes namespace) to deploy to
# this node taint is set by aranya by default to every node in the namespace
- key: arhat.dev/namespace
operator: Equal
value: edge
nodeSelector:
# to ensure this pod will be scheduled to edge devices, add this role label
arhat.dev/role: EdgeDevice
# use edge device name label selector
arhat.dev/name: example-edge-device-grpc
volumes:
- name: config
configMap:
name: nginx-config
containers:
- name: nginx
imagePullPolicy: IfNotPresent
image: nginx:stable-alpine
env:
- name: SAMPLE_PLAIN_TEXT
value: plain.text
- name: ARANYA_URL
valueFrom:
secretKeyRef:
name: sample-secret
key: testSecretData
ports:
- name: http
containerPort: 8080
# only host port will be exposed
hostPort: 8090
volumeMounts:
- name: config
mountPath: /etc/nginx/conf.d
subPath: default.conf
restartPolicy: Never