blob: e82ff9624b3480557988d1ba565c70ccb58cfda4 (
plain) (
blame)
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
|
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: {{ namespace }}
name: onionbalance
labels:
app: onionbalance
spec:
replicas: 1
selector:
matchLabels:
app: onionbalance
strategy:
type: Recreate
revisionHistoryLimit: 5
template:
metadata:
labels:
app: onionbalance
spec:
nodeName: {{ worker.name }}
serviceAccountName: onionbalance
securityContext:
runAsUser: 998
fsGroup: 998
initContainers:
- name: prepare-onion-lib
image: busybox
command: ['sh', '-c', 'chown 998:998 /var/lib/tor && chmod 0750 /var/lib/tor']
securityContext:
runAsUser: 0
volumeMounts:
- name: onion-lib
mountPath: /var/lib/tor
containers:
- name: tor
image: spreadspace/onionbalance:{{ desc.globals.deployment.parameter.onionbalance_image_version }}
imagePullPolicy: Always
args:
- /run-tor.sh
volumeMounts:
- name: onion-run
mountPath: /var/run/tor
- name: onion-lib
mountPath: /var/lib/tor
- name: balance
image: spreadspace/onionbalance:{{ desc.globals.deployment.parameter.onionbalance_image_version }}
imagePullPolicy: Always
args:
- /run-balance.sh
env:
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
volumeMounts:
- name: onion-run
mountPath: /var/run/tor
- name: onion-lib
mountPath: /var/lib/tor
- name: onion-keys
readOnly: true
mountPath: /var/run/secrets/spreadspace.org/onionbalance
volumes:
- name: onion-run
emptyDir:
medium: Memory
- name: onion-lib
emptyDir:
medium: Memory
- name: onion-keys
secret:
secretName: onionbalance
|